Fix up ordering issues in radiogroups. Bug 226549, r=neil, sr=alecf
git-svn-id: svn://10.0.0.236/trunk@149959 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
42b7fba800
commit
73ca76a361
@ -185,14 +185,19 @@
|
|||||||
]]>
|
]]>
|
||||||
</body>
|
</body>
|
||||||
</method>
|
</method>
|
||||||
<field name="mRadioChildren">[]</field>
|
<field name="mRadioChildren">null</field>
|
||||||
<method name="_getRadioChildren">
|
<method name="_getRadioChildren">
|
||||||
<parameter name="aNode">this</parameter>
|
<parameter name="aNode" />
|
||||||
<body>
|
<body>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
if (aNode) {
|
if (!aNode)
|
||||||
if (aNode == this && this.mRadioChildren)
|
aNode = this;
|
||||||
|
if (aNode == this) {
|
||||||
|
if (this.mRadioChildren)
|
||||||
return this.mRadioChildren;
|
return this.mRadioChildren;
|
||||||
|
else
|
||||||
|
this.mRadioChildren = new Array();
|
||||||
|
}
|
||||||
else if (aNode.localName == "radio") {
|
else if (aNode.localName == "radio") {
|
||||||
this.mRadioChildren[this.mRadioChildren.length++] = aNode;
|
this.mRadioChildren[this.mRadioChildren.length++] = aNode;
|
||||||
return this.mRadioChildren;
|
return this.mRadioChildren;
|
||||||
@ -201,7 +206,6 @@
|
|||||||
return this.mRadioChildren;
|
return this.mRadioChildren;
|
||||||
for (var i = 0; i < aNode.childNodes.length; ++i)
|
for (var i = 0; i < aNode.childNodes.length; ++i)
|
||||||
this._getRadioChildren(aNode.childNodes[i]);
|
this._getRadioChildren(aNode.childNodes[i]);
|
||||||
}
|
|
||||||
return this.mRadioChildren;
|
return this.mRadioChildren;
|
||||||
]]>
|
]]>
|
||||||
</body>
|
</body>
|
||||||
@ -343,16 +347,18 @@
|
|||||||
<implementation implements="nsIDOMXULSelectControlItemElement, nsIAccessibleProvider">
|
<implementation implements="nsIDOMXULSelectControlItemElement, nsIAccessibleProvider">
|
||||||
<constructor>
|
<constructor>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
var parent = this.radioGroup;
|
// Just clear out the parent's cached list of radio children
|
||||||
parent.mRadioChildren[parent.mRadioChildren.length++] = this;
|
this.radioGroup.mRadioChildren = null;
|
||||||
]]>
|
]]>
|
||||||
</constructor>
|
</constructor>
|
||||||
<destructor>
|
<destructor>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
var parent = this.radioGroup;
|
var radioList = this.radioGroup.mRadioChildren;
|
||||||
for (var i = 0; i < parent.mRadioChildren.length; ++i) {
|
if (!radioList)
|
||||||
if (parent.mRadioChildren[i] == this) {
|
return;
|
||||||
parent.mRadioChildren.slice(i, i);
|
for (var i = 0; i < radioList.length; ++i) {
|
||||||
|
if (radioList[i] == this) {
|
||||||
|
radioList.splice(i, 1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user