Bug 974258 Manually size autocomplete history popup to the autocomplete's width r=Ratty
☠☠ backed out by 8fb083fffb02 ☠ ☠
authorNeil Rashbrook <neil@parkwaycc.co.uk>
Fri, 21 Feb 2014 00:11:28 +0000
changeset 170271 ad851c771c047ad2f8f3db0745ef94284b9dc4af
parent 170270 97a62f515945228702daa2f1dc45f1d3b564f867
child 170272 a1574a6b05445dc7644649ddcf6d1cae34a7c831
push id270
push userpvanderbeken@mozilla.com
push dateThu, 06 Mar 2014 09:24:21 +0000
reviewersRatty
bugs974258
milestone30.0a1
Bug 974258 Manually size autocomplete history popup to the autocomplete's width r=Ratty DONTBUILD (SeaMonkey-specific code)
xpfe/components/autocomplete/resources/content/autocomplete.xml
--- a/xpfe/components/autocomplete/resources/content/autocomplete.xml
+++ b/xpfe/components/autocomplete/resources/content/autocomplete.xml
@@ -12,17 +12,17 @@
 
   <binding id="autocomplete" role="xulcombobox"
            extends="chrome://global/content/bindings/textbox.xml#textbox">
     <resources>
       <stylesheet src="chrome://global/content/autocomplete.css"/>
       <stylesheet src="chrome://global/skin/autocomplete.css"/>
     </resources>
 
-    <content sizetopopup="pref">
+    <content>
       <children includes="menupopup"/>
 
       <xul:hbox class="autocomplete-textbox-container" flex="1" align="center">
         <children includes="image|deck|stack|box">
           <xul:image class="autocomplete-icon" allowevents="true"/>
         </children>
 
         <xul:hbox class="textbox-input-box" flex="1" xbl:inherits="context,tooltiptext=inputtooltiptext">
@@ -1623,16 +1623,19 @@
   <binding id="history-dropmarker" extends="chrome://global/content/bindings/general.xml#dropmarker">
 
     <implementation>
       <method name="showPopup">
         <body><![CDATA[
           var textbox = document.getBindingParent(this);
           var kids = textbox.getElementsByClassName("autocomplete-history-popup");
           if (kids.item(0) && textbox.getAttribute("open") != "true") { // Open history popup
+            var w = textbox.boxObject.width;
+            if (w != kids[0].boxObject.width)
+              kids[0].width = w;
             kids[0].showPopup(textbox, -1, -1, "popup", "bottomleft", "topleft");
             textbox.setAttribute("open", "true");
           }
         ]]></body>
       </method>
     </implementation>
 
     <handlers>