diff options
Diffstat (limited to 'components/script/dom/htmlimageelement.rs')
-rw-r--r-- | components/script/dom/htmlimageelement.rs | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/components/script/dom/htmlimageelement.rs b/components/script/dom/htmlimageelement.rs index 3848b3d7d2a..62a369579a1 100644 --- a/components/script/dom/htmlimageelement.rs +++ b/components/script/dom/htmlimageelement.rs @@ -32,7 +32,10 @@ use crate::dom::htmlmapelement::HTMLMapElement; use crate::dom::htmlpictureelement::HTMLPictureElement; use crate::dom::htmlsourceelement::HTMLSourceElement; use crate::dom::mouseevent::MouseEvent; -use crate::dom::node::{document_from_node, window_from_node, Node, NodeDamage, UnbindContext}; +use crate::dom::node::UnbindContext; +use crate::dom::node::{ + document_from_node, window_from_node, BindContext, Node, NodeDamage, ShadowIncluding, +}; use crate::dom::performanceresourcetiming::InitiatorType; use crate::dom::progressevent::ProgressEvent; use crate::dom::values::UNSIGNED_LONG_MAX; @@ -1259,7 +1262,7 @@ impl HTMLImageElement { let useMapElements = document_from_node(self) .upcast::<Node>() - .traverse_preorder() + .traverse_preorder(ShadowIncluding::No) .filter_map(DomRoot::downcast::<HTMLMapElement>) .find(|n| { n.upcast::<Element>() @@ -1645,12 +1648,12 @@ impl VirtualMethods for HTMLImageElement { } } - fn bind_to_tree(&self, tree_in_doc: bool) { + fn bind_to_tree(&self, context: &BindContext) { if let Some(ref s) = self.super_type() { - s.bind_to_tree(tree_in_doc); + s.bind_to_tree(context); } let document = document_from_node(self); - if tree_in_doc { + if context.tree_connected { document.register_responsive_image(self); } |