mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
style: Replace :-moz-native-anonymous-no-specificity with :where(:-moz-native-anonymous).
Differential Revision: https://phabricator.services.mozilla.com/D88255
This commit is contained in:
parent
9ce200a924
commit
639bada63a
2 changed files with 3 additions and 15 deletions
|
@ -17,7 +17,7 @@
|
|||
//! is non-trivial. This module encapsulates those details and presents an
|
||||
//! easy-to-use API for the parser.
|
||||
|
||||
use crate::parser::{Combinator, Component, NonTSPseudoClass, SelectorImpl};
|
||||
use crate::parser::{Combinator, Component, SelectorImpl};
|
||||
use crate::sink::Push;
|
||||
use servo_arc::{Arc, HeaderWithLength, ThinArc};
|
||||
use smallvec::{self, SmallVec};
|
||||
|
@ -322,14 +322,10 @@ where
|
|||
Component::NthLastOfType(..) |
|
||||
Component::FirstOfType |
|
||||
Component::LastOfType |
|
||||
Component::OnlyOfType => {
|
||||
Component::OnlyOfType |
|
||||
Component::NonTSPseudoClass(..) => {
|
||||
specificity.class_like_selectors += 1;
|
||||
},
|
||||
Component::NonTSPseudoClass(ref pseudo) => {
|
||||
if !pseudo.has_zero_specificity() {
|
||||
specificity.class_like_selectors += 1;
|
||||
}
|
||||
},
|
||||
Component::Is(ref list) => {
|
||||
// https://drafts.csswg.org/selectors/#specificity-rules:
|
||||
//
|
||||
|
|
|
@ -53,9 +53,6 @@ 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;
|
||||
|
||||
fn visit<V>(&self, _visitor: &mut V) -> bool
|
||||
where
|
||||
V: SelectorVisitor<Impl = Self::Impl>,
|
||||
|
@ -2564,11 +2561,6 @@ 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