Ignore:
Timestamp:
01/06/11 08:46:36 (4 years ago)
Author:
yael.aharon@nokia.com
Message:

WebCore: document.querySelector(':nth-child(foo)') should throw a syntax error
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.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r75155 r75158  
     12011-01-06  Yael Aharon  <yael.aharon@nokia.com> 
     2 
     3        Reviewed by Darin Adler. 
     4 
     5        document.querySelector(':nth-child(foo)') should throw a syntax error 
     6        https://bugs.webkit.org/show_bug.cgi?id=51231 
     7        CSSNthSelector parsing code is illegible and buggy (allows "n3" as a valid selector) 
     8        https://bugs.webkit.org/show_bug.cgi?id=21815 
     9 
     10        * fast/css/css3-nth-tokens-script-expected.txt: Added. 
     11        * fast/css/css3-nth-tokens-script.html: Added. 
     12        * fast/css/css3-nth-tokens-style-expected.txt: Added. 
     13        * fast/css/css3-nth-tokens-style.html: Added. 
     14 
    1152011-01-06  Andrei Popescu  <andreip@google.com> 
    216 
Note: See TracChangeset for help on using the changeset viewer.