aboutsummaryrefslogtreecommitdiffstats
path: root/components/selectors/parser.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/selectors/parser.rs')
-rw-r--r--components/selectors/parser.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/components/selectors/parser.rs b/components/selectors/parser.rs
index 507121bbf97..92a5b039b90 100644
--- a/components/selectors/parser.rs
+++ b/components/selectors/parser.rs
@@ -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 {