%findBarDTD; %globalDTD; ]> null return this._findbar ? this._findbar : this._findbar = document.getBindingParent(this); 0 1 2 0 null "0" false null null null 0 6 150 null = 0; --x) this._unhookListenersAtIndex(x); } this.browser = null; var prefsvc = Components.classes["@mozilla.org/preferences-service;1"] .getService(Components.interfaces.nsIPrefBranch2); prefsvc.removeObserver("accessibility.typeaheadfind", this._observer); prefsvc.removeObserver("accessibility.typeaheadfind.linksonly", this._observer); prefsvc.removeObserver("accessibility.typeaheadfind.casesensitive", this._observer); ]]> = 0; i--) { if (shouldDelete[i]) { var r = fSelection.getRangeAt(i); fSelection.removeRange(r); } } // Remove listeners if no more highlights left if (fSelection.rangeCount == 0) this._removeEditorListeners(editor); ]]> 0) return selection.getRangeAt(0).toString(); var doc = win.document; // Bail now if document cannot contain highlighting if (!doc || !(doc instanceof HTMLDocument)) return null; // Check for highlighting in elements with independent // selection controllers if (this._editors) { for (var x = 0; x < this._editors.length; x++) { if (this._editors[x].document == doc) { var sel = this._editors[x].selectionController .getSelection(this._findSelection); return sel.getRangeAt(0).toString(); } } } // If we still haven't found highlighting, recursively check any // frames in the current window var hasHighlight = null; var i = 0; while (!hasHighlight && win.frames && i < win.frames.length) { hasHighlight = this._getHighlightedString(win.frames[i]); i++; } return hasHighlight; ]]> = 0; --x) { if (this._editors[x].document == doc) { sel = this._editors[x].selectionController .getSelection(this._findSelection); sel.removeAllRanges(); // We don't need to listen to this editor any more this._unhookListenersAtIndex(x); } } } return true; } return textFound; ]]> null textfield element is focused var inputType = elt.type; switch (inputType) { case "text": case "password": case "file": return false; } } else if (elt instanceof HTMLTextAreaElement || elt instanceof HTMLSelectElement || elt instanceof HTMLIsIndexElement || elt instanceof HTMLObjectElement || elt instanceof HTMLEmbedElement) return false; } // disable FAYT in about:config and about:blank to prevent FAYT // opening unexpectedly - to fix bugs 264562, 267150, 269712 var url = this.browser.currentURI.spec; if (url == "about:blank" || url == "about:config") return false; if (win) { try { var editingSession = win.QueryInterface(Components.interfaces.nsIInterfaceRequestor) .getInterface(Components.interfaces.nsIWebNavigation) .QueryInterface(Components.interfaces.nsIInterfaceRequestor) .getInterface(Components.interfaces.nsIEditingSession); if (editingSession.windowIsEditable(win)) return false; } catch (e) { // If someone built with composer disabled, we can't get an editing session. } } return true; ]]> this._selectionMaxLen) { var pattern = new RegExp("^(?:\\s*.){0," + this._selectionMaxLen + "}"); pattern.test(selText); selText = RegExp.lastMatch; } return selText.replace(/^\s+/, "") .replace(/\s+$/, "") .replace(/\s+/g, " ") .substr(0, this._selectionMaxLen); ]]>