Bug 896097 - Hide Metro overlay buttons during autocomplete [r=sfoster]
authorMatt Brubeck <mbrubeck@mozilla.com>
Fri, 26 Jul 2013 14:34:03 -0700
changeset 152503 bf035bca7f6529bdc298449646fcf6f09549f3fe
parent 152502 7c02ec2b89883536305b1de12d8a1c0cf25cdfc5
child 152504 41730f142283fdb7b96c49da4a643d2ce99b8b42
push id2859
push userakeybl@mozilla.com
push dateMon, 16 Sep 2013 19:14:59 +0000
treeherdermozilla-beta@87d3c51cd2bf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssfoster
bugs896097
milestone25.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 896097 - Hide Metro overlay buttons during autocomplete [r=sfoster]
browser/metro/base/content/bindings/urlbar.xml
browser/metro/base/content/browser.xul
browser/metro/theme/browser.css
--- a/browser/metro/base/content/bindings/urlbar.xml
+++ b/browser/metro/base/content/bindings/urlbar.xml
@@ -564,28 +564,30 @@
 
             this.clearSelection();
             this.invalidate();
 
             this._results.arrangeItemsNow();
             this._searches.arrangeItemsNow();
 
             this.hidden = false;
+            Elements.urlbarState.setAttribute("autocomplete", "true");
           ]]>
         </body>
       </method>
 
       <method name="closePopup">
         <body>
           <![CDATA[
             if (!this.popupOpen)
               return;
 
             this.input.controller.stopSearch();
             this.hidden = true;
+            Elements.urlbarState.removeAttribute("autocomplete");
           ]]>
         </body>
       </method>
 
       <!-- Updating grid content -->
 
       <field name="_grid">null</field>
       <field name="_results" readonly="true">document.getAnonymousElementByAttribute(this, 'anonid', 'results');</field>
--- a/browser/metro/base/content/browser.xul
+++ b/browser/metro/base/content/browser.xul
@@ -171,16 +171,17 @@
     <key id="key_selectTab5" oncommand="BrowserUI.selectTabAtIndex(4);" key="5" modifiers="accel"/>
     <key id="key_selectTab6" oncommand="BrowserUI.selectTabAtIndex(5);" key="6" modifiers="accel"/>
     <key id="key_selectTab7" oncommand="BrowserUI.selectTabAtIndex(6);" key="7" modifiers="accel"/>
     <key id="key_selectTab8" oncommand="BrowserUI.selectTabAtIndex(7);" key="8" modifiers="accel"/>
     <key id="key_selectLastTab" oncommand="BrowserUI.selectTabAtIndex(-1);" key="9" modifiers="accel"/>
   </keyset>
 
   <stack id="stack" flex="1">
+    <observes element="bcast_urlbarState" attribute="*"/>
     <!-- Page Area -->
     <vbox id="page">
       <vbox id="tray" class="tray-toolbar" observes="bcast_windowState" >
         <!-- Tabs -->
         <!-- onclick handler to work around bug 837242 -->
         <hbox id="tabs-container" observes="bcast_windowState" onclick="void(0);">
           <box id="tabs" flex="1"
                 observes="bcast_preciseInput"
--- a/browser/metro/theme/browser.css
+++ b/browser/metro/theme/browser.css
@@ -378,36 +378,41 @@ documenttab[selected] .documenttab-selec
 
 #overlay-plus:-moz-locale-dir(ltr),
 #overlay-back:-moz-locale-dir(rtl) {
   right: -70px;
   background-position: left 6px center;
 }
 
 #stack[keyboardVisible] > .overlay-button,
+#stack[autocomplete] > .overlay-button,
 #stack[fullscreen] > .overlay-button,
 #appbar[visible] ~ .overlay-button,
 .overlay-button[disabled] {
   box-shadow: none;
   visibility: collapse;
 }
 
 #stack[keyboardVisible] > #overlay-back:-moz-locale-dir(ltr),
 #stack[keyboardVisible] > #overlay-plus:-moz-locale-dir(rtl),
+#stack[autocomplete] > #overlay-back:-moz-locale-dir(ltr),
+#stack[autocomplete] > #overlay-plus:-moz-locale-dir(rtl),
 #stack[fullscreen] > #overlay-back:-moz-locale-dir(ltr),
 #stack[fullscreen] > #overlay-plus:-moz-locale-dir(rtl),
 #appbar[visible] ~ #overlay-back:-moz-locale-dir(ltr),
 #appbar[visible] ~ #overlay-plus:-moz-locale-dir(rtl),
 #overlay-back[disabled]:-moz-locale-dir(ltr),
 #overlay-plus[disabled]:-moz-locale-dir(rtl) {
   transform: translateX(-60px);
 }
 
 #stack[keyboardVisible] > #overlay-plus:-moz-locale-dir(ltr),
 #stack[keyboardVisible] > #overlay-back:-moz-locale-dir(rtl),
+#stack[autocomplete] > #overlay-plus:-moz-locale-dir(ltr),
+#stack[autocomplete] > #overlay-back:-moz-locale-dir(rtl),
 #stack[fullscreen] > #overlay-plus:-moz-locale-dir(ltr),
 #stack[fullscreen] > #overlay-back:-moz-locale-dir(rtl),
 #appbar[visible] ~ #overlay-plus:-moz-locale-dir(ltr),
 #appbar[visible] ~ #overlay-back:-moz-locale-dir(rtl),
 #overlay-plus[disabled]:-moz-locale-dir(ltr),
 #overlay-back[disabled]:-moz-locale-dir(rtl) {
   transform: translateX(60px);
 }