-
yael.aharon@nokia.com authored
https://bugs.webkit.org/show_bug.cgi?id=51231 Reviewed by Darin Adler. Also fixes CSSNthSelector parsing code is illegible and buggy (allows "n3" as a valid selector) https://bugs.webkit.org/show_bug.cgi?id=21815 Add a check in the parser that other than an+b, only "odd" or "even" would be allowed as parameters to nth selector. Tests: fast/css/css3-nth-tokens-script.html fast/css/css3-nth-tokens-style.html * css/CSSGrammar.y: * css/CSSParser.cpp: (WebCore::isValidNthToken): * css/CSSParser.h: LayoutTests: document.querySelector(':nth-child(foo)') should throw a syntax error https://bugs.webkit.org/show_bug.cgi?id=51231 CSSNthSelector parsing code is illegible and buggy (allows "n3" as a valid selector) https://bugs.webkit.org/show_bug.cgi?id=21815 Reviewed by Darin Adler. * fast/css/css3-nth-tokens-script-expected.txt: Added. * fast/css/css3-nth-tokens-script.html: Added. * fast/css/css3-nth-tokens-style-expected.txt: Added. * fast/css/css3-nth-tokens-style.html: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75158 268f45cc-cd09-0410-ab3c-d52691b4dbfc
74e1d449