Auto merge of #19822 - emilio:less-match-public, r=KiChjang

style: More tiny selector-matching cleanup

See each commit individually.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19822)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2018-01-19 23:05:18 -06:00 committed by GitHub
commit 6fc71a7644
4 changed files with 47 additions and 36 deletions

View file

@ -285,7 +285,7 @@ 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.matching_mode == MatchingMode::ForStatelessPseudoElement &&
if context.matching_mode() == MatchingMode::ForStatelessPseudoElement &&
!context.is_nested() {
// Consume the pseudo.
match *iter.next().unwrap() {
@ -349,7 +349,7 @@ fn matches_hover_and_active_quirk<Impl: SelectorImpl>(
// This compound selector had a pseudo-element to the right that we
// intentionally skipped.
if rightmost == Rightmost::Yes &&
context.matching_mode == MatchingMode::ForStatelessPseudoElement {
context.matching_mode() == MatchingMode::ForStatelessPseudoElement {
return MatchesHoverAndActiveQuirk::No;
}