mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
:-moz-locale-dir shouldn't be a revalidation selector.
Fixes Gecko bug 1374019 <https://bugzilla.mozilla.org/show_bug.cgi?id=1374019>
This commit is contained in:
parent
c5433277b4
commit
eddca4d6f6
1 changed files with 18 additions and 5 deletions
|
@ -176,16 +176,29 @@ 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,
|
||||
// :-moz-any is handled by the revalidation visitor walking
|
||||
// the things inside it; it does not need to cause
|
||||
// revalidation on its own.
|
||||
NonTSPseudoClass::MozAny(_) |
|
||||
// :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.
|
||||
NonTSPseudoClass::Dir(_) |
|
||||
// :-moz-is-html only depends on the state of the document and
|
||||
// the namespace of the element; the former is invariant
|
||||
// across all the elements involved and the latter is already
|
||||
// checked for by our caching precondtions.
|
||||
NonTSPseudoClass::MozIsHTML |
|
||||
NonTSPseudoClass::MozPlaceholder)
|
||||
// :-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(_)
|
||||
)
|
||||
}
|
||||
|
||||
/// Convert NonTSPseudoClass to Gecko's CSSPseudoClassType.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue