rem: highlightDoc(color, word, win.frames[i]); 
add: highlightDoc(highBackColor, highTextColor, word, win.frames[i]); 
context: function highlightDoc(color, word, win){  if (!win)    win = window._content;   for (var i = 0; win.frames && i < win.frames.length; i++) {    highlightDoc(color, word, win.frames[i]);  }  var doc = win.document;  if (!document)    return;  if (!("body" in doc))    return;  var body = doc.body;    var count = body.childNodes.length;  searchRange = doc.createRange();  startPt = doc.createRange();  endPt = doc.createRange();  searchRange.setStart(body, 0);  searchRange.setEnd(body, count);  startPt.setStart(body, 0);  startPt.setEnd(body, 0);  endPt.setStart(body, count);  endPt.setEnd(body, count);  if (!color) {    // Remove highlighting.  We use the find API again rather than    // searching for our span elements by id so that we gain access to the    // anonymous content that nsIFind searches.    if (!gLastHighlightString)      return;    var retRange = null;    var finder = Components.classes["@mozilla.org/embedcomp/rangefind;1"].createInstance()                         .QueryInterface(Components.interfaces.nsIFind);    while ((retRange = finder.Find(gLastHighlightString, searchRange,startPt, endPt))) {      var startContainer = retRange.startContainer;      var elem = null;      try {        elem = startContainer.parentNode;      }      catch (e) { }      if (elem && elem.getAttribute("id") == "__firefox-findbar-search-id") {        var child = null;        var docfrag = doc.createDocumentFragment();        var next = elem.nextSibling;        var parent = elem.parentNode;        while ((child = elem.firstChild)) {          docfrag.appendChild(child);        }        startPt = doc.createRange();        startPt.setStartAfter(elem);        parent.removeChild(elem);        parent.insertBefore(docfrag, next);      }      else {        // Somehow we didn't highlight this instance; just skip it.        startPt = doc.createRange();        startPt.setStart(retRange.endContainer, retRange.endOffset);      }      startPt.collapse(true);    }    return;  }  var baseNode = doc.createElement("span");  baseNode.setAttribute("style", "background-color: " + color + ";");  baseNode.setAttribute("id", "__firefox-findbar-search-id");  highlightText(word, baseNode);}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/53e651300a87508a741951ee759634d700f930c8/findBar.js/clean/toolkit/components/typeaheadfind/content/findBar.js