aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmloptgroupelement.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/htmloptgroupelement.rs')
-rw-r--r--components/script/dom/htmloptgroupelement.rs16
1 files changed, 11 insertions, 5 deletions
diff --git a/components/script/dom/htmloptgroupelement.rs b/components/script/dom/htmloptgroupelement.rs
index ba68631c730..1333fa6a966 100644
--- a/components/script/dom/htmloptgroupelement.rs
+++ b/components/script/dom/htmloptgroupelement.rs
@@ -69,9 +69,12 @@ impl<'a> VirtualMethods for JSRef<'a, HTMLOptGroupElement> {
let node: JSRef<Node> = NodeCast::from_ref(*self);
node.set_disabled_state(true);
node.set_enabled_state(false);
- for child in node.children().filter(|child| child.is_htmloptionelement()) {
- child.set_disabled_state(true);
- child.set_enabled_state(false);
+ for child in node.children() {
+ let child = child.root();
+ if child.r().is_htmloptionelement() {
+ child.r().set_disabled_state(true);
+ child.r().set_enabled_state(false);
+ }
}
},
_ => (),
@@ -88,8 +91,11 @@ impl<'a> VirtualMethods for JSRef<'a, HTMLOptGroupElement> {
let node: JSRef<Node> = NodeCast::from_ref(*self);
node.set_disabled_state(false);
node.set_enabled_state(true);
- for child in node.children().filter(|child| child.is_htmloptionelement()) {
- child.check_disabled_attribute();
+ for child in node.children() {
+ let child = child.root();
+ if child.r().is_htmloptionelement() {
+ child.r().check_disabled_attribute();
+ }
}
},
_ => ()