mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Rewrite NodeChildrenIterator to return Temporary.
This commit is contained in:
parent
bc8ed81dc1
commit
c8106da277
11 changed files with 208 additions and 129 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
},
|
||||
_ => ()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue