mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Introduce ShadowIncluding enum for tree traversals
This commit is contained in:
parent
2674a3e717
commit
3ccd622c9b
14 changed files with 58 additions and 50 deletions
|
@ -8,7 +8,7 @@ use crate::dom::bindings::root::DomRoot;
|
|||
use crate::dom::document::Document;
|
||||
use crate::dom::htmlareaelement::HTMLAreaElement;
|
||||
use crate::dom::htmlelement::HTMLElement;
|
||||
use crate::dom::node::Node;
|
||||
use crate::dom::node::{Node, ShadowIncluding};
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever::{LocalName, Prefix};
|
||||
|
||||
|
@ -43,7 +43,7 @@ impl HTMLMapElement {
|
|||
|
||||
pub fn get_area_elements(&self) -> Vec<DomRoot<HTMLAreaElement>> {
|
||||
self.upcast::<Node>()
|
||||
.traverse_preorder(/* shadow including */ false)
|
||||
.traverse_preorder(ShadowIncluding::No)
|
||||
.filter_map(DomRoot::downcast::<HTMLAreaElement>)
|
||||
.collect()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue