mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
Bug 747668. (Iv2a) XPFE autocomplete.xml: Implement (nsIAutoCompleteInput) searchCount and getSearchAt(), Nits. r=Neil.
DONTBUILD (npotb).
This commit is contained in:
parent
8e64472f5c
commit
d714fbe57a
@ -151,6 +151,21 @@
|
||||
onget="return this.getAttribute('autocompletesearchparam') || '';"
|
||||
onset="this.setAttribute('autocompletesearchparam', val); return val;"/>
|
||||
|
||||
<property name="searchCount" readonly="true"
|
||||
onget="return this.sessionCount;"/>
|
||||
|
||||
<method name="getSearchAt">
|
||||
<parameter name="aIndex"/>
|
||||
<body><![CDATA[
|
||||
var idx = -1;
|
||||
for (var name in this.mSessions)
|
||||
if (++idx == aIndex)
|
||||
return name;
|
||||
|
||||
return null;
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<property name="textValue"
|
||||
onget="return this.value;"
|
||||
onset="this.setTextValue(val); return val;"/>
|
||||
@ -556,12 +571,11 @@
|
||||
<method name="getSession">
|
||||
<parameter name="aIndex"/>
|
||||
<body><![CDATA[
|
||||
var idx = 0;
|
||||
for (var name in this.mSessions) {
|
||||
if (idx == aIndex)
|
||||
var idx = -1;
|
||||
for (var name in this.mSessions)
|
||||
if (++idx == aIndex)
|
||||
return this.mSessions[name];
|
||||
++idx;
|
||||
}
|
||||
|
||||
return null;
|
||||
]]></body>
|
||||
</method>
|
||||
@ -580,7 +594,7 @@
|
||||
<parameter name="aName"/>
|
||||
<body><![CDATA[
|
||||
++this.sessionCount;
|
||||
var name = aName || "anon_"+this.sessionCount;
|
||||
var name = aName || ("anon_" + this.sessionCount);
|
||||
this.mSessions[name] = aSession;
|
||||
this.mListeners[name] = new (this.mAutoCompleteListener)(name);
|
||||
this.mLastResults[name] = null;
|
||||
|
Loading…
Reference in New Issue
Block a user