[CSS Parser] Fix compound selector parsing.
authorhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Oct 2016 15:07:19 +0000 (15:07 +0000)
committerhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Oct 2016 15:07:19 +0000 (15:07 +0000)
commit32372186cb5f44f14a947ab2e6fefb44f53ba308
tree3bc8aa8e64aa8a376cf7bd5a29059be185592afe
parent946b5679cdf9b42eb4002e438d7683d7761fb7be
[CSS Parser] Fix compound selector parsing.
https://bugs.webkit.org/show_bug.cgi?id=163649

Reviewed by Darin Adler.

The new CSS parser is failing to handle compound selectors. The code has an assumption that the
first value in the RelationType enum is SubSelector. This patch changes the enum to have the same
name used in Blink, RelationType, and to make the ordering be exactly the same.

* css/CSSSelector.h:
(WebCore::CSSSelector::relation):
(WebCore::CSSSelector::setRelation):
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::matchRecursively):
(WebCore::canMatchHoverOrActiveInQuirksMode):
(WebCore::SelectorChecker::determineLinkMatchType):
* css/SelectorFilter.cpp:
(WebCore::SelectorFilter::collectIdentifierHashes):
* css/parser/CSSParserValues.cpp:
(WebCore::CSSParserSelector::insertTagHistory):
(WebCore::CSSParserSelector::appendTagHistory):
* css/parser/CSSParserValues.h:
(WebCore::CSSParserSelector::setRelation):
* css/parser/CSSSelectorParser.cpp:
(WebCore::CSSSelectorParser::consumeComplexSelector):
(WebCore::CSSSelectorParser::consumeCombinator):
* css/parser/CSSSelectorParser.h:
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::fragmentRelationForSelectorRelation):
(WebCore::SelectorCompiler::constructFragmentsInternal):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@207536 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed:
Source/WebCore/ChangeLog
Source/WebCore/css/CSSSelector.cpp
Source/WebCore/css/CSSSelector.h
Source/WebCore/css/CSSSelectorList.cpp
Source/WebCore/css/RuleSet.cpp
Source/WebCore/css/SelectorChecker.cpp
Source/WebCore/css/SelectorFilter.cpp
Source/WebCore/css/parser/CSSParser.cpp
Source/WebCore/css/parser/CSSParserValues.cpp
Source/WebCore/css/parser/CSSParserValues.h
Source/WebCore/css/parser/CSSSelectorParser.cpp
Source/WebCore/css/parser/CSSSelectorParser.h
Source/WebCore/cssjit/SelectorCompiler.cpp
Source/WebCore/dom/SelectorQuery.cpp