aboutsummaryrefslogtreecommitdiffstats
path: root/components/style/servo/selector_parser.rs
diff options
context:
space:
mode:
authorBobby Holley <bobbyholley@gmail.com>2017-04-26 18:34:29 -0700
committerBobby Holley <bobbyholley@gmail.com>2017-04-27 11:13:11 -0700
commitf4d81b010b621ceb47a35c921f8cdf1a7959dff9 (patch)
treefba8628862008bdc17a4542996ef8ffa64fa2e5a /components/style/servo/selector_parser.rs
parent6e413653e72fd1eb471d779be63bccfa05d7c47f (diff)
downloadservo-f4d81b010b621ceb47a35c921f8cdf1a7959dff9.tar.gz
servo-f4d81b010b621ceb47a35c921f8cdf1a7959dff9.zip
Properly handle -moz-any for revalidation selectors.
Note that, while the comment is correct that there is a fair amount of -moz-any usage in the UA sheet, it's always used as an ancestor selector, and thus ignored for our purposes. Nevertheless, it's straightforward enough to support properly, so we do that here. MozReview-Commit-ID: Kz1yNfPUIaP
Diffstat (limited to 'components/style/servo/selector_parser.rs')
-rw-r--r--components/style/servo/selector_parser.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/components/style/servo/selector_parser.rs b/components/style/servo/selector_parser.rs
index e0277b31480..0335b249cb1 100644
--- a/components/style/servo/selector_parser.rs
+++ b/components/style/servo/selector_parser.rs
@@ -235,6 +235,11 @@ impl NonTSPseudoClass {
ServoNonZeroBorder => ElementState::empty(),
}
}
+
+ /// Returns true if the given pseudoclass should trigger style sharing cache revalidation.
+ pub fn needs_cache_revalidation(&self) -> bool {
+ self.state_flag().is_empty()
+ }
}
/// The abstract struct we implement the selector parser implementation on top