Bug 632634 - Allow the status panel to be as wide as the window. r=felipe
authorDão Gottwald <dao@mozilla.com>
Thu, 12 Apr 2012 10:00:56 +0200
changeset 91501 7324a63f7855c085662098937df7b617d3209037
parent 91500 3e5b3359a4690f2fbe5c29c3a9b2b27932af2574
child 91502 987f9a47cee9655bb0eb0d14e050cd95b2db208d
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersfelipe
bugs632634
milestone14.0a1
Bug 632634 - Allow the status panel to be as wide as the window. r=felipe
browser/base/content/browser.css
browser/base/content/tabbrowser.xml
--- a/browser/base/content/browser.css
+++ b/browser/base/content/browser.css
@@ -474,26 +474,30 @@ browser[tabmodalPromptShowing] {
 
 /* Status panel */
 
 statuspanel {
   -moz-binding: url("chrome://browser/content/tabbrowser.xml#statuspanel");
   position: fixed;
   margin-top: -3em;
   left: 0;
-  max-width: 50%;
+  max-width: -moz-calc(100% - 5px);
   pointer-events: none;
 }
 
 statuspanel:-moz-locale-dir(ltr)[mirror],
 statuspanel:-moz-locale-dir(rtl):not([mirror]) {
   left: auto;
   right: 0;
 }
 
+statuspanel[sizelimit] {
+  max-width: 50%;
+}
+
 statuspanel[type=status] {
   min-width: 23em;
 }
 
 @media all and (max-width: 800px) {
   statuspanel[type=status] {
     min-width: 33%;
   }
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -4031,18 +4031,20 @@
 
       <destructor><![CDATA[
         window.removeEventListener("resize", this, false);
         MousePosTracker.removeListener(this);
       ]]></destructor>
 
       <property name="label">
         <setter><![CDATA[
-          if (!this.label)
+          if (!this.label) {
             this.removeAttribute("mirror");
+            this.removeAttribute("sizelimit");
+          }
 
           this.style.minWidth = this.getAttribute("type") == "status" &&
                                 this.getAttribute("previoustype") == "status"
                                   ? getComputedStyle(this).width : "";
 
           if (val) {
             this.setAttribute("label", val);
             this.removeAttribute("inactive");
@@ -4110,14 +4112,19 @@
       </method>
 
       <method name="_mirror">
         <body>
           if (this.hasAttribute("mirror"))
             this.removeAttribute("mirror");
           else
             this.setAttribute("mirror", "true");
+
+          if (!this.hasAttribute("sizelimit")) {
+            this.setAttribute("sizelimit", "true");
+            this._calcMouseTargetRect();
+          }
         </body>
       </method>
     </implementation>
   </binding>
 
 </bindings>