diff options
author | Bobby Holley <bobbyholley@gmail.com> | 2017-04-26 18:34:29 -0700 |
---|---|---|
committer | Bobby Holley <bobbyholley@gmail.com> | 2017-04-27 11:13:11 -0700 |
commit | f4d81b010b621ceb47a35c921f8cdf1a7959dff9 (patch) | |
tree | fba8628862008bdc17a4542996ef8ffa64fa2e5a /components/style/servo/selector_parser.rs | |
parent | 6e413653e72fd1eb471d779be63bccfa05d7c47f (diff) | |
download | servo-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.rs | 5 |
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 |