mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Move Event States to |Element|.
Conceptually they belong there, rather than on |Node|. Fixes #7934.
This commit is contained in:
parent
628c2a0432
commit
75ec093334
14 changed files with 251 additions and 262 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue