rem: else if (elem.hasAttributeNS(XLinkNS, "href")) linkView.addRow([getValueText(elem), ioService.newURI(elem.getAttributeNS(XLinkNS, "href"), null, elem.baseURI).spec, gStrings.linkX, ""]);  
add: else if (elem.hasAttributeNS(XLinkNS, "href")) { var ioService = Components.classes["@mozilla.org/network/io-service;1"] .getService(Components.interfaces.nsIIOService); url = elem.getAttributeNS(XLinkNS, "href"); try { var baseURI = ioService.newURI(elem.baseURI, elem.ownerDocument.characterSet, null); url = ioService.newURI(href, elem.ownerDocument.characterSet, baseURI).spec; } catch (e) {} linkView.addRow([getValueText(elem), url, gStrings.linkX, ""]); } 
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 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)        {          linkView.addRow([elem.value || getValueText(elem) || gStrings.linkSubmit, elem.form.action, gStrings.linkSubmission, elem.form.target]);        }        else          linkView.addRow([elem.value || getValueText(elem) || gStrings.linkSubmit, '', gStrings.linkSubmission, '']);    }  }  else if (elem instanceof nsIFormElement)  {    formView.addRow([elem.name, elem.method, elem.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"))      linkView.addRow([getValueText(elem),                       ioService.newURI(elem.getAttributeNS(XLinkNS, "href"), null, elem.baseURI).spec,                       gStrings.linkX,                       ""]);  return NodeFilter.FILTER_ACCEPT;}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/56f76fe040be7552643b9bb88deaff70ad1aeb2b/pageInfo.js/clean/suite/browser/pageInfo.js