servo: Merge #5456 - Rewrite NodeChildrenIterator to return Temporary (from Ms2ger:children); r=jdm
Source-Repo: https://github.com/servo/servo Source-Revision: 88bc64444c99fc47febf8e99c0e19c6ae3500990
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
},
|
||||
_ => ()
|
||||
|
||||
Reference in New Issue
Block a user