Bug 747668. (Hv1a) XPFE autocomplete.xml: Implement nsIAutoCompleteInput.textValue. r=neil.
authorSerge Gautherie <sgautherie.bz@free.fr>
Wed, 30 May 2012 20:06:17 +0200
changeset 95314 f28d1ec8bd330a52f192eceb973472a96462ef77
parent 95313 4c68e77d89d8b0c0599c043036f5fb2a1fab3b43
child 95315 e89ed404ebe505dc002b121b201ad82333827c12
push id10062
push usereakhgari@mozilla.com
push dateThu, 31 May 2012 02:43:36 +0000
treeherdermozilla-inbound@7edd4b899696 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersneil
bugs747668
milestone15.0a1
first release with
nightly linux32
f28d1ec8bd33 / 15.0a1 / 20120530132235 / files
nightly linux64
f28d1ec8bd33 / 15.0a1 / 20120530132235 / files
nightly mac
f28d1ec8bd33 / 15.0a1 / 20120530132235 / files
nightly win32
f28d1ec8bd33 / 15.0a1 / 20120530132235 / files
nightly win64
f28d1ec8bd33 / 15.0a1 / 20120530132235 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 747668. (Hv1a) XPFE autocomplete.xml: Implement nsIAutoCompleteInput.textValue. r=neil. DONTBUILD (npotb).
xpfe/components/autocomplete/resources/content/autocomplete.xml
--- a/xpfe/components/autocomplete/resources/content/autocomplete.xml
+++ b/xpfe/components/autocomplete/resources/content/autocomplete.xml
@@ -146,16 +146,20 @@
       <property name="timeout"
                 onset="this.setAttribute('timeout', val); return val;"
                 onget="return parseInt(this.getAttribute('timeout')) || 0;"/>
 
       <property name="searchParam"
                 onget="return this.getAttribute('autocompletesearchparam') || '';"
                 onset="this.setAttribute('autocompletesearchparam', val); return val;"/>
 
+      <property name="textValue"
+                onget="return this.value;"
+                onset="this.setTextValue(val); return val;"/>
+
       <method name="onSearchBegin">
         <body><![CDATA[
           this._fireEvent("searchbegin");
         ]]></body>
       </method>
 
       <method name="onSearchComplete">
         <body><![CDATA[
@@ -1283,19 +1287,20 @@
           this.noMatch = true;
         ]]></body>
       </method>
 
       <!--  -->
       <method name="setTextValue">
         <parameter name="aValue"/>
         <body><![CDATA[
+          this.value = aValue;
+
           // Completing a result should simulate the user typing the result,
           // so fire an input event.
-          this.value = aValue;
           var evt = document.createEvent("UIEvents");
           evt.initUIEvent("input", true, false, window, 0);
           var oldIgnoreInput = this.ignoreInputEvent;
           this.ignoreInputEvent = true;
           this.dispatchEvent(evt);
           this.ignoreInputEvent = oldIgnoreInput;
         ]]></body>
       </method>