mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
style: Correctly style dark scrollbars in tree components.
We need to ensure the rules that override all properties for scrollbar part elements only apply to those that are NAC (and so will be eligible for NAC style sharing). We have some uses of non-NAC <scrollbar> elements that should continue to inherit properties from their parents. To avoid any changes in rule matching order that come with changing specificity, we add a new :-moz-native-anonymous-no-specificity pseudo-class. While we're here, we note :-moz-native-anonymous-no-specificity (and the regular :-moz-native-anonymous pseudo-class) as not needing style sharing cache revalidation, as we never share NAC styles. Differential Revision: https://phabricator.services.mozilla.com/D56154
This commit is contained in:
parent
e944962fe2
commit
6973317a58
6 changed files with 31 additions and 4 deletions
|
@ -52,6 +52,9 @@ pub trait NonTSPseudoClass: Sized + ToCss {
|
|||
///
|
||||
/// https://drafts.csswg.org/selectors-4/#useraction-pseudos
|
||||
fn is_user_action_state(&self) -> bool;
|
||||
|
||||
/// Whether this pseudo-class has zero specificity.
|
||||
fn has_zero_specificity(&self) -> bool;
|
||||
}
|
||||
|
||||
/// Returns a Cow::Borrowed if `s` is already ASCII lowercase, and a
|
||||
|
@ -2336,6 +2339,11 @@ pub mod tests {
|
|||
fn is_user_action_state(&self) -> bool {
|
||||
self.is_active_or_hover()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn has_zero_specificity(&self) -> bool {
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
impl ToCss for PseudoClass {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue