aboutsummaryrefslogtreecommitdiffstats
path: root/components/selectors/tree.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2018-03-14 10:38:45 -0400
committerGitHub <noreply@github.com>2018-03-14 10:38:45 -0400
commit148beb4ea5f8f1680e694ac48045a632da58269c (patch)
tree666ddd4d7d9725f09ed6aa1f65683e2532309808 /components/selectors/tree.rs
parentdaaee046b3a5a949a22b69a7ba42d2d741914645 (diff)
parent9fa2618197fc9fc4085d5a1d6ed6be90cb39757b (diff)
downloadservo-148beb4ea5f8f1680e694ac48045a632da58269c.tar.gz
servo-148beb4ea5f8f1680e694ac48045a632da58269c.zip
Auto merge of #20243 - emilio:host-selector-on-the-way, r=SimonSapin
style: add infrastructure to match the :host selector. <!-- 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/20243) <!-- Reviewable:end -->
Diffstat (limited to 'components/selectors/tree.rs')
-rw-r--r--components/selectors/tree.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/components/selectors/tree.rs b/components/selectors/tree.rs
index c9baeb1316d..00799f92edd 100644
--- a/components/selectors/tree.rs
+++ b/components/selectors/tree.rs
@@ -31,6 +31,12 @@ pub trait Element: Sized + Clone + Debug {
fn parent_element(&self) -> Option<Self>;
+ /// Whether the parent node of this element is a shadow root.
+ fn parent_node_is_shadow_root(&self) -> bool;
+
+ /// The host of the containing shadow root, if any.
+ fn containing_shadow_host(&self) -> Option<Self>;
+
/// The parent of a given pseudo-element, after matching a pseudo-element
/// selector.
///