Bug 1455359 - Remove autoCheck attribute from nsIDOMXULCheckboxElement and nsIDOMXULButtonElement; draft
authorBrian Grinstead <bgrinstead@mozilla.com>
Sat, 21 Apr 2018 07:03:23 -0700
changeset 786198 b76fc0803172f0da72411fd6ec684734a234d08d
parent 786193 dd0e54d786743974a50a338059bcd68a09b6d5b2
push id107404
push userbgrinstead@mozilla.com
push dateSat, 21 Apr 2018 14:03:41 +0000
bugs1455359
milestone61.0a1
Bug 1455359 - Remove autoCheck attribute from nsIDOMXULCheckboxElement and nsIDOMXULButtonElement; MozReview-Commit-ID: FUxsIf23z7e
dom/interfaces/xul/nsIDOMXULButtonElement.idl
dom/interfaces/xul/nsIDOMXULCheckboxElement.idl
toolkit/content/widgets/button.xml
--- a/dom/interfaces/xul/nsIDOMXULButtonElement.idl
+++ b/dom/interfaces/xul/nsIDOMXULButtonElement.idl
@@ -10,14 +10,13 @@ interface nsIDOMXULButtonElement : nsIDO
   attribute DOMString type;
   attribute DOMString dlgType;
 
   // For buttons of type="menu" only.
   attribute boolean open;
   
   // For buttons of type="checkbox" only.
   attribute boolean checked;
-  attribute boolean autoCheck;
 
   // For buttons of type="radio" only.
   attribute DOMString group;
 };
 
--- a/dom/interfaces/xul/nsIDOMXULCheckboxElement.idl
+++ b/dom/interfaces/xul/nsIDOMXULCheckboxElement.idl
@@ -4,10 +4,9 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsIDOMElement.idl"
 #include "nsIDOMXULLabeledControlEl.idl"
 
 [scriptable, uuid(674965d9-aff4-411d-a382-7cb32c0f25a1)]
 interface nsIDOMXULCheckboxElement : nsIDOMXULLabeledControlElement {
   attribute boolean checked;
-  attribute boolean autoCheck;
 };
--- a/toolkit/content/widgets/button.xml
+++ b/toolkit/content/widgets/button.xml
@@ -49,20 +49,16 @@
             this.setAttribute("checked", "true");
           else
             this.removeAttribute("checked");
 
           return val;
         ]]></setter>
       </property>
 
-      <property name="autoCheck"
-                onget="return this.getAttribute('autoCheck') == 'true';"
-                onset="this.setAttribute('autoCheck', val); return val;"/>
-
       <method name ="filterButtons">
         <parameter name="node"/>
         <body>
         <![CDATA[
           // if the node isn't visible, don't descend into it.
           var cs = node.ownerGlobal.getComputedStyle(node);
           if (cs.visibility != "visible" || cs.display == "none") {
             return NodeFilter.FILTER_REJECT;
@@ -99,19 +95,17 @@
           return false;
         ]]>
         </body>
       </method>
 
       <method name="_handleClick">
         <body>
         <![CDATA[
-          if (!this.disabled &&
-              (this.autoCheck || !this.hasAttribute("autoCheck"))) {
-
+          if (!this.disabled) {
             if (this.type == "checkbox") {
               this.checked = !this.checked;
             } else if (this.type == "radio") {
               this.checked = true;
             }
           }
         ]]>
         </body>