Bug 582706 - [regression] Escape key broken by bug 581561 [r=mfinkle]
authorMatt Brubeck <mbrubeck@mozilla.com>
Wed, 28 Jul 2010 14:27:23 -0700
changeset 66408 ce55997467e3c0ad26709d27d69677c21a624a8d
parent 66407 13d3fd09e5a2f09814f4d27945b55a2487430e78
child 66409 42a7f8d1ee3fac82b7def5a698628c06afb2e4b6
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
bugs582706, 581561
Bug 582706 - [regression] Escape key broken by bug 581561 [r=mfinkle]
mobile/chrome/content/browser-ui.js
mobile/chrome/content/browser.xul
mobile/themes/core/browser.css
mobile/themes/core/platform.css
--- a/mobile/chrome/content/browser-ui.js
+++ b/mobile/chrome/content/browser-ui.js
@@ -667,17 +667,17 @@ var BrowserUI = {
     // Check open popups
     if (this._popup) {
       this._hidePopup();
       return;
     }
       
     // Check open modal elements
     let modalElementsLength = document.getElementsByClassName("modal-block").length;
-    if (modalElementsLength > 0) 
+    if (modalElementsLength > 0)
       return;
 
     // Check open panel
     if (this.isPanelVisible()) {
       this.hidePanel();
       return;
     }
 
--- a/mobile/chrome/content/browser.xul
+++ b/mobile/chrome/content/browser.xul
@@ -502,17 +502,17 @@
         <scrollbox id="select-list" flex="1" orient="vertical"/>
         <hbox id="select-buttons" pack="center">
           <button id="select-buttons-done" class="button-dark" label="&selectHelper.done;" oncommand="SelectHelperUI.hide();"/>
         </hbox>
       </vbox>
       <spacer flex="1000"/>
     </vbox>
 
-    <hbox id="context-container" class="window-width window-height modal-block" top="0" left="0" hidden="true">
+    <hbox id="context-container" class="window-width window-height context-block" top="0" left="0" hidden="true">
       <vbox id="context-popup" class="dialog-dark">
         <hbox id="context-header">
           <label id="context-hint" crop="center" flex="1"/>
         </hbox>
         <richlistbox id="context-commands" onclick="ContextHelper.hide();">
           <richlistitem id="context-openinnewtab" type="link" onclick="ContextCommands.openInNewTab(event);">
             <label value="&contextOpenInNewTab.label;"/>
           </richlistitem>
--- a/mobile/themes/core/browser.css
+++ b/mobile/themes/core/browser.css
@@ -1318,14 +1318,8 @@ pageaction .pageaction-desc[value=""] {
   background: -moz-linear-gradient(top, rgb(245,245,245), rgb(215,215,215));
   -moz-border-radius: 0 0 8px 8px;
 }
 
 /* Force any command tap to highlight */
 #context-commands > richlistitem:hover:active {
   background: #8db8d8;
 }
-
-.modal-block {
-  -moz-box-align: center;
-  -moz-box-pack: center;
-  background-color: rgba(128, 128, 128, 0.5);
-}
--- a/mobile/themes/core/platform.css
+++ b/mobile/themes/core/platform.css
@@ -105,17 +105,21 @@ textbox[isempty="true"] {
   -moz-border-bottom-colors: black #4a4b4f;
   -moz-border-right-colors: black #4a4b4f;
   -moz-border-radius: 8px 8px 8px 8px;
   -moz-box-shadow: black 0 2px 2px;
   padding: 8px;
 }
 
 /* prompt dialogs ---------------------------------------------------------- */
+.context-block,
 .modal-block {
+  -moz-box-align: center;
+  -moz-box-pack: center;
+  background-color: rgba(128, 128, 128, 0.5);
   padding: 64px;
 }
 
 .modal-block dialog {
   color: #fff;
   background-color: transparent;
   -moz-border-radius: 8px;
   -moz-box-shadow: black 0 2px 2px;
@@ -144,16 +148,17 @@ dialog[closebutton="true"] hbox > .close
   display: -moz-box;
 }
 
 dialog .prompt-title {
   font-size: 24px !important;
 }
 
 @media (max-width: 499px) {
+  .context-block,
   .modal-block {
     padding: 32px;
   }
 
   dialog .prompt-header {
     font-size: 16px !important;
   }