diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2018-03-14 10:38:45 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-14 10:38:45 -0400 |
commit | 148beb4ea5f8f1680e694ac48045a632da58269c (patch) | |
tree | 666ddd4d7d9725f09ed6aa1f65683e2532309808 /components/selectors/tree.rs | |
parent | daaee046b3a5a949a22b69a7ba42d2d741914645 (diff) | |
parent | 9fa2618197fc9fc4085d5a1d6ed6be90cb39757b (diff) | |
download | servo-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.rs | 6 |
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. /// |