aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmlformelement.rs
diff options
context:
space:
mode:
authorBobby Holley <bobbyholley@gmail.com>2015-10-07 20:02:00 -0700
committerBobby Holley <bobbyholley@gmail.com>2015-10-16 17:56:31 -0700
commit75ec093334ff8f8f7ef41b90007588b924c40731 (patch)
treeba73c6dc51812c01f118e63c90ede1d8638f060d /components/script/dom/htmlformelement.rs
parent628c2a04326b27ac2743771dca52612c8ce30ad2 (diff)
downloadservo-75ec093334ff8f8f7ef41b90007588b924c40731.tar.gz
servo-75ec093334ff8f8f7ef41b90007588b924c40731.zip
Move Event States to |Element|.
Conceptually they belong there, rather than on |Node|. Fixes #7934.
Diffstat (limited to 'components/script/dom/htmlformelement.rs')
-rw-r--r--components/script/dom/htmlformelement.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/components/script/dom/htmlformelement.rs b/components/script/dom/htmlformelement.rs
index 46caced7d45..8fa12c02c6c 100644
--- a/components/script/dom/htmlformelement.rs
+++ b/components/script/dom/htmlformelement.rs
@@ -223,9 +223,11 @@ impl HTMLFormElement {
// TODO: This is an incorrect way of getting controls owned
// by the form, but good enough until html5ever lands
node.traverse_preorder().filter_map(|child| {
- if child.r().get_disabled_state() {
- return None;
+ match ElementCast::to_ref(child.r()) {
+ Some(el) if !el.get_disabled_state() => (),
+ _ => return None,
}
+
if child.r().ancestors()
.any(|a| HTMLDataListElementCast::to_root(a).is_some()) {
return None;