Add initial parsing functionality of :lang pseudo class in Selectors Level 4.
https://bugs.webkit.org/show_bug.cgi?id=138170

Patch by Dhi Aurrahman <diorahman@rockybars.com> on 2014-10-31
Reviewed by Benjamin Poulain.

Source/WebCore:

Add initial parsing functionality of :lang pseudo class in Selectors Level 4,
as specified in [1].

It parses comma-separated list of string arguments. Currently, it throws error
on arguments with "*" (e.g. :lang(zh, *-hant)).

Add additional test file fast/selectors/lang-invalid.html along side the
fast/css/css-selector-text.html.

[1] http://dev.w3.org/csswg/selectors4/#the-lang-pseudo

Test: fast/selectors/lang-invalid.html

* css/CSSGrammar.y.in:
* css/CSSParser.cpp:
(WebCore::CSSParser::detectFunctionTypeToken):
* css/CSSParserValues.cpp:
(WebCore::CSSParserSelector::setArgumentList):
* css/CSSParserValues.h:
* css/CSSSelector.cpp:
(WebCore::appendArgumentList):
(WebCore::CSSSelector::selectorText):
(WebCore::CSSSelector::setArgumentList):
* css/CSSSelector.h:
(WebCore::CSSSelector::argumentList):
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addPseudoClassType):

LayoutTests:

Add tests for comma-separated list arguments for :lang

* fast/css/css-selector-text-expected.txt: Updated.
* fast/css/css-selector-text.html: Updated.
* fast/selectors/lang-invalid-expected.txt: Added.
* fast/selectors/lang-invalid.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@175446 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix the Debug builds after r175446

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-10-31

* css/CSSSelector.cpp:
(WebCore::CSSSelector::selectorText):


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