mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 11:25:00 +00:00
Bug 530629 - Add fastFind support to <editor> element. r=Neil
This commit is contained in:
parent
302ba02d64
commit
992772e91f
@ -87,6 +87,45 @@
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
||||
<field name="_finder">null</field>
|
||||
<property name="finder" readonly="true">
|
||||
<getter><![CDATA[
|
||||
if (!this._finder) {
|
||||
if (!this.docShell)
|
||||
return null;
|
||||
|
||||
let Finder = Components.utils.import("resource://gre/modules/Finder.jsm", {}).Finder;
|
||||
this._finder = new Finder(this.docShell);
|
||||
}
|
||||
return this._finder;
|
||||
]]></getter>
|
||||
</property>
|
||||
|
||||
<field name="_fastFind">null</field>
|
||||
<property name="fastFind"
|
||||
readonly="true">
|
||||
<getter>
|
||||
<![CDATA[
|
||||
if (!this._fastFind) {
|
||||
if (!("@mozilla.org/typeaheadfind;1" in Components.classes))
|
||||
return null;
|
||||
|
||||
if (!this.docShell)
|
||||
return null;
|
||||
|
||||
this._fastFind = Components.classes["@mozilla.org/typeaheadfind;1"]
|
||||
.createInstance(Components.interfaces.nsITypeAheadFind);
|
||||
this._fastFind.init(this.docShell);
|
||||
}
|
||||
return this._fastFind;
|
||||
]]>
|
||||
</getter>
|
||||
</property>
|
||||
|
||||
<field name="_lastSearchString">null</field>
|
||||
<field name="_lastSearchHighlight">false</field>
|
||||
|
||||
<property name="editortype"
|
||||
onget="return this.getAttribute('editortype');"
|
||||
onset="this.setAttribute('editortype', val); return val;"/>
|
||||
|
Loading…
Reference in New Issue
Block a user