style: Fix Gecko and Servo builds, and appease tidy.

This commit is contained in:
Emilio Cobos Álvarez 2019-03-26 16:23:12 +01:00
parent f9ce3a9da2
commit ff41f82720
16 changed files with 155 additions and 78 deletions

View file

@ -33,7 +33,10 @@ impl ::selectors::parser::PseudoElement for PseudoElement {
fn valid_after_slotted(&self) -> bool {
matches!(
*self,
PseudoElement::Before | PseudoElement::After | PseudoElement::Marker | PseudoElement::Placeholder
PseudoElement::Before |
PseudoElement::After |
PseudoElement::Marker |
PseudoElement::Placeholder
)
}
@ -109,6 +112,12 @@ impl PseudoElement {
*self == PseudoElement::After
}
/// Whether this pseudo-element is the ::marker pseudo.
#[inline]
pub fn is_marker(&self) -> bool {
*self == PseudoElement::Marker
}
/// Whether this pseudo-element is ::first-letter.
#[inline]
pub fn is_first_letter(&self) -> bool {