Add parsing for :dir()
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 26 Nov 2014 00:27:52 +0000 (00:27 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 26 Nov 2014 00:27:52 +0000 (00:27 +0000)
commit7895d19d71799ab8bce4c52e2b623f255ce97ebf
tree47779dd5d37d51c77be1e4a525cbf324589384c9
parent54106488cf59dc61835b87e3711d7a7a457ebcb2
Add parsing for :dir()
https://bugs.webkit.org/show_bug.cgi?id=138932

Patch by Sukolsak Sakshuwong <sukolsak@gmail.com> on 2014-11-25
Reviewed by Benjamin Poulain.

Source/WebCore:

Add support for parsing :dir() pseudo class. The implementation of selector
matching will be in a follow-up patch.

* css/CSSGrammar.y.in:
* css/CSSParser.cpp:
(WebCore::CSSParser::detectFunctionTypeToken):
* css/CSSSelector.cpp:
(WebCore::appendPseudoClassFunctionTail):
(WebCore::CSSSelector::selectorText):
* css/CSSSelector.h:
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
* css/SelectorPseudoClassAndCompatibilityElementMap.in:
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addPseudoClassType):

LayoutTests:

* fast/css/css-selector-text-expected.txt:
* fast/css/css-selector-text.html:
* fast/css/css-set-selector-text-expected.txt:
* fast/css/css-set-selector-text.html:
* fast/selectors/invalid-functional-pseudo-class-expected.txt:
* fast/selectors/invalid-functional-pseudo-class.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@176545 268f45cc-cd09-0410-ab3c-d52691b4dbfc
15 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/css/css-selector-text-expected.txt
LayoutTests/fast/css/css-selector-text.html
LayoutTests/fast/css/css-set-selector-text-expected.txt
LayoutTests/fast/css/css-set-selector-text.html
LayoutTests/fast/selectors/invalid-functional-pseudo-class-expected.txt
LayoutTests/fast/selectors/invalid-functional-pseudo-class.html
Source/WebCore/ChangeLog
Source/WebCore/css/CSSGrammar.y.in
Source/WebCore/css/CSSParser.cpp
Source/WebCore/css/CSSSelector.cpp
Source/WebCore/css/CSSSelector.h
Source/WebCore/css/SelectorChecker.cpp
Source/WebCore/css/SelectorPseudoClassAndCompatibilityElementMap.in
Source/WebCore/cssjit/SelectorCompiler.cpp