diff options
Diffstat (limited to 'components/script/dom/htmllabelelement.rs')
-rw-r--r-- | components/script/dom/htmllabelelement.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/components/script/dom/htmllabelelement.rs b/components/script/dom/htmllabelelement.rs index 3c9106a589a..11ee09bce94 100644 --- a/components/script/dom/htmllabelelement.rs +++ b/components/script/dom/htmllabelelement.rs @@ -15,7 +15,7 @@ use crate::dom::event::Event; use crate::dom::eventtarget::EventTarget; use crate::dom::htmlelement::HTMLElement; use crate::dom::htmlformelement::{FormControl, FormControlElementHelpers, HTMLFormElement}; -use crate::dom::node::{document_from_node, Node}; +use crate::dom::node::{document_from_node, Node, ShadowIncluding}; use crate::dom::virtualmethods::VirtualMethods; use dom_struct::dom_struct; use html5ever::{LocalName, Prefix}; @@ -162,7 +162,7 @@ impl VirtualMethods for HTMLLabelElement { impl HTMLLabelElement { pub fn first_labelable_descendant(&self) -> Option<DomRoot<HTMLElement>> { self.upcast::<Node>() - .traverse_preorder() + .traverse_preorder(ShadowIncluding::No) .filter_map(DomRoot::downcast::<HTMLElement>) .filter(|elem| elem.is_labelable_element()) .next() |