Bug 1455359 - Remove autoCheck attribute from nsIDOMXULCheckboxElement and nsIDOMXULButtonElement;
MozReview-Commit-ID: FUxsIf23z7e
--- 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>