Introduce ShadowIncluding enum for tree traversals

This commit is contained in:
Fernando Jiménez Moreno 2019-02-21 13:19:01 +01:00
parent 2674a3e717
commit 3ccd622c9b
14 changed files with 58 additions and 50 deletions

View file

@ -41,7 +41,8 @@ use crate::dom::htmloutputelement::HTMLOutputElement;
use crate::dom::htmlselectelement::HTMLSelectElement;
use crate::dom::htmltextareaelement::HTMLTextAreaElement;
use crate::dom::node::{document_from_node, window_from_node};
use crate::dom::node::{Node, NodeFlags, UnbindContext, VecPreOrderInsertionHelper};
use crate::dom::node::{Node, NodeFlags, ShadowIncluding};
use crate::dom::node::{UnbindContext, VecPreOrderInsertionHelper};
use crate::dom::validitystate::ValidationFlags;
use crate::dom::virtualmethods::VirtualMethods;
use crate::dom::window::Window;
@ -582,7 +583,7 @@ impl HTMLFormElement {
// form, refactor this when html5ever's form owner PR lands
// Step 1-3
let invalid_controls = node
.traverse_preorder(/* shadow including */ false)
.traverse_preorder(ShadowIncluding::No)
.filter_map(|field| {
if let Some(el) = field.downcast::<Element>() {
if el.disabled_state() {