Bug 1416483 - Remove control-item binding and copy the value property onto its children. r=enndeakin
authorLucius Q. User <snprintfv@gmail.com>
Sat, 18 Nov 2017 16:17:50 +0300
changeset 392994 3c44cbc572206137244cac02d4408687bdd13717
parent 392993 9f3615964530ae32dc7ea95e5ae66d153534a3aa
child 392995 951c0a2710741d629041f4b18d301ca8fa222049
push id97573
push userryanvm@gmail.com
push dateWed, 22 Nov 2017 02:41:24 +0000
treeherdermozilla-inbound@3c44cbc57220 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersenndeakin
bugs1416483
milestone59.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 1416483 - Remove control-item binding and copy the value property onto its children. r=enndeakin
toolkit/content/widgets/general.xml
toolkit/content/widgets/menu.xml
toolkit/content/widgets/radio.xml
toolkit/content/widgets/tabbox.xml
--- a/toolkit/content/widgets/general.xml
+++ b/toolkit/content/widgets/general.xml
@@ -52,23 +52,16 @@
           ]]>
         </setter>
       </property>
 
       <field name="labelElement"/>
     </implementation>      
   </binding>
 
-  <binding id="control-item" extends="chrome://global/content/bindings/general.xml#basetext">
-    <implementation>
-      <property name="value"      onset="this.setAttribute('value', val); return val;"
-                                  onget="return this.getAttribute('value');"/>
-    </implementation>
-  </binding>
-
   <binding id="root-element">
     <implementation>
       <field name="_lightweightTheme">null</field>
       <constructor><![CDATA[
         if (this.hasAttribute("lightweightthemes")) {
           let temp = {};
           Components.utils.import("resource://gre/modules/LightweightThemeConsumer.jsm", temp);
           this._lightweightTheme = new temp.LightweightThemeConsumer(this.ownerDocument);
--- a/toolkit/content/widgets/menu.xml
+++ b/toolkit/content/widgets/menu.xml
@@ -5,21 +5,23 @@
 
 
 <bindings id="menuitemBindings"
    xmlns="http://www.mozilla.org/xbl"
    xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
    xmlns:xbl="http://www.mozilla.org/xbl">
 
   <binding id="menuitem-base" role="xul:menuitem"
-           extends="chrome://global/content/bindings/general.xml#control-item">
+           extends="chrome://global/content/bindings/general.xml#basetext">
     <resources>
       <stylesheet src="chrome://global/skin/menu.css"/>
     </resources>
     <implementation implements="nsIDOMXULSelectControlItemElement, nsIDOMXULContainerItemElement">
+      <property name="value" onset="this.setAttribute('value', val); return val;"
+                             onget="return this.getAttribute('value');"/>
       <!-- nsIDOMXULSelectControlItemElement -->
       <property name="selected" readonly="true"
                 onget="return this.getAttribute('selected') == 'true';"/>
       <property name="control" readonly="true">
         <getter>
           <![CDATA[
             var parent = this.parentNode;
             if (parent &&
--- a/toolkit/content/widgets/radio.xml
+++ b/toolkit/content/widgets/radio.xml
@@ -424,17 +424,17 @@
       <handler event="blur" phase="target">
         this.removeAttribute("focused");
         this.focusedItem = null;
       </handler>
     </handlers>
   </binding>
 
   <binding id="radio" role="xul:radiobutton"
-    extends="chrome://global/content/bindings/general.xml#control-item">
+    extends="chrome://global/content/bindings/general.xml#basetext">
     <resources>
       <stylesheet src="chrome://global/skin/radio.css"/>
     </resources>
 
     <content>
       <xul:image class="radio-check" xbl:inherits="disabled,selected"/>
       <xul:hbox class="radio-label-box" align="center" flex="1">
         <xul:image class="radio-icon" xbl:inherits="src"/>
@@ -462,16 +462,18 @@
           for (var i = 0; i < radioList.length; ++i) {
             if (radioList[i] == this) {
               radioList.splice(i, 1);
               return;
             }
           }
         ]]>
       </destructor>
+      <property name="value" onset="this.setAttribute('value', val); return val;"
+                             onget="return this.getAttribute('value');"/>
       <property name="selected" readonly="true">
         <getter>
           <![CDATA[
             return this.hasAttribute("selected");
           ]]>
         </getter>
       </property>
       <property name="radioGroup" readonly="true" onget="return this.control"/>
--- a/toolkit/content/widgets/tabbox.xml
+++ b/toolkit/content/widgets/tabbox.xml
@@ -694,17 +694,17 @@
             return val;
           ]]>
         </setter>
       </property>
     </implementation>
   </binding>
 
   <binding id="tab" display="xul:button" role="xul:tab"
-           extends="chrome://global/content/bindings/general.xml#control-item">
+           extends="chrome://global/content/bindings/general.xml#basetext">
     <resources>
       <stylesheet src="chrome://global/skin/tabbox.css"/>
     </resources>
 
     <content>
       <xul:hbox class="tab-middle box-inherit" xbl:inherits="align,dir,pack,orient,selected,visuallyselected" flex="1">
         <xul:image class="tab-icon"
                    xbl:inherits="validate,src=image"
@@ -712,16 +712,18 @@
         <xul:label class="tab-text"
                    xbl:inherits="value=label,accesskey,crop,disabled"
                    flex="1"
                    role="presentation"/>
       </xul:hbox>
     </content>
 
     <implementation implements="nsIDOMXULSelectControlItemElement">
+      <property name="value" onset="this.setAttribute('value', val); return val;"
+                             onget="return this.getAttribute('value');"/>
       <property name="control" readonly="true">
         <getter>
           <![CDATA[
             var parent = this.parentNode;
             if (parent instanceof Components.interfaces.nsIDOMXULSelectControlElement)
               return parent;
             return null;
           ]]>