mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Auto merge of #17562 - emilio:less-revalidation-stuff, r=bzbarsky
style: Don't treat some document-state-related pseudo-classes as revalidation selectors. <!-- 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/17562) <!-- Reviewable:end -->
This commit is contained in:
commit
be58b99b06
1 changed files with 11 additions and 5 deletions
|
@ -174,7 +174,8 @@ impl NonTSPseudoClass {
|
|||
apply_non_ts_list!(pseudo_class_state)
|
||||
}
|
||||
|
||||
/// Returns true if the given pseudoclass should trigger style sharing cache revalidation.
|
||||
/// Returns true if the given pseudoclass should trigger style sharing cache
|
||||
/// revalidation.
|
||||
pub fn needs_cache_revalidation(&self) -> bool {
|
||||
self.state_flag().is_empty() &&
|
||||
!matches!(*self,
|
||||
|
@ -194,10 +195,15 @@ impl NonTSPseudoClass {
|
|||
NonTSPseudoClass::MozIsHTML |
|
||||
// :-moz-placeholder is parsed but never matches.
|
||||
NonTSPseudoClass::MozPlaceholder |
|
||||
// :-moz-locale-dir depends only on the state of the document,
|
||||
// which is invariant across all the elements involved in a
|
||||
// given style cache.
|
||||
NonTSPseudoClass::MozLocaleDir(_)
|
||||
// :-moz-locale-dir and :-moz-window-inactive depend only on
|
||||
// the state of the document, which is invariant across all
|
||||
// the elements involved in a given style cache.
|
||||
NonTSPseudoClass::MozLocaleDir(_) |
|
||||
NonTSPseudoClass::MozWindowInactive |
|
||||
// Similar for the document themes.
|
||||
NonTSPseudoClass::MozLWTheme |
|
||||
NonTSPseudoClass::MozLWThemeBrightText |
|
||||
NonTSPseudoClass::MozLWThemeDarkText
|
||||
)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue