Bug 1352620 - Don't have a hardcoded limit of 20 items in AutoCompletePopups. r?MattN draft
authorMike Conley <mconley@mozilla.com>
Tue, 16 May 2017 15:07:45 -0400
changeset 581328 04eff7307469aed63bee1238b0994b1dad2fe7e8
parent 580382 2fa6931995b23f1f39752385b6689dc6b8d94c1b
child 629535 d43fff61da0c09d02d929e8a968b6898d89ea90f
push id59824
push usermconley@mozilla.com
push dateFri, 19 May 2017 16:18:13 +0000
reviewersMattN
bugs1352620
milestone55.0a1
Bug 1352620 - Don't have a hardcoded limit of 20 items in AutoCompletePopups. r?MattN MozReview-Commit-ID: 6rZRi7kq3R7
browser/base/content/browser.xul
toolkit/content/widgets/autocomplete.xml
--- a/browser/base/content/browser.xul
+++ b/browser/base/content/browser.xul
@@ -140,17 +140,18 @@
 
     <!-- for search and content formfill/pw manager -->
 
     <panel type="autocomplete-richlistbox"
            id="PopupAutoComplete"
            noautofocus="true"
            hidden="true"
            overflowpadding="4"
-           norolluponanchor="true" />
+           norolluponanchor="true"
+           nomaxresults="true" />
 
     <!-- for search with one-off buttons -->
     <panel type="autocomplete" id="PopupSearchAutoComplete" noautofocus="true" hidden="true"/>
 
     <!-- for url bar autocomplete -->
     <panel type="autocomplete-richlistbox"
            id="PopupAutoCompleteRichResult"
            noautofocus="true"
--- a/toolkit/content/widgets/autocomplete.xml
+++ b/toolkit/content/widgets/autocomplete.xml
@@ -1193,18 +1193,24 @@ extends="chrome://global/content/binding
           this._appendCurrentResult(reason);
         ]]>
         </body>
       </method>
 
       <property name="maxResults" readonly="true">
         <getter>
           <![CDATA[
-            // this is how many richlistitems will be kept around
-            // (note, this getter may be overridden)
+            // This is how many richlistitems will be kept around.
+            // Note, this getter may be overridden, or instances
+            // can have the nomaxresults attribute set to have no
+            // limit.
+            if (this.getAttribute("nomaxresults") == "true") {
+              return Infinity;
+            }
+
             return 20;
           ]]>
         </getter>
       </property>
 
       <property name="_matchCount" readonly="true">
         <getter>
           <![CDATA[