aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmlfieldsetelement.rs
diff options
context:
space:
mode:
authorAnthony Ramine <n.oxyde@gmail.com>2015-04-11 14:12:44 +0200
committerAnthony Ramine <n.oxyde@gmail.com>2015-04-13 11:01:02 +0200
commite20d997b37d93d35d2a80761d8e125351d9165bc (patch)
treea8d976b5919028dc894fda2807b2987548eeba06 /components/script/dom/htmlfieldsetelement.rs
parentc026825e69cab4f481773716fac4956610594ecb (diff)
downloadservo-e20d997b37d93d35d2a80761d8e125351d9165bc.tar.gz
servo-e20d997b37d93d35d2a80761d8e125351d9165bc.zip
Use a simple Temporary value in TreeIterator
Diffstat (limited to 'components/script/dom/htmlfieldsetelement.rs')
-rw-r--r--components/script/dom/htmlfieldsetelement.rs14
1 files changed, 8 insertions, 6 deletions
diff --git a/components/script/dom/htmlfieldsetelement.rs b/components/script/dom/htmlfieldsetelement.rs
index 39088810eab..e3b8397e4bc 100644
--- a/components/script/dom/htmlfieldsetelement.rs
+++ b/components/script/dom/htmlfieldsetelement.rs
@@ -104,13 +104,14 @@ impl<'a> VirtualMethods for JSRef<'a, HTMLFieldSetElement> {
}
for descendant in child.r().traverse_preorder() {
- match descendant.type_id() {
+ let descendant = descendant.root();
+ match descendant.r().type_id() {
NodeTypeId::Element(ElementTypeId::HTMLElement(HTMLElementTypeId::HTMLButtonElement)) |
NodeTypeId::Element(ElementTypeId::HTMLElement(HTMLElementTypeId::HTMLInputElement)) |
NodeTypeId::Element(ElementTypeId::HTMLElement(HTMLElementTypeId::HTMLSelectElement)) |
NodeTypeId::Element(ElementTypeId::HTMLElement(HTMLElementTypeId::HTMLTextAreaElement)) => {
- descendant.set_disabled_state(true);
- descendant.set_enabled_state(false);
+ descendant.r().set_disabled_state(true);
+ descendant.r().set_enabled_state(false);
},
_ => ()
}
@@ -142,13 +143,14 @@ impl<'a> VirtualMethods for JSRef<'a, HTMLFieldSetElement> {
}
for descendant in child.r().traverse_preorder() {
- match descendant.type_id() {
+ let descendant = descendant.root();
+ match descendant.r().type_id() {
NodeTypeId::Element(ElementTypeId::HTMLElement(HTMLElementTypeId::HTMLButtonElement)) |
NodeTypeId::Element(ElementTypeId::HTMLElement(HTMLElementTypeId::HTMLInputElement)) |
NodeTypeId::Element(ElementTypeId::HTMLElement(HTMLElementTypeId::HTMLSelectElement)) |
NodeTypeId::Element(ElementTypeId::HTMLElement(HTMLElementTypeId::HTMLTextAreaElement)) => {
- descendant.check_disabled_attribute();
- descendant.check_ancestors_disabled_state_for_form_control();
+ descendant.r().check_disabled_attribute();
+ descendant.r().check_ancestors_disabled_state_for_form_control();
},
_ => ()
}