mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Don't require style sharing cache invalidation for :dir
This commit is contained in:
parent
0388e11db2
commit
993cb6eb41
1 changed files with 5 additions and 1 deletions
|
@ -159,8 +159,12 @@ impl NonTSPseudoClass {
|
|||
|
||||
/// Returns true if the given pseudoclass should trigger style sharing cache revalidation.
|
||||
pub fn needs_cache_revalidation(&self) -> bool {
|
||||
// :dir() depends on state only, but doesn't use state_flag because its
|
||||
// semantics don't quite match. Nevertheless, it doesn't need cache
|
||||
// revalidation, because we already compare states for elements and
|
||||
// candidates.
|
||||
self.state_flag().is_empty() &&
|
||||
!matches!(*self, NonTSPseudoClass::MozAny(_))
|
||||
!matches!(*self, NonTSPseudoClass::MozAny(_) | NonTSPseudoClass::Dir(_))
|
||||
}
|
||||
|
||||
/// Convert NonTSPseudoClass to Gecko's CSSPseudoClassType.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue