Bug 1557978 - adapt to bug 1556561 removing <children> from the autocomplete binding. r=Paenglab
authorMagnus Melin <mkmelin+mozilla@iki.fi>
Sun, 09 Jun 2019 15:24:31 +0300
changeset 35811 9b9946de7fe3ca48a02056516509255dd1a1308a
parent 35810 62dc416dcabffecc6be166b4aca777ed2d2ef533
child 35812 0630127824af061c74cb5792477acf666f8c6cd6
push id392
push userclokep@gmail.com
push dateMon, 02 Sep 2019 20:17:19 +0000
reviewersPaenglab
bugs1557978, 1556561
Bug 1557978 - adapt to bug 1556561 removing <children> from the autocomplete binding. r=Paenglab
editor/ui/dialogs/content/EdImageProps.xul
editor/ui/dialogs/content/EdLinkProps.xul
mail/base/content/mainMailToolbox.inc.xul
mail/base/content/messenger.xul
mail/base/content/search.xml
mail/components/addrbook/content/abEditListDialog.xul
mail/components/addrbook/content/abMailListDialog.xul
mail/components/im/content/chat-messenger.inc.xul
--- a/editor/ui/dialogs/content/EdImageProps.xul
+++ b/editor/ui/dialogs/content/EdImageProps.xul
@@ -39,23 +39,18 @@
     <tabpanels>
 #include edImage.inc.xul
       <vbox>
         <spacer class="spacer"/>
         <vbox id="LinkLocationBox">
           <label control="hrefInput"
                  accesskey="&LinkURLEditField2.accessKey;"
                  width="1">&LinkURLEditField2.label;</label>
-          <textbox id="hrefInput" type="autocomplete"
-                   autocompletesearch="unifiedcomplete" timeout="50" maxrows="6"
-                   class="uri-element padded" oninput="ChangeLinkLocation();">
-            <menupopup class="autocomplete-history-popup"
-                       popupalign="topleft" popupanchor="bottomleft"
-                       oncommand="this.parentNode.value = event.target.getAttribute('label'); ChangeLinkLocation();"/>
-          </textbox>
+          <textbox id="hrefInput" type="text"
+                   class="uri-element padded" oninput="ChangeLinkLocation();"/>
           <hbox align="center">
             <checkbox id="MakeRelativeLink"
                       for="hrefInput"
                       label="&makeUrlRelative.label;"
                       accesskey="&makeUrlRelative.accessKey;"
                       oncommand="MakeInputValueRelativeOrAbsolute(this);"
                       tooltiptext="&makeUrlRelative.tooltip;"/>
             <spacer flex="1"/>
--- a/editor/ui/dialogs/content/EdLinkProps.xul
+++ b/editor/ui/dialogs/content/EdLinkProps.xul
@@ -35,23 +35,18 @@
       </vbox>
     </groupbox>
 
     <groupbox id="LinkURLBox"><label class="header">&LinkURLBox.label;</label>
       <vbox id="LinkLocationBox">
         <label control="hrefInput"
                accesskey="&LinkURLEditField2.accessKey;"
                width="1">&LinkURLEditField2.label;</label>
-        <textbox id="hrefInput" type="autocomplete"
-                 autocompletesearch="unifiedcomplete" timeout="50" maxrows="6"
-                 class="uri-element padded" oninput="ChangeLinkLocation();">
-          <menupopup class="autocomplete-history-popup"
-                     popupalign="topleft" popupanchor="bottomleft"
-                     oncommand="this.parentNode.value = event.target.getAttribute('label'); ChangeLinkLocation();"/>
-        </textbox>
+        <textbox id="hrefInput" type="text"
+                 class="uri-element padded" oninput="ChangeLinkLocation();"/>
         <hbox align="center">
           <checkbox id="MakeRelativeLink"
                     for="hrefInput"
                     label="&makeUrlRelative.label;"
                     accesskey="&makeUrlRelative.accessKey;"
                     oncommand="MakeInputValueRelativeOrAbsolute(this);"
                     tooltiptext="&makeUrlRelative.tooltip;"/>
           <spacer flex="1"/>
--- a/mail/base/content/mainMailToolbox.inc.xul
+++ b/mail/base/content/mainMailToolbox.inc.xul
@@ -319,41 +319,39 @@
                    tooltiptext="&appmenuButton1.tooltip;"/>
 #ifdef MAIN_WINDOW
     <!-- gloda search widget; provides global (message) searching.  -->
     <toolbaritem id="gloda-search" insertafter="button-stop"
                  title="&glodaSearch.title;"
                  align="center"
                  flex="1"
                  class="chromeclass-toolbar-additional">
+        <!-- Mimic the search/clear buttons of the standard search textbox,
+             but adjust for the reality that clear doesn't make much sense
+             since gloda results only show in a tab and the idiom for closing
+             tabs is closing the tab.  Our binding does process escape to
+             clear the box, if people want to clear it that way...
+             -->
+        <hbox>
+          <image class="gloda-search-icon"/>
+        </hbox>
         <textbox id="searchInput"
                  class="searchBox"
                  flex="1"
                  type="glodacomplete"
                  searchbutton="true"
                  autocompletesearch="gloda"
                  autocompletepopup="PopupGlodaAutocomplete"
                  autocompletesearchparam="global"
                  timeout="200"
                  maxlength="192"
                  placeholder=""
                  emptytextbase="&search.label.base1;"
                  keyLabelNonMac="&search.keyLabel.nonmac;"
-                 keyLabelMac="&search.keyLabel.mac;"
-                 >
-          <!-- Mimic the search/clear buttons of the standard search textbox,
-               but adjust for the reality that clear doesn't make much sense
-               since gloda results only show in a tab and the idiom for closing
-               tabs is closing the tab.  Our binding does process escape to
-               clear the box, if people want to clear it that way...
-               -->
-          <hbox>
-            <image class="gloda-search-icon"/>
-          </hbox>
-        </textbox>
+                 keyLabelMac="&search.keyLabel.mac;"/>
     </toolbaritem>
 #endif
     <toolbarbutton id="button-compact" class="toolbarbutton-1"
                    insertafter="button-mark"
                    label="&compactButton.label;"
                    tooltiptext="&compactButton.tooltip;"
                    oncommand="goDoCommand('button_compact');"
                    observes="button_compact"/>
--- a/mail/base/content/messenger.xul
+++ b/mail/base/content/messenger.xul
@@ -758,33 +758,32 @@
 
     <vbox id="glodaTab" collapsed="true">
       <vbox flex="1" class="chromeTabInstance">
         <vbox class="contentTabToolbox">
           <hbox class="glodaTabToolbar inline-toolbar chromeclass-toolbar" flex="1">
             <spacer flex="1" />
             <spacer flex="1" />
             <hbox flex="1" class="remote-gloda-search-container">
+              <hbox>
+                <image class="gloda-search-icon" />
+              </hbox>
               <textbox class="remote-gloda-search searchBox"
                        flex="1"
                        type="glodacomplete"
                        searchbutton="true"
                        autocompletesearch="gloda"
                        autocompletepopup="PopupGlodaAutocomplete"
                        autocompletesearchparam="global"
                        timeout="200"
                        maxlength="192"
                        placeholder=""
                        emptytextbase="&search.label.base1;"
                        keyLabelNonMac="&search.keyLabel.nonmac;"
-                       keyLabelMac="&search.keyLabel.mac;">
-                <hbox>
-                  <image class="gloda-search-icon" />
-                </hbox>
-              </textbox>
+                       keyLabelMac="&search.keyLabel.mac;"/>
             </hbox>
           </hbox>
         </vbox>
         <iframe flex="1"/>
       </vbox>
     </vbox>
     <vbox id="preferencesTab" collapsed="true">
       <vbox flex="1">
--- a/mail/base/content/search.xml
+++ b/mail/base/content/search.xml
@@ -73,18 +73,19 @@
               .wrappedJSObject;
           Services.obs.addObserver(this, "autocomplete-did-enter-text");
 
           this.glodaEnabled =
             Services.prefs.getBoolPref("mailnews.database.global.indexer.enabled");
           this.collapsed = !this.glodaEnabled;
 
           // make sure we set our emptytext here from the get-go
-        if (this.hasAttribute("placeholder"))
-          this.placeholder = this.getAttribute("placeholder");
+          if (this.hasAttribute("placeholder")) {
+            this.placeholder = this.getAttribute("placeholder");
+          }
         } catch (e) {
           let { logException } = ChromeUtils.import("resource:///modules/errUtils.js");
           logException(e, true);
         }
       ]]></constructor>
 
       <destructor>
         <![CDATA[
--- a/mail/components/addrbook/content/abEditListDialog.xul
+++ b/mail/components/addrbook/content/abEditListDialog.xul
@@ -53,25 +53,24 @@
     <label control="addressCol1#1"
            value="&AddressTitle.label;"
            accesskey="&AddressTitle.accesskey;"/>
     <spacer style="height:0.1em"/>
 
     <richlistbox id="addressingWidget" style="height: 15em;" onclick="awClickEmptySpace(event.target, true)">
       <richlistitem class="addressingWidgetItem" allowevents="true">
         <hbox class="addressingWidgetCell" flex="1">
+          <image onclick="this.nextElementSibling.select();" class="person-icon"/>
           <textbox id="addressCol1#1" class="plain textbox-addressingWidget uri-element"
                    type="autocomplete" flex="1"
                    autocompletesearch="addrbook ldap"
                    autocompletesearchparam="{}" timeout="300" maxrows="4"
                    completedefaultindex="true" forcecomplete="true"
                    completeselectedindex="true"
                    minresultsforpopup="3"
                    ontextentered="awRecipientTextCommand(param, this); if (param &amp;&amp; this.value != '') param.preventDefault();"
                    onkeydown="awRecipientKeyDown(event, this);"
-                   onclick="awNotAnEmptyArea(event);">
-            <image onclick="this.parentNode.select();" class="person-icon"/>
-          </textbox>
+                   onclick="awNotAnEmptyArea(event);"/>
         </hbox>
       </richlistitem>
     </richlistbox>
   </vbox>
 </dialog>
--- a/mail/components/addrbook/content/abMailListDialog.xul
+++ b/mail/components/addrbook/content/abMailListDialog.xul
@@ -64,25 +64,24 @@
     <label control="addressCol1#1"
            value="&AddressTitle.label;"
            accesskey="&AddressTitle.accesskey;"/>
     <spacer style="height:0.1em"/>
 
     <richlistbox id="addressingWidget" style="height: 15em;" onclick="awClickEmptySpace(event.target, true)">
       <richlistitem class="addressingWidgetItem" allowevents="true">
         <hbox class="addressingWidgetCell" flex="1">
+          <image onclick="this.nextElementSibling.select();" class="person-icon"/>
           <textbox id="addressCol1#1" class="plain textbox-addressingWidget uri-element"
                    type="autocomplete" flex="1"
                    autocompletesearch="addrbook ldap"
                    autocompletesearchparam="{}" timeout="300" maxrows="4"
                    completedefaultindex="true" forcecomplete="true"
                    completeselectedindex="true"
                    minresultsforpopup="3"
                    ontextentered="awRecipientTextCommand(param, this); if (param &amp;&amp; this.value != '') param.preventDefault();"
                    onkeydown="awRecipientKeyDown(event, this);"
-                   onclick="awNotAnEmptyArea(event);">
-            <image onclick="this.parentNode.select();" class="person-icon"/>
-          </textbox>
+                   onclick="awNotAnEmptyArea(event);"/>
         </hbox>
       </richlistitem>
     </richlistbox>
   </vbox>
 </dialog>
--- a/mail/components/im/content/chat-messenger.inc.xul
+++ b/mail/components/im/content/chat-messenger.inc.xul
@@ -53,41 +53,39 @@
                              label="&chatAccountsButton.label;"
                              oncommand="openIMAccountMgr()"/>
 
               <toolbaritem id="gloda-im-search" insertafter="button-stop"
                            title="&amp;glodaSearch.title;"
                            align="center"
                            flex="1"
                            class="chromeclass-toolbar-additional">
+                <!-- Mimic the search/clear buttons of the standard search textbox,
+                     but adjust for the reality that clear doesn't make much sense
+                     since gloda results only show in a tab and the idiom for closing
+                     tabs is closing the tab.  Our binding does process escape to
+                     clear the box, if people want to clear it that way...
+                  -->
+                <hbox>
+                  <image class="gloda-search-icon"/>
+                </hbox>
                 <textbox id="IMSearchInput"
                          class="searchBox"
                          flex="1"
                          type="glodacomplete"
                          searchbutton="true"
                          autocompletesearch="gloda"
                          autocompletepopup="PopupGlodaAutocomplete"
                          autocompletesearchparam="global"
                          timeout="200"
                          maxlength="192"
                          placeholder=""
                          emptytextbase="&search.label.base1;"
                          keyLabelNonMac="&search.keyLabel.nonmac;"
-                         keyLabelMac="&search.keyLabel.mac;"
-                         >
-                  <!-- Mimic the search/clear buttons of the standard search textbox,
-                       but adjust for the reality that clear doesn't make much sense
-                       since gloda results only show in a tab and the idiom for closing
-                       tabs is closing the tab.  Our binding does process escape to
-                       clear the box, if people want to clear it that way...
-                    -->
-                  <hbox>
-                    <image class="gloda-search-icon"/>
-                  </hbox>
-                </textbox>
+                         keyLabelMac="&search.keyLabel.mac;"/>
               </toolbaritem>
               <toolbarbutton is="toolbarbutton-appmenu" id="button-chat-appmenu"
                              type="menu"
                              class="toolbarbutton-1 button-appmenu"
                              label="&appmenuButton.label;"
                              tooltiptext="&appmenuButton1.tooltip;"/>
             </toolbarpalette>
             <toolbarset id="customChatToolbars" context="chat-toolbar-context-menu"/>