mirror of
https://github.com/servo/servo.git
synced 2025-06-18 22:34:30 +01:00
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:
parent
c414e90b20
commit
18ac41fe87
2 changed files with 20 additions and 4 deletions
|
@ -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
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue