Skip to content
  • commit-queue@webkit.org's avatar
    CSS3 Selectors failures on css3test.com · 38284758
    commit-queue@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=83885
    
    Patch by Uday Kiran <udaykiran@motorola.com> on 2012-04-16
    Reviewed by Zoltan Herczeg.
    
    Source/WebCore:
    
    Parsing fix for CSS3 selectors :nth-child(), :nth-last-child() :nth-of-type() :nth-last-of-type()
    with values -n-b and n-b as they are of valid form an+b where a and b are integers.
    http://www.w3.org/TR/selectors/#structural-pseudos
    
    Descriptors of form n-b or -n-b, where b is number, are valid CSS identifiers.
    However, in NthChildMode we need to check whether this identifier is a valid nth child descriptor.
    The original code only checked this if the string was n- or -n- but this is not enough.
    We need to check everything which starts with an n- or -n- prefix.
    
    Test: css3/parsing-css3-nthchild.html
    
    * css/CSSParser.cpp:
    (WebCore::CSSParser::lex):
    
    LayoutTests:
    
    * css3/parsing-css3-nthchild-expected.txt: Added.
    * css3/parsing-css3-nthchild.html: Added.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114261 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    38284758