aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmllabelelement.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2019-04-29 08:38:50 -0400
committerGitHub <noreply@github.com>2019-04-29 08:38:50 -0400
commit799490a02e9bea575bf34c39f045ef0883539f05 (patch)
tree278cada683564db36997cf3f96c92513b89c3096 /components/script/dom/htmllabelelement.rs
parentd58ea974baff1b51a43d2e2bf4b287ff11991a8d (diff)
parent37e88e77cdf00e3555599dd4004d03548bd95dcf (diff)
downloadservo-799490a02e9bea575bf34c39f045ef0883539f05.tar.gz
servo-799490a02e9bea575bf34c39f045ef0883539f05.zip
Auto merge of #22743 - ferjm:shadowdom, r=emilio
Partial ShadowDOM support This is just an early WIP, not to take it very seriously yet. - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [x] These changes fix #22719 - [x] There are tests for these changes <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22743) <!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/htmllabelelement.rs')
-rw-r--r--components/script/dom/htmllabelelement.rs4
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()