Always serialize :lang()'s arguments to strings
authordiorahman@rockybars.com <diorahman@rockybars.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Feb 2015 14:21:28 +0000 (14:21 +0000)
committerdiorahman@rockybars.com <diorahman@rockybars.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Feb 2015 14:21:28 +0000 (14:21 +0000)
commitd1ea0488fc857d8123076a987dbfbcc8bdece2c3
tree3fedbfe3b0ac2934867fbe5e2d0397b69046174d
parentf9c0692dfdda3c803e4295061c4cadc77f42c0ae
Always serialize :lang()'s arguments to strings
https://bugs.webkit.org/show_bug.cgi?id=141944

Reviewed by Benjamin Poulain.

Source/WebCore:

As specified in [1] :lang()'s arguments are always serialized to strings.

[1] http://dev.w3.org/csswg/cssom/#serializing-selectors

Related tests are updated.

* css/CSSGrammar.y.in:
* css/CSSParserValues.cpp:
(WebCore::CSSParserSelector::setLangArgumentList):
* css/CSSParserValues.h:
(WebCore::CSSParserString::init):
(WebCore::CSSParserString::clear):
(WebCore::CSSParserString::tokenType): Deleted.
(WebCore::CSSParserString::setTokenType): Deleted.
* css/CSSSelector.cpp:
(WebCore::appendLangArgumentList):
(WebCore::CSSSelector::setLangArgumentList):
* css/CSSSelector.h:
(WebCore::CSSSelector::langArgumentList):
* css/SelectorCheckerTestFunctions.h:
(WebCore::matchesLangPseudoClass):
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addPseudoClassType):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsInLanguage):

LayoutTests:

Some tests results are updated to reflect the always serialize
:lang()'s arguments to strings.

* fast/css/css-lang-selector-with-string-arguments-text-expected.txt:
* fast/css/css-lang-selector-with-string-arguments-text.html:
* fast/css/parsing-css-lang-expected.txt:
* fast/css/parsing-css-lang.html:
* 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/dom/css-selectorText-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@180558 268f45cc-cd09-0410-ab3c-d52691b4dbfc
18 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/css/css-lang-selector-with-string-arguments-text-expected.txt
LayoutTests/fast/css/css-lang-selector-with-string-arguments-text.html
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/css/parsing-css-lang-expected.txt
LayoutTests/fast/css/parsing-css-lang.html
LayoutTests/fast/dom/css-selectorText-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/css/CSSGrammar.y.in
Source/WebCore/css/CSSParserValues.cpp
Source/WebCore/css/CSSParserValues.h
Source/WebCore/css/CSSSelector.cpp
Source/WebCore/css/CSSSelector.h
Source/WebCore/css/SelectorCheckerTestFunctions.h
Source/WebCore/cssjit/SelectorCompiler.cpp