Bug 944947 - Australis - fix binding and styling for wrapped toolbarbuttons to correctly hide/show wrapped labels, r=Enn
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Fri, 24 Jan 2014 09:39:31 +0000
changeset 165643 d61e7d073cda0c634d881fe6c23e6d0bdd92855f
parent 165642 ce50a0cdc32904f2a87413868e4923951a6c431d
child 165644 12ac1dced3d0acf8107f6d32a8799aadeebbbab9
push id4632
push usergijskruitbosch@gmail.com
push dateTue, 28 Jan 2014 23:53:05 +0000
treeherderfx-team@d61e7d073cda [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersEnn
bugs944947
milestone29.0a1
Bug 944947 - Australis - fix binding and styling for wrapped toolbarbuttons to correctly hide/show wrapped labels, r=Enn
browser/components/downloads/content/download.xml
toolkit/content/widgets/toolbarbutton.xml
toolkit/content/xul.css
--- a/browser/components/downloads/content/download.xml
+++ b/browser/components/downloads/content/download.xml
@@ -108,14 +108,14 @@
   </binding>
 
   <binding id="download-toolbarbutton"
            extends="chrome://global/content/bindings/toolbarbutton.xml#toolbarbutton">
     <content>
       <children />
       <xul:image class="toolbarbutton-icon" xbl:inherits="validate,src=image,label"/>
       <xul:label class="toolbarbutton-text" crop="right" flex="1"
-                 xbl:inherits="value=label,accesskey,crop"/>
+                 xbl:inherits="value=label,accesskey,crop,wrap"/>
       <xul:label class="toolbarbutton-multiline-text" flex="1"
-                 xbl:inherits="xbl:text=label,accesskey"/>
+                 xbl:inherits="xbl:text=label,accesskey,wrap"/>
     </content>
   </binding>
 </bindings>
--- a/toolkit/content/widgets/toolbarbutton.xml
+++ b/toolkit/content/widgets/toolbarbutton.xml
@@ -14,47 +14,47 @@
     <resources>
       <stylesheet src="chrome://global/skin/toolbarbutton.css"/>
     </resources>
     
     <content>
       <children includes="observes|template|menupopup|panel|tooltip"/>
       <xul:image class="toolbarbutton-icon" xbl:inherits="validate,src=image,label"/>
       <xul:label class="toolbarbutton-text" crop="right" flex="1"
-                 xbl:inherits="value=label,accesskey,crop"/>
+                 xbl:inherits="value=label,accesskey,crop,wrap"/>
       <xul:label class="toolbarbutton-multiline-text" flex="1"
-                 xbl:inherits="xbl:text=label,accesskey"/>
+                 xbl:inherits="xbl:text=label,accesskey,wrap"/>
     </content>
   </binding>
 
   <binding id="menu" display="xul:menu" 
            extends="chrome://global/content/bindings/toolbarbutton.xml#toolbarbutton">
     <content>
       <children includes="observes|template|menupopup|panel|tooltip"/>
       <xul:image class="toolbarbutton-icon" xbl:inherits="validate,src=image,label,type"/>
       <xul:label class="toolbarbutton-text" crop="right" flex="1"
-                 xbl:inherits="value=label,accesskey,crop,dragover-top"/>
+                 xbl:inherits="value=label,accesskey,crop,dragover-top,wrap"/>
       <xul:label class="toolbarbutton-multiline-text" flex="1"
-                 xbl:inherits="xbl:text=label,accesskey"/>
+                 xbl:inherits="xbl:text=label,accesskey,wrap"/>
       <xul:dropmarker anonid="dropmarker" type="menu"
                       class="toolbarbutton-menu-dropmarker" xbl:inherits="disabled,label"/>
     </content>
   </binding>
   
   <binding id="menu-vertical" display="xul:menu"
            extends="chrome://global/content/bindings/toolbarbutton.xml#toolbarbutton">
     <content>
       <children includes="observes|template|menupopup|panel|tooltip"/>
       <xul:hbox flex="1" align="center">
         <xul:vbox flex="1" align="center">
           <xul:image class="toolbarbutton-icon" xbl:inherits="validate,src=image,label"/>
           <xul:label class="toolbarbutton-text" crop="right" flex="1"
-                     xbl:inherits="value=label,accesskey,crop,dragover-top"/>
+                     xbl:inherits="value=label,accesskey,crop,dragover-top,wrap"/>
           <xul:label class="toolbarbutton-multiline-text" flex="1"
-                     xbl:inherits="xbl:text=label,accesskey"/>
+                     xbl:inherits="xbl:text=label,accesskey,wrap"/>
         </xul:vbox>
         <xul:dropmarker anonid="dropmarker" type="menu"
                         class="toolbarbutton-menu-dropmarker" xbl:inherits="disabled,label"/>
       </xul:hbox>
     </content>
   </binding>
   
   <binding id="menu-button" display="xul:menu" 
--- a/toolkit/content/xul.css
+++ b/toolkit/content/xul.css
@@ -153,22 +153,23 @@ toolbarbutton[type="panel"] {
   -moz-binding: url("chrome://global/content/bindings/toolbarbutton.xml#menu");
 }
 
 toolbarbutton[type="menu-button"] {
   -moz-binding: url("chrome://global/content/bindings/toolbarbutton.xml#menu-button");
 }
 
 toolbar[mode="icons"] .toolbarbutton-text,
+toolbar[mode="icons"] .toolbarbutton-multiline-text,
 toolbar[mode="text"] .toolbarbutton-icon {
   display: none;
 }
 
-toolbarbutton:not([wrap="true"]) > .toolbarbutton-multiline-text,
-toolbarbutton[wrap="true"] > .toolbarbutton-text {
+.toolbarbutton-multiline-text:not([wrap="true"]),
+.toolbarbutton-text[wrap="true"] {
   display: none;
 }
 
 /******** browser, editor, iframe ********/
 
 browser,
 editor,
 iframe {