Bug Bug 420421 Fix display of autocomplete history dropmarker on Linux r=IanN
authorNeil Rashbrook <neil@parkwaycc.co.uk>
Sun, 13 Mar 2011 21:26:48 +0000
changeset 7341 64392a2ec60c5b55f59f9be20e2f964184198479
parent 7340 7fdea9ed43684510e956459881abff11356d5c97
child 7342 62f7bd45e71fa4acb4072c7758fff5a5dec3913f
push idunknown
push userunknown
push dateunknown
reviewersIanN
bugs420421
Bug Bug 420421 Fix display of autocomplete history dropmarker on Linux r=IanN
editor/ui/dialogs/content/EdDialogOverlay.xul
mailnews/compose/content/MsgAttachPage.xul
suite/browser/navigator.xul
suite/browser/urlbarBindings.xml
suite/common/communicator.css
suite/common/openLocation.xul
suite/themes/classic/navigator/navigator.css
--- a/editor/ui/dialogs/content/EdDialogOverlay.xul
+++ b/editor/ui/dialogs/content/EdDialogOverlay.xul
@@ -82,17 +82,17 @@
   accesskey = "&makeUrlRelative.accessKey;"
   oncommand = "MakeInputValueRelativeOrAbsolute(this);"
   tooltiptext = "&makeUrlRelative.tooltip;"/>
 
 <vbox id="LinkLocationBox">
   <label control="hrefInput" accesskey="&LinkURLEditField.accessKey;" width="1">&LinkURLEditField.label;</label>
   <textbox id="hrefInput" type="autocomplete"
            autocompletesearch="history" timeout="50" maxrows="6"
-           disablehistory="false" class="uri-element"
+           enablehistory="true" class="uri-element"
            oninput="ChangeLinkLocation();">
     <menupopup class="autocomplete-history-popup"
                popupalign="topleft" popupanchor="bottomleft"
                oncommand="this.parentNode.value = event.target.getAttribute('label'); ChangeLinkLocation();"/>
   </textbox>
   <hbox align="center">
     <!-- from EdDialogOverlay.xul 'for' identifies the textfield to get URL from -->
     <checkbox id="MakeRelativeLink"
--- a/mailnews/compose/content/MsgAttachPage.xul
+++ b/mailnews/compose/content/MsgAttachPage.xul
@@ -59,17 +59,17 @@
   <stringbundle id="attachWebPageBundle" src="chrome://messenger/locale/messengercompose/composeMsgs.properties"/>
 
   <label value="&enter.label;" control="dialog.input" accesskey="&enter.accesskey;"/>
   <separator class="thin"/>
 
   <hbox align="center">
     <textbox id="dialog.input" flex="1" type="autocomplete"
               autocompletesearch="history" timeout="50" maxrows="6"
-              disablehistory="false" class="uri-element"
+              enablehistory="true" class="uri-element"
               oninput="doEnabling();">
       <menupopup id="ubhist-popup" class="autocomplete-history-popup"
                  popupalign="topleft" popupanchor="bottomleft"
                  onpopupshowing="createUBHistoryMenu(event.target);"
                  oncommand="useUBHistoryItem(event.target);"/>
     </textbox>
     <button label="&chooseFile.label;" accesskey="&chooseFile.accesskey;" oncommand="onChooseFile();"/>
   </hbox>
--- a/suite/browser/navigator.xul
+++ b/suite/browser/navigator.xul
@@ -297,17 +297,17 @@
       <toolbaritem id="nav-bar-inner"
                    flex="4"
                    persist="width"
                    class="chromeclass-location nav-bar-class"
                    title="&locationBar.title;">
         <textbox id="urlbar" class="chromeclass-location uri-element" flex="1"
                  type="autocomplete" autocompletesearch="history file"
                  timeout="50" maxrows="6"
-                 disablehistory="false" accesskey="&locationBar.accesskey;"
+                 enablehistory="true" accesskey="&locationBar.accesskey;"
                  defaultSearchEngine="true" tabscrolling="true"
                  showcommentcolumn="true"
                  inputtooltiptext="&locationBar.tooltip;"
                  newlines="stripsurroundingwhitespace"
                  aria-label="&locationBar.title;"
                  oninput="gBrowser.userTypedValue = this.value;"
                  ontextentered="return handleURLBarCommand(eventParam, domEvent);"
                  ontextreverted="return handleURLBarRevert();"
--- a/suite/browser/urlbarBindings.xml
+++ b/suite/browser/urlbarBindings.xml
@@ -2,20 +2,50 @@
 
 <!DOCTYPE bindings [
   <!ENTITY % textcontextDTD SYSTEM "chrome://communicator/locale/utilityOverlay.dtd">
   %textcontextDTD;
 ]>
 
 <bindings id="urlbarBindings"
           xmlns="http://www.mozilla.org/xbl"
+          xmlns:html="http://www.w3.org/1999/xhtml"
           xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
           xmlns:xbl="http://www.mozilla.org/xbl">
 
   <binding id="urlbar" extends="chrome://global/content/autocomplete.xml#autocomplete">
+    <content sizetopopup="pref">
+      <xul:hbox class="autocomplete-textbox-container" flex="1">
+        <xul:hbox class="urlbar-security-level" flex="1" align="center" xbl:inherits="level">
+          <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">
+            <children/>
+            <html:input anonid="input" class="autocomplete-textbox textbox-input"
+                        flex="1" allowevents="true"
+                        xbl:inherits="tooltiptext=inputtooltiptext,onfocus,onblur,value,type,maxlength,disabled,size,readonly,placeholder,tabindex,accesskey,mozactionhint,userAction"/>
+          </xul:hbox>
+          <children includes="hbox"/>
+        </xul:hbox>
+      </xul:hbox>
+
+      <xul:dropmarker class="autocomplete-history-dropmarker" allowevents="true"
+                      xbl:inherits="open" anonid="historydropmarker"/>
+
+      <xul:popupset>
+        <xul:panel type="autocomplete" anonid="popup"
+                   ignorekeys="true" noautofocus="true" level="top"
+                   xbl:inherits="for=id,nomatch"/>
+      </xul:popupset>
+
+      <children includes="menupopup"/>
+    </content>
+
     <implementation>
       <constructor><![CDATA[
         var pbi = this.mPrefs.QueryInterface(Components.interfaces.nsIPrefBranch2);
         if (pbi)
           pbi.addObserver("browser.urlbar", this.mPrefObserver, false);
 
         this.updatePref("browser.urlbar.showPopup");
         this.updatePref("browser.urlbar.autoFill");
--- a/suite/common/communicator.css
+++ b/suite/common/communicator.css
@@ -143,16 +143,20 @@ prefpane {
 findbar {
   -moz-binding: url("chrome://communicator/content/bindings/findbar.xml#findbar");
 }
 
 .statusbarpanel-backgroundbox {
   -moz-binding: url("chrome://communicator/content/bindings/general.xml#statusbarpanel-backgroundbox");
 }
 
+textbox[enablehistory="true"] > .autocomplete-history-dropmarker {
+  display: -moz-box;
+}
+
 /******* lightweight themes *******/
 window[lwtheme="true"] {
   background-repeat: no-repeat;
   background-position: top right;
 }
 
 statusbar[lwthemefooter="true"] {
   background-repeat: no-repeat;
--- a/suite/common/openLocation.xul
+++ b/suite/common/openLocation.xul
@@ -69,17 +69,17 @@
     <separator orient="vertical" class="thin"/>
     <vbox flex="1">
       <label value="&enter.label;" control="dialog.input" accesskey="&enter.accesskey;"/>
       <separator class="thin"/>
 
       <hbox align="center">
         <textbox id="dialog.input" flex="1" type="autocomplete"
                   autocompletesearch="history file" timeout="50" maxrows="6"
-                  disablehistory="false" class="uri-element"
+                  enablehistory="true" class="uri-element"
                   oninput="doEnabling();">
           <menupopup id="ubhist-popup" class="autocomplete-history-popup"
                      popupalign="topleft" popupanchor="bottomleft"
                      onpopupshowing="createUBHistoryMenu(event.target);"
                      oncommand="useUBHistoryItem(event.target)"/>
         </textbox>
         <button label="&chooseFile.label;" accesskey="&chooseFile.accesskey;" oncommand="onChooseFile();"/>
       </hbox>
--- a/suite/themes/classic/navigator/navigator.css
+++ b/suite/themes/classic/navigator/navigator.css
@@ -314,27 +314,18 @@ toolbar[mode="text"] > #window-controls 
   
 /* ::::: nav-bar-inner ::::: */
   
 .nav-bar-class {
   -moz-box-align: center;
   min-width: 0px;
 }
 
-#urlbar {
-  border: 3px solid;
-  -moz-border-top-colors: transparent ThreeDShadow ThreeDDarkShadow;
-  -moz-border-right-colors: transparent ThreeDHighlight ThreeDDarkShadow;
-  -moz-border-bottom-colors: transparent ThreeDHighlight ThreeDDarkShadow;
-  -moz-border-left-colors: transparent ThreeDShadow ThreeDDarkShadow;
-}
-
-#urlbar[level="high"] > .autocomplete-textbox-container,
-#urlbar[level="low"] > .autocomplete-textbox-container {
-  -moz-appearance: none;
+.urlbar-security-level[level="high"],
+.urlbar-security-level[level="low"] {
   background-color: InfoBackground;
   color: InfoText;
 }
 
 #wrapper-nav-bar-inner[place="palette"] > #nav-bar-inner
   > .button-toolbar,
 #wrapper-nav-bar-inner[place="palette"] > #nav-bar-inner
   > #urlbar > .urlbar-icons {