style: Inline a bunch of stuff, fixup indentation of a couple things.

MozReview-Commit-ID: CgUNMeBDOCw
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
This commit is contained in:
Emilio Cobos Álvarez 2017-10-30 22:44:24 +01:00
parent c414e90b20
commit 18ac41fe87
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
2 changed files with 20 additions and 4 deletions

View file

@ -62,6 +62,7 @@ struct LocalMatchingContext<'a, 'b: 'a, Impl: SelectorImpl> {
matches_hover_and_active_quirk: bool,
}
#[inline(always)]
pub fn matches_selector_list<E>(
selector_list: &SelectorList<E::Impl>,
element: &E,
@ -373,6 +374,7 @@ where
}
/// Matches a complex selector.
#[inline(always)]
pub fn matches_complex_selector<E, F>(
mut iter: SelectorIter<E::Impl>,
element: &E,
@ -385,8 +387,8 @@ where
{
// If this is the special pseudo-element mode, consume the ::pseudo-element
// before proceeding, since the caller has already handled that part.
if context.nesting_level == 0 &&
context.matching_mode == MatchingMode::ForStatelessPseudoElement {
if context.matching_mode == MatchingMode::ForStatelessPseudoElement &&
context.nesting_level == 0 {
// Consume the pseudo.
match *iter.next().unwrap() {
Component::PseudoElement(ref pseudo) => {
@ -571,12 +573,12 @@ where
// Only ancestor combinators are allowed while looking for
// relevant links, so switch to not looking.
*relevant_link = RelevantLinkStatus::NotLooking;
SelectorMatchingResult::NotMatchedAndRestartFromClosestDescendant
SelectorMatchingResult::NotMatchedAndRestartFromClosestDescendant
}
Combinator::Child |
Combinator::Descendant |
Combinator::PseudoElement => {
SelectorMatchingResult::NotMatchedGlobally
SelectorMatchingResult::NotMatchedGlobally
}
};