Bug 1374247: Avoid using <children> in XUL buttons. r?dao draft
authorEmilio Cobos Álvarez <emilio@crisal.io>
Wed, 01 Nov 2017 17:12:03 +0100
changeset 690258 2eefdd8c36ad64083d95885b0888b4fcbf78e8e7
parent 690076 702ff3c118003241c919d05890b5ce16aa1e4d1e
child 690259 3447c7758630b8ba1fb43a3819ca8a3e2a88f155
push id87259
push userbmo:emilio@crisal.io
push dateWed, 01 Nov 2017 20:02:55 +0000
reviewersdao
bugs1374247
milestone58.0a1
Bug 1374247: Avoid using <children> in XUL buttons. r?dao None of them have other thing than <menulist>, and those fall into the <children> before it. MozReview-Commit-ID: DR3Xve6QCDs
toolkit/content/widgets/button.xml
--- a/toolkit/content/widgets/button.xml
+++ b/toolkit/content/widgets/button.xml
@@ -220,39 +220,35 @@
     <resources>
       <stylesheet src="chrome://global/skin/button.css"/>
     </resources>
 
     <content>
       <children includes="observes|template|menupopup|panel|tooltip"/>
       <xul:hbox class="box-inherit button-box" xbl:inherits="align,dir,pack,orient"
                 align="center" pack="center" flex="1" anonid="button-box">
-        <children>
-          <xul:image class="button-icon" xbl:inherits="src=image"/>
-          <xul:label class="button-text" xbl:inherits="value=label,accesskey,crop,highlightable"/>
-          <xul:label class="button-highlightable-text" xbl:inherits="xbl:text=label,accesskey,crop,highlightable"/>
-        </children>
+        <xul:image class="button-icon" xbl:inherits="src=image"/>
+        <xul:label class="button-text" xbl:inherits="value=label,accesskey,crop,highlightable"/>
+        <xul:label class="button-highlightable-text" xbl:inherits="xbl:text=label,accesskey,crop,highlightable"/>
       </xul:hbox>
     </content>
   </binding>
 
   <binding id="menu" display="xul:menu"
            extends="chrome://global/content/bindings/button.xml#button">
     <content>
       <children includes="observes|template|menupopup|panel|tooltip"/>
       <xul:hbox class="box-inherit button-box" xbl:inherits="align,dir,pack,orient"
                 align="center" pack="center" flex="1">
-        <children>
-          <xul:hbox class="box-inherit" xbl:inherits="align,dir,pack,orient"
-                    align="center" pack="center" flex="1">
-            <xul:image class="button-icon" xbl:inherits="src=image"/>
-            <xul:label class="button-text" xbl:inherits="value=label,accesskey,crop"/>
-          </xul:hbox>
-          <xul:dropmarker class="button-menu-dropmarker" xbl:inherits="open,disabled,label"/>
-        </children>
+        <xul:hbox class="box-inherit" xbl:inherits="align,dir,pack,orient"
+                  align="center" pack="center" flex="1">
+          <xul:image class="button-icon" xbl:inherits="src=image"/>
+          <xul:label class="button-text" xbl:inherits="value=label,accesskey,crop"/>
+        </xul:hbox>
+        <xul:dropmarker class="button-menu-dropmarker" xbl:inherits="open,disabled,label"/>
       </xul:hbox>
     </content>
 
     <handlers>
       <handler event="keypress" keycode="VK_RETURN" action="this.open = true;"/>
       <handler event="keypress" key=" ">
       <![CDATA[
         this.open = true;