diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2017-08-16 01:47:46 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-16 01:47:46 -0500 |
commit | 24270f93571e0a1254d402f1c897bcc1ebbbd459 (patch) | |
tree | b5dd4569f3ca4db9e9825268ce49cf62171bb93d /components/selectors/tree.rs | |
parent | dc654c991238305d6fc0524173c85f40d7b9e90f (diff) | |
parent | 0e82ca1d3a540ba96f01e8647d314dfd8d05cc47 (diff) | |
download | servo-24270f93571e0a1254d402f1c897bcc1ebbbd459.tar.gz servo-24270f93571e0a1254d402f1c897bcc1ebbbd459.zip |
Auto merge of #18104 - aethanyc:fix-nth-child-xbl-bug1382102, r=emilio
style: Skip matching :nth-child if element is the root of anonymous subtree
This was reviewed in https://bugzilla.mozilla.org/show_bug.cgi?id=1382102
<!-- 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/18104)
<!-- 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 7827dc6bbe6..23238237b2f 100644 --- a/components/selectors/tree.rs +++ b/components/selectors/tree.rs @@ -86,6 +86,12 @@ pub trait Element: Sized + Debug { /// if the parent node is a `DocumentFragment`. fn is_root(&self) -> bool; + /// Returns whether this element should ignore matching nth child + /// selector. + fn ignores_nth_child_selectors(&self) -> bool { + false + } + /// Return true if we want to stop lookup ancestor of the current /// element while matching complex selectors with descendant/child /// combinator. |