context: function grabAll(elem){  // check for background images, any node may have one  var ComputedStyle = elem.ownerDocument.defaultView.getComputedStyle(elem, "");  var url = ComputedStyle && ComputedStyle.getPropertyCSSValue("background-image");  if (url && url.primitiveType == CSSPrimitiveValue.CSS_URI)    addImage(url.getStringValue(), gStrings.mediaBGImg, gStrings.notSet, elem, true);  // one swi^H^H^Hif-else to rule them all  if (elem instanceof nsIAnchorElement)    linkView.addRow([getValueText(elem), elem.href, gStrings.linkAnchor, elem.target, elem.accessKey]);  else if (elem instanceof nsIImageElement)    addImage(elem.src, gStrings.mediaImg, (elem.hasAttribute("alt")) ? elem.alt : gStrings.notSet, elem, false);  else if (elem instanceof nsIAreaElement)    linkView.addRow([elem.alt, elem.href, gStrings.linkArea, elem.target]);  else if (elem instanceof nsIQuoteElement && elem.cite)    linkView.addRow([getValueText(elem), elem.cite, gStrings.linkQuote]);  else if (elem instanceof nsIModElement && elem.cite)    linkView.addRow([getValueText(elem), elem.cite, gStrings.linkMod]);  else if (elem instanceof nsILinkElement)  {    if (elem.rel)    {      var rel = elem.rel;      if (/\bicon\b/i.test(rel))        addImage(elem.href, gStrings.mediaLink, "", elem, false);      else if (/\bstylesheet\b/i.test(rel))        linkView.addRow([elem.rel, elem.href, gStrings.linkStylesheet, elem.target]);      else        linkView.addRow([elem.rel, elem.href, gStrings.linkRel, elem.target]);    }    else      linkView.addRow([elem.rev, elem.href, gStrings.linkRev, elem.target]);  }  else if (elem instanceof nsIInputElement || elem instanceof nsIButtonElement)  {    switch (elem.type.toLowerCase())    {      case "image":        addImage(elem.src, gStrings.mediaInput, (elem.hasAttribute("alt")) ? elem.alt : gStrings.notSet, elem, false);        // Fall through, <input type="image"> submits, too      case "submit":        // Form element properties can be hidden by child elements with the same name, so        // we need to use a special access method, XPCNativeWrapper, to get their real values        if ("form" in elem && elem.form)        {          var formWrapper = new XPCNativeWrapper(elem.form, "target", "action");          linkView.addRow([elem.value || getValueText(elem) || gStrings.linkSubmit, formWrapper.action, gStrings.linkSubmission, formWrapper.target]);        }        else          linkView.addRow([elem.value || getValueText(elem) || gStrings.linkSubmit, '', gStrings.linkSubmission, '']);    }  }  else if (elem instanceof nsIFormElement)  {    formWrapper = new XPCNativeWrapper(elem, "name", "method", "action");    formView.addRow([formWrapper.name, formWrapper.method, formWrapper.action, elem]);  }  else if (elem instanceof nsIAppletElement)  {    //XXX When Java is enabled, the DOM model for <APPLET> is broken. Bug #59686.    // Also, some reports of a crash with Java in Media tab (bug 136535), and mixed    // content from two hosts (bug 136539) so just drop applets from Page Info when    // Java is on. For the 1.0.1 branch; get a real fix on the trunk.    if (!navigator.javaEnabled())      addImage(elem.code || elem.object, gStrings.mediaApplet, "", elem, false);  }  else if (elem instanceof nsIObjectElement)    addImage(elem.data, gStrings.mediaObject, getValueText(elem), elem, false);  else if (elem instanceof nsIEmbedElement)    addImage(elem.src, gStrings.mediaEmbed, "", elem, false);  else if (elem.hasAttributeNS(XLinkNS, "href")) {    var ioService = Components.classes["@mozilla.org/network/io-service;1"]                              .getService(Components.interfaces.nsIIOService);    var href = elem.getAttributeNS(XLinkNS, "href");    try {      var baseURI = ioService.newURI(elem.baseURI,                                     elem.ownerDocument.characterSet, null);      var uri = ioService.newURI(href, elem.ownerDocument.characterSet,                                 baseURI).spec;    } catch (e) {}    linkView.addRow([getValueText(elem), uri, gStrings.linkX, ""]);  }  return NodeFilter.FILTER_ACCEPT;}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/5d3563a7c40904d70b6812a01cdd75321d6e69d9/pageInfo.js/buggy/browser/base/content/pageInfo.js