Bug 707039. (Av1) XPFE autocomplete.xml: Rename openResultPopup()/closeResultPopup() to openPopup()/closePopup(). r=neil.
authorSerge Gautherie <sgautherie.bz@free.fr>
Thu, 05 Jan 2012 04:06:19 +0100
changeset 83765 5af79a8f877e7dea6aadb587694cee15c9aadb74
parent 83764 0cdaf07730732e1a2523d8fbed9810de3da4d7a6
child 83766 34cbeb81ea8e86d6dc8dd3584bfd25e7d81cb83f
push id21791
push usersgautherie.bz@free.fr
push dateThu, 05 Jan 2012 03:08:35 +0000
treeherdermozilla-central@34cbeb81ea8e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersneil
bugs707039
milestone12.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 707039. (Av1) XPFE autocomplete.xml: Rename openResultPopup()/closeResultPopup() to openPopup()/closePopup(). r=neil. DONTBUILD (NPOMCB).
xpfe/components/autocomplete/resources/content/autocomplete.xml
--- a/xpfe/components/autocomplete/resources/content/autocomplete.xml
+++ b/xpfe/components/autocomplete/resources/content/autocomplete.xml
@@ -299,17 +299,17 @@
 
       <field name="mMenuBarListener"><![CDATA[
         ({
           self: this,
           handleEvent: function(aEvent) {
             try {
               this.self.finishAutoComplete(false, false, aEvent);
               this.self.clearTimer();
-              this.self.closeResultPopup();
+              this.self.closePopup();
             } catch (e) {
               window.top.removeEventListener("DOMMenuBarActive", this, true);
             }
           }
         })
       ]]></field>
 
       <field name="mAutoCompleteSession"><![CDATA[
@@ -609,17 +609,17 @@
       </method>
 
       <!--  -->
       <method name="startLookup">
         <body><![CDATA[
           var str = this.currentSearchString;
           if (!str) {
             this.clearResults(false);
-            this.closeResultPopup();
+            this.closePopup();
             return;
           }
 
           this.isSearching = true;
           this.mFirstReturn = true;
           this.mSessionReturns = this.sessionCount;
           this.mFailureItems = 0;
           this.mDefaultMatchFilled = false; // clear out our prefill state.
@@ -688,28 +688,28 @@
             ++this.mFailureItems;
           
           if (this.mFirstReturn) {
             if (this.view.mTree)
               this.view.mTree.beginUpdateBatch();
             this.clearResultElements(false); // clear results, but don't repaint yet
           }
 
-          // always call openResultPopup...we may not have opened it
+          // always call openPopup...we may not have opened it
           // if a previous search session didn't return enough search results.
           // it's smart and doesn't try to open itself multiple times...
           // be sure to add our result elements before calling openResultPopuup as we need
           // to know the total # of results found so far.
           this.addResultElements(aResults, this.mLastResults[aSessionName]);
           this.mLastResults[aSessionName] = aResults;
 
           this.autoFillInput(aSessionName, aResults, false);
           if (this.mFirstReturn && this.view.mTree)
             this.view.mTree.endUpdateBatch();
-          this.openResultPopup();
+          this.openPopup();
           this.mFirstReturn = false;
          
           // if this is the last session to return... 
           if (this.mSessionReturns == 0) 
             this.postSearchCleanup();
                
           if (this.mFinishAfterSearch)
             this.finishAutoComplete(false, this.mFireAfterSearch, null);
@@ -720,19 +720,19 @@
            to be displayed. If all searches have failed, clear the list
            and close the popup -->
       <method name="searchFailed">
         <body><![CDATA[
           // if all searches are done and they all failed...
           if (this.mSessionReturns == 0 && this.getResultCount() == 0) {
             if (this.minResultsForPopup == 0) {
               this.clearResults(true); // clear data and repaint empty
-              this.openResultPopup();
+              this.openPopup();
             } else {
-              this.closeResultPopup(); 
+              this.closePopup(); 
             }
           }
 
           // if it's the last session to return, time to clean up...
           if (this.mSessionReturns == 0)
             this.postSearchCleanup();
         ]]></body>
       </method>
@@ -833,17 +833,17 @@
               }
             }
 
             this.stopLookup();
 
             if (!this.noMatch)
               this.autoComplete();
 
-            this.closeResultPopup();
+            this.closePopup();
           }
           
           this.mNeedToComplete = false;
           this.clearTimer();
 
           if (aFireTextCommand)
             this._fireEvent("textentered", this.userAction, aTriggeringEvent);
         ]]></body>
@@ -870,17 +870,17 @@
           }
 
           if (!this.noMatch)
             this.autoComplete();
 
           this.mNeedToFinish = false;
           this.mNeedToComplete = false;
           
-          this.closeResultPopup();
+          this.closePopup();
 
           this.currentSearchString = "";
 
           if (errItem)
             this._fireEvent("errorcommand", errItem);
           this._fireEvent("textentered", "clicking");
         ]]></body>
       </method>
@@ -971,36 +971,36 @@
               if (this.resultsPopup.selectedIndex != -1 && 
                   this.getSessionStatusAt(this.resultsPopup.selectedIndex) ==
                   Components.interfaces.nsIAutoCompleteStatus.failureItems) {
                 errItem = this.getResultAt(this.resultsPopup.selectedIndex);
               }
 
               killEvent = this.mMenuOpen;
               this.finishAutoComplete(true, true, aEvent);
-              this.closeResultPopup();
+              this.closePopup();
               if (errItem) {
                   this._fireEvent("errorcommand", errItem);
               }
               break;
 
             case KeyEvent.DOM_VK_ESCAPE:
               this.clearTimer();
               killEvent = this.mMenuOpen;
               this.undoAutoComplete();
-              this.closeResultPopup();
+              this.closePopup();
               break;
   
             case KeyEvent.DOM_VK_LEFT:
             case KeyEvent.DOM_VK_RIGHT:
             case KeyEvent.DOM_VK_HOME:
             case KeyEvent.DOM_VK_END:
               this.finishAutoComplete(true, false, aEvent);
               this.clearTimer();
-              this.closeResultPopup();
+              this.closePopup();
               break;
 
             case KeyEvent.DOM_VK_DOWN:
               if (!aEvent.altKey) {
                 this.clearTimer();
                 killEvent = this.keyNavigation(aEvent);
                 break;
               }
@@ -1034,17 +1034,17 @@
         ]]></body>
       </method>
 
       <!--  -->
       <method name="processStartComposition">
         <body><![CDATA[
           this.finishAutoComplete(false, false, null);
           this.clearTimer();
-          this.closeResultPopup();
+          this.closePopup();
         ]]></body>
       </method>
 
       <!--  -->
       <method name="keyNavigation">
         <parameter name="aEvent"/>
         <body><![CDATA[
           var k = aEvent.keyCode;
@@ -1068,17 +1068,17 @@
               if (this.currentSearchString != this.value) {
                  this.processInput();
                  return true;
               }
               if (this.view.rowCount < this.minResultsForPopup)
                 return true; // used to be false, see above
 
               this.mNeedToFinish = true;
-              this.openResultPopup();
+              this.openPopup();
               return true;
             }
             
             this.userAction = "scrolling";
             this.mNeedToComplete = false;
             
             var reverse = k == KeyEvent.DOM_VK_TAB && aEvent.shiftKey ||
                           k == KeyEvent.DOM_VK_UP ||
@@ -1160,32 +1160,32 @@
             }
           } 
         ]]></body>
       </method>
 
       <!-- ::::::::::::: popup and tree ::::::::::::: -->
 
       <!--  -->
-      <method name="openResultPopup">
+      <method name="openPopup">
         <body><![CDATA[
           if (!this.mMenuOpen && this.focused &&
                (this.getResultCount() >= this.minResultsForPopup
                 || this.mFailureItems)) {
             var w = this.boxObject.width;
             if (w != this.resultsPopup.boxObject.width)
               this.resultsPopup.setAttribute("width", w);
             this.resultsPopup.showPopup(this, -1, -1, "popup", "bottomleft", "topleft");
             this.mMenuOpen = true;
           }
         ]]></body>
       </method>
 
       <!--  -->
-      <method name="closeResultPopup">
+      <method name="closePopup">
         <body><![CDATA[
           if (this.resultsPopup && this.mMenuOpen) {
             this.resultsPopup.hidePopup();
             this.mMenuOpen = false;
           }
         ]]></body>
       </method>