Bug 1328557 - Searchbar regression: No separator between search suggestions and form history entries r=IanN a=IanN
authorPhilip Chee <philip.chee@gmail.com>
Sun, 22 Jan 2017 23:47:02 +0800
changeset 21040 8ea39bd5a173bdcf509b274056c2c1ebd1fb79d3
parent 21039 58012bab36b2ada838ab83d6ec4f805b345c4a6f
child 21041 c789fe71e02c0b1396da5e8c5c1107a1598dfad4
push id12772
push userphilip.chee@gmail.com
push dateSun, 22 Jan 2017 15:47:28 +0000
treeherdercomm-central@8ea39bd5a173 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersIanN, IanN
bugs1328557, 1311189, 1296638, 1300547, 344536, 1008182, 1239319
Bug 1328557 - Searchbar regression: No separator between search suggestions and form history entries r=IanN a=IanN Fix fallout from Bug 1311189, Bug 1296638, and Bug 1300547. Bug 1311189 - No separator between datalist and form history entries with richlistbox implementation [Toolkit] Bug 1296638 - Switch toolkit Form Autocomplete popup from using a <xul:tree> to using a <xul:richlistbox> Bug 1300547 - Suggestion list dropdown with suggestions not shown [SeaMonkey] Minor search widget tweaks (parity-firefox): Bug 344536 - Limit the number of history items displayed the search bar history dropdown, so that some suggestions are always visible. Bug 1008182 - remove the delay for searchbar autocomplete Bug 1239319 - use input types properly for search and url bar to get better OSK support on Windows
suite/browser/navigator.xul
suite/common/search/search-panel.xul
suite/common/search/search.xml
suite/themes/classic/communicator/search/search.css
suite/themes/classic/communicator/search/searchbar.css
suite/themes/classic/navigator/navigator.css
suite/themes/modern/communicator/search/search.css
suite/themes/modern/communicator/search/searchbar.css
suite/themes/modern/navigator/navigator.css
--- a/suite/browser/navigator.xul
+++ b/suite/browser/navigator.xul
@@ -102,17 +102,17 @@
 
     <menupopup id="toolbar-context-menu"/>
 
     <menupopup id="feedsPopup" popupanchor="bottomright" popupalign="topright"
                onpopupshowing="window.XULBrowserWindow.populateFeeds(this);"
                oncommand="subscribeToFeed(event.target.statusText, event);"
                onclick="checkForMiddleClick(this, event);"/>
 
-    <!-- for search and content formfill/pw manager -->
+    <!-- for content formfill and password manager -->
     <panel id="PopupAutoComplete"
            type="autocomplete-richlistbox"
            noautofocus="true"
            hidden="true"/>
 
     <!-- for invalid form error message -->
     <panel id="invalid-form-popup" noautofocus="true" hidden="true" level="parent">
       <description/>
--- a/suite/common/search/search-panel.xul
+++ b/suite/common/search/search-panel.xul
@@ -12,28 +12,35 @@
       xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
       onload="Startup();"
       elementtofocus="sidebar-search-text">
 
   <script type="application/javascript" src="chrome://global/content/globalOverlay.js"/>
   <script type="application/javascript" src="chrome://communicator/content/search/search-panel.js"/>
   <script type="application/javascript" src="chrome://communicator/content/utilityOverlay.js"/>
 
+    <popupset id="sidebarPopupset">
+      <panel id="PopupAutoComplete"
+             type="autocomplete"
+             noautofocus="true"/>
+    </popupset>
+
     <menulist id="sidebar-search-engines"
               oncommand="SelectEngine(this);"/>
 
     <hbox align="center">
       <textbox id="sidebar-search-text" flex="1"
                class="search-textbox padded"
                ontextentered="doSearch();"
                placeholder="&search.placeholder;"
                type="autocomplete"
+               inputtype="search"
+               autocompletepopup="PopupAutoComplete"
                autocompletesearch="search-autocomplete"
                autocompletesearchparam="searchbar-history"
-               timeout="250"
                maxrows="10"
                completeselectedindex="true"
                tabscrolling="true"/>
       <button id="searchButton" label="&search.button.label;"
               oncommand="doSearch();"/>
     </hbox>
     <button id="managerButton"
             label="&search.engineManager.label;"
--- a/suite/common/search/search.xml
+++ b/suite/common/search/search.xml
@@ -20,25 +20,29 @@
   <binding id="searchbar">
     <resources>
       <stylesheet src="chrome://communicator/content/search/searchbarBindings.css"/>
       <stylesheet src="chrome://communicator/skin/search/searchbar.css"/>
     </resources>
     <content>
       <xul:stringbundle src="chrome://communicator/locale/search/search.properties"
                         anonid="searchbar-stringbundle"/>
-
+      <!--
+      There is a dependency between "maxrows" attribute and
+      "SuggestAutoComplete._historyLimit" (nsSearchSuggestions.js). Changing
+      one of them requires changing the other one.
+      -->
       <xul:textbox class="searchbar-textbox"
                    anonid="searchbar-textbox"
                    type="autocomplete"
+                   inputtype="search"
                    flex="1"
-                   autocompletepopup="PopupAutoComplete"
+                   autocompletepopup="_child"
                    autocompletesearch="search-autocomplete"
                    autocompletesearchparam="searchbar-history"
-                   timeout="250"
                    maxrows="10"
                    completeselectedindex="true"
                    showcommentcolumn="true"
                    tabscrolling="true"
                    xbl:inherits="disabled">
         <xul:box>
           <xul:toolbarbutton class="plain searchbar-engine-button"
                              type="menu"
@@ -55,16 +59,19 @@
           </xul:toolbarbutton>
         </xul:box>
         <xul:hbox class="search-go-container">
           <xul:image class="search-go-button"
                      anonid="search-go-button"
                      onclick="handleSearchCommand(event);"
                      tooltiptext="&searchEndCap.label;"/>
         </xul:hbox>
+        <xul:panel anonid="searchPopupAutoComplete"
+                   type="autocomplete"
+                   noautofocus="true"/>
       </xul:textbox>
     </content>
 
     <implementation implements="nsIObserver, nsIBrowserSearchInitObserver, nsISearchInstallCallback">
       <constructor><![CDATA[
         if (this.parentNode.parentNode.localName == "toolbarpaletteitem")
           return;
 
--- a/suite/themes/classic/communicator/search/search.css
+++ b/suite/themes/classic/communicator/search/search.css
@@ -3,16 +3,16 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* ===== search.css =====================================================
    == Styles specific to the Search sidebar panel.
    ====================================================================== */
 
 @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
 
-.autocomplete-treebody::-moz-tree-cell(suggesthint) {
+.autocomplete-treebody::-moz-tree-cell(datalist-first) {
   border-top: 1px solid GrayText;
 }
 
 #sidebar-search-engines > .menulist-label-box > .menulist-icon {
   height: 16px;
   width: 16px;
 }
--- a/suite/themes/classic/communicator/search/searchbar.css
+++ b/suite/themes/classic/communicator/search/searchbar.css
@@ -2,16 +2,27 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 .searchbar-textbox {
   width: 6em;
   min-width: 6em;
 }
 
+/* ::::: search bar ::::: */
+
+.autocomplete-treebody::-moz-tree-cell-text(datalist-first, treecolAutoCompleteComment) {
+  color: GrayText;
+  font-size: smaller;
+}
+
+.autocomplete-treebody::-moz-tree-cell(datalist-first) {
+  border-top: 1px solid GrayText;
+}
+
 /* ::::: searchbar-engine-button ::::: */
 
 .toolbarbutton-icon {
   margin: 3px;
   height: 16px;
   width: 16px;
   list-style-image: url("chrome://global/skin/icons/folder-item.png");
   -moz-image-region: rect(0px, 16px, 16px, 0px);
--- a/suite/themes/classic/navigator/navigator.css
+++ b/suite/themes/classic/navigator/navigator.css
@@ -606,28 +606,16 @@ panel[nomatch="true"] > .autocomplete-se
   display: -moz-box;
 }
 
 toolbar[mode="text"] #search-button > .button-box > .button-icon,
 toolbar[mode="icons"] #search-button > .button-box > .button-text {
   display: none;
 }
 
-/* ::::: search bar ::::: */
-
-.autocomplete-treebody::-moz-tree-cell-text(suggesthint, treecolAutoCompleteComment),
-.autocomplete-treebody::-moz-tree-cell-text(suggestfirst, treecolAutoCompleteComment) {
-  color: GrayText;
-  font-size: smaller;
-}
-
-.autocomplete-treebody::-moz-tree-cell(suggesthint) {
-  border-top: 1px solid GrayText;
-}
-
 /* ::::: sidebar splitter ::::: */
 
 #sidebar-splitter {
   border-left: none;
   border-right: none;
   min-width: 5px;
 }
 
--- a/suite/themes/modern/communicator/search/search.css
+++ b/suite/themes/modern/communicator/search/search.css
@@ -3,16 +3,16 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* ===== search.css =====================================================
    == Styles specific to the Search sidebar panel.
    ====================================================================== */
 
 @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
 
-.autocomplete-treebody::-moz-tree-cell(suggesthint) {
+.autocomplete-treebody::-moz-tree-cell(datalist-first) {
   border-top: 1px solid #999999;
 }
 
 #sidebar-search-engines > .menulist-label-box > .menulist-icon {
   height: 16px;
   width: 16px;
 }
--- a/suite/themes/modern/communicator/search/searchbar.css
+++ b/suite/themes/modern/communicator/search/searchbar.css
@@ -2,16 +2,27 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 .searchbar-textbox {
   width: 6em;
   min-width: 6em;
 }
 
+/* ::::: search bar ::::: */
+
+.autocomplete-treebody::-moz-tree-cell-text(datalist-first, treecolAutoCompleteComment) {
+  color: #999999;
+  font-size: smaller;
+}
+
+.autocomplete-treebody::-moz-tree-cell(datalist-first) {
+  border-top: 1px solid #999999;
+}
+
 /* ::::: searchbar-engine-button ::::: */
 
 .toolbarbutton-icon {
   height: 16px;
   width: 16px;
   list-style-image: url("chrome://communicator/skin/directory/file-icon.gif");
 }
 
--- a/suite/themes/modern/navigator/navigator.css
+++ b/suite/themes/modern/navigator/navigator.css
@@ -770,28 +770,16 @@ panel[nomatch="true"] > .autocomplete-se
   font: message-box;
   font-weight: bold;
 }
 
 #search-button {
   list-style-image: url("chrome://global/skin/icons/search.gif");
 }
 
-/* ::::: search bar ::::: */
-
-.autocomplete-treebody::-moz-tree-cell-text(suggesthint, treecolAutoCompleteComment),
-.autocomplete-treebody::-moz-tree-cell-text(suggestfirst, treecolAutoCompleteComment) {
-  color: #999999;
-  font-size: smaller;
-}
-
-.autocomplete-treebody::-moz-tree-cell(suggesthint) {
-  border-top: 1px solid #999999;
-}
-
 /* ::::: navigator throbber ::::: */
 
 .toolbar-primary #throbber-box {
   margin: 0px 0px 2px;
 }
 
 /* ::::: personal toolbar ::::: */