Bug 1353711 - Changing reference to this.AppConstants to parent AppConstants, removing local AppConstants field draft
authorRyanBRiley <ryan.b.riley@colorado.edu>
Thu, 13 Apr 2017 18:45:00 -0600
changeset 562426 84d858bdd3992619da5e9a4d585af940ff72e2e4
parent 562355 3243c8fc3ce7831dda843b60d6bb2d7e4acf1fd4
child 624242 b4fe769a82e2ff40528fbd6de055fda216b7fec8
push id54029
push userbmo:ryan.b.riley@colorado.edu
push dateFri, 14 Apr 2017 00:48:26 +0000
bugs1353711
milestone55.0a1
Bug 1353711 - Changing reference to this.AppConstants to parent AppConstants, removing local AppConstants field MozReview-Commit-ID: Hgo4FjreOos
browser/components/search/content/search.xml
--- a/browser/components/search/content/search.xml
+++ b/browser/components/search/content/search.xml
@@ -926,20 +926,16 @@
         <xul:treecols anonid="treecols">
           <xul:treecol id="treecolAutoCompleteValue" class="autocomplete-treecol" flex="1" overflow="true"/>
         </xul:treecols>
         <xul:treechildren class="autocomplete-treebody searchbar-treebody"/>
       </xul:tree>
       <xul:vbox anonid="search-one-off-buttons" class="search-one-offs"/>
     </content>
     <implementation>
-      <field name="AppConstants" readonly="true">
-        (Components.utils.import("resource://gre/modules/AppConstants.jsm", {})).AppConstants;
-      </field>
-
       <method name="openAutocompletePopup">
         <parameter name="aInput"/>
         <parameter name="aElement"/>
         <body><![CDATA[
           // initially the panel is hidden
           // to avoid impacting startup / new window performance
           aInput.popup.hidden = false;
 
@@ -978,17 +974,17 @@
             // Handle search bar popup clicks
             var search = controller.getValueAt(this.selectedIndex);
 
             // open the search results according to the clicking subtlety
             var where = whereToOpenLink(aEvent, false, true);
             let params = {};
 
             // But open ctrl/cmd clicks on autocomplete items in a new background tab.
-            let modifier = this.AppConstants.platform == "macosx" ?
+            let modifier = AppConstants.platform == "macosx" ?
                            aEvent.metaKey :
                            aEvent.ctrlKey;
             if (where == "tab" && (aEvent instanceof MouseEvent) &&
                 (aEvent.button == 1 || modifier))
               params.inBackground = true;
 
             // leave the popup open for background tab loads
             if (!(where == "tab" && params.inBackground)) {