Merge CheckingContexts from SelectorCompiler and SelectorChecker
https://bugs.webkit.org/show_bug.cgi?id=135255

Reviewed by Benjamin Poulain.

In this patch, we merge SelectorChecker::SelectorCheckingContext and SelectorCompiler::CheckingContext.
We expose only SelectorChecker::CheckingContext. That is the same to the old SelectorCompiler::CheckingContext.

In SelectorChecker.cpp, we define SelectorChecker::CheckingContextWithStatus and use it internally.
And we move VisitedMatchType from SelectorChecker.h to SelectorChecker.cpp.

VisitedMatchType is also explicitly used by SelectorCheckerFastPath. However, SelectorCheckerFastPath is now
used only from SelectorQuery (Style resolution algorithm no longer uses it: r171059).
In this patch, we remove SelectorCheckerFastPath since the major cases are covered by CSS JIT.
In `RightMostWithIdMatch`, `Element#matches` and multiple selectors `querySelector('a, b')` cases,
CSS JIT is not used. So dropping fast path affects them. But 1) these cases are rare or 2) the target node
is typically only one since nodes are filtered before matching. So it doesn't have performance regression.

And now since CheckingContextWithStatus is the derived class of CheckingContext, we can use
the same test functions; template parameter is not necessary. It reduces code size.

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSAllInOne.cpp:
* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::ruleMatches):
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::CheckingContextWithStatus::CheckingContextWithStatus):
(WebCore::SelectorChecker::match):
(WebCore::checkingContextForParent):
(WebCore::SelectorChecker::matchRecursively):
(WebCore::canMatchHoverOrActiveInQuirksMode):
(WebCore::SelectorChecker::checkOne):
(WebCore::SelectorChecker::checkScrollbarPseudoClass):
* css/SelectorChecker.h:
(WebCore::SelectorChecker::CheckingContext::CheckingContext):
(WebCore::SelectorChecker::SelectorCheckingContext::SelectorCheckingContext): Deleted.
* css/SelectorCheckerFastPath.cpp: Removed.
* css/SelectorCheckerFastPath.h: Removed.
* css/SelectorCheckerTestFunctions.h:
(WebCore::scrollbarMatchesEnabledPseudoClass):
(WebCore::scrollbarMatchesDisabledPseudoClass):
(WebCore::scrollbarMatchesHoverPseudoClass):
(WebCore::scrollbarMatchesActivePseudoClass):
(WebCore::scrollbarMatchesHorizontalPseudoClass):
(WebCore::scrollbarMatchesVerticalPseudoClass):
(WebCore::scrollbarMatchesDecrementPseudoClass):
(WebCore::scrollbarMatchesIncrementPseudoClass):
(WebCore::scrollbarMatchesStartPseudoClass):
(WebCore::scrollbarMatchesEndPseudoClass):
(WebCore::scrollbarMatchesDoubleButtonPseudoClass):
(WebCore::scrollbarMatchesSingleButtonPseudoClass):
(WebCore::scrollbarMatchesNoButtonPseudoClass):
(WebCore::scrollbarMatchesCornerPresentPseudoClass):
* css/StyleResolver.h:
(WebCore::checkRegionSelector):
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorFragment::appendUnoptimizedPseudoClassWithContext):
(WebCore::SelectorCompiler::addScrollbarPseudoClassType):
(WebCore::SelectorCompiler::SelectorCodeGenerator::addFlagsToElementStyleFromContext):
(WebCore::SelectorCompiler::SelectorCodeGenerator::branchOnResolvingModeWithCheckingContext):
(WebCore::SelectorCompiler::elementIsActiveForStyleResolution):
(WebCore::SelectorCompiler::setElementStyleFromContextIsAffectedByEmptyAndUpdateRenderStyleIfNecessary):
(WebCore::SelectorCompiler::elementIsHoveredForStyleResolution):
(WebCore::SelectorCompiler::makeContextStyleUniqueIfNecessaryAndTestIsPlaceholderShown):
(WebCore::SelectorCompiler::makeElementStyleUniqueIfNecessaryAndTestIsPlaceholderShown):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateRequestedPseudoElementEqualsToSelectorPseudoElement):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsScopeRoot):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateMarkPseudoStyleForPseudoElement):
* cssjit/SelectorCompiler.h:
(WebCore::SelectorCompiler::CheckingContext::CheckingContext): Deleted.
* dom/SelectorQuery.cpp:
(WebCore::SelectorDataList::SelectorDataList):
(WebCore::SelectorDataList::selectorMatches):
(WebCore::SelectorDataList::executeCompiledSelectorCheckerWithCheckingContext):
(WebCore::isCompiledSelector):
(WebCore::SelectorDataList::compileSelector):
(WebCore::SelectorDataList::execute):
* dom/SelectorQuery.h:
(WebCore::SelectorDataList::SelectorData::SelectorData):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173457 268f45cc-cd09-0410-ab3c-d52691b4dbfc