Skip to content
Permalink
Browse files

style: Fix servo build.

  • Loading branch information...
emilio committed May 6, 2019
1 parent 57874ae commit 561018da7d3302c3205f059440ecd987d5be1a92
Showing with 13 additions and 4 deletions.
  1. +13 −4 components/style/servo/selector_parser.rs
@@ -66,10 +66,6 @@ pub const PSEUDO_COUNT: usize = PseudoElement::ServoInlineAbsolute as usize + 1;

impl ::selectors::parser::PseudoElement for PseudoElement {
type Impl = SelectorImpl;

fn supports_pseudo_class(&self, _: &NonTSPseudoClass) -> bool {
false
}
}

impl ToCss for PseudoElement {
@@ -293,6 +289,14 @@ impl ::selectors::parser::NonTSPseudoClass for NonTSPseudoClass {
fn is_active_or_hover(&self) -> bool {
matches!(*self, NonTSPseudoClass::Active | NonTSPseudoClass::Hover)
}

#[inline]
fn is_user_action_state(&self) -> bool {
matches!(
*self,
NonTSPseudoClass::Active | NonTSPseudoClass::Hover | NonTSPseudoClass::Focus
)
}
}

impl ToCss for NonTSPseudoClass {
@@ -393,6 +397,7 @@ impl ::selectors::SelectorImpl for SelectorImpl {
type AttrValue = String;
type Identifier = Atom;
type ClassName = Atom;
type PartName = Atom;
type LocalName = LocalName;
type NamespacePrefix = Prefix;
type NamespaceUrl = Namespace;
@@ -679,6 +684,10 @@ impl ElementSnapshot for ServoElementSnapshot {
.map(|v| v.as_atom())
}

fn is_part(&self, _name: &Atom) -> bool {
false
}

fn has_class(&self, name: &Atom, case_sensitivity: CaseSensitivity) -> bool {
self.get_attr(&ns!(), &local_name!("class"))
.map_or(false, |v| {

0 comments on commit 561018d

Please sign in to comment.
You can’t perform that action at this time.