Move Event States to |Element|.

Conceptually they belong there, rather than on |Node|.

Fixes #7934.
This commit is contained in:
Bobby Holley 2015-10-07 20:02:00 -07:00
parent 628c2a0432
commit 75ec093334
14 changed files with 251 additions and 262 deletions

View file

@ -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;