Bug 530629 - Add fastFind support to <editor> element. r=Neil

This commit is contained in:
aceman 2014-04-18 10:30:04 -04:00
parent 88cb135bdf
commit a3818da059

View File

@ -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;"/>