Changeset 52943 in webkit


Ignore:
Timestamp:
Jan 7, 2010 12:58:14 PM (14 years ago)
Author:
eric@webkit.org
Message:

2010-01-07 Yuzo Fujishima <yuzo@google.com>

Reviewed by Darin Adler.

Allow leading/trailing space for CSS nth-*() and lang().
https://bugs.webkit.org/show_bug.cgi?id=17248

For pseudo-classes :nth-*() and :lang(), space must be allowed after '(' and before ')'.
See the bug comments for why we don't allow space at other places.

  • fast/css/css3-space-in-nth-and-lang.html: Added.
  • platform/mac/fast/css/css3-space-in-nth-and-lang-expected.txt: Added.

2010-01-07 Yuzo Fujishima <yuzo@google.com>

Reviewed by Darin Adler.

Allow leading/trailing space for CSS nth-*() and lang().
https://bugs.webkit.org/show_bug.cgi?id=17248

For pseudo-classes :nth-*() and :lang(), space must be allowed after '(' and before ')'.
See the bug comments for why we don't allow space at other places.

  • css/CSSGrammar.y:
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r52941 r52943  
     12010-01-07  Yuzo Fujishima  <yuzo@google.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        Allow leading/trailing space for CSS nth-*() and lang().
     6        https://bugs.webkit.org/show_bug.cgi?id=17248
     7
     8        For pseudo-classes :nth-*() and :lang(), space must be allowed after '(' and before ')'.
     9        See the bug comments for why we don't allow space at other places.
     10
     11        * fast/css/css3-space-in-nth-and-lang.html: Added.
     12        * platform/mac/fast/css/css3-space-in-nth-and-lang-expected.txt: Added.
     13
    1142010-01-07  Chris Fleizach  <cfleizach@apple.com>
    215
  • trunk/WebCore/ChangeLog

    r52941 r52943  
     12010-01-07  Yuzo Fujishima  <yuzo@google.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        Allow leading/trailing space for CSS nth-*() and lang().
     6        https://bugs.webkit.org/show_bug.cgi?id=17248
     7
     8        For pseudo-classes :nth-*() and :lang(), space must be allowed after '(' and before ')'.
     9        See the bug comments for why we don't allow space at other places.
     10
     11        * css/CSSGrammar.y:
     12
    1132010-01-07  Chris Fleizach  <cfleizach@apple.com>
    214
  • trunk/WebCore/css/CSSGrammar.y

    r52784 r52943  
    11101110    }
    11111111    // used by :nth-*(ax+b)
    1112     | ':' FUNCTION NTH ')' {
     1112    | ':' FUNCTION maybe_space NTH maybe_space ')' {
    11131113        CSSParser *p = static_cast<CSSParser*>(parser);
    11141114        $$ = p->createFloatingSelector();
    11151115        $$->m_match = CSSSelector::PseudoClass;
    1116         $$->setArgument($3);
     1116        $$->setArgument($4);
    11171117        $$->m_value = $2;
    11181118        CSSSelector::PseudoType type = $$->pseudoType();
     
    11281128    }
    11291129    // used by :nth-*
    1130     | ':' FUNCTION INTEGER ')' {
     1130    | ':' FUNCTION maybe_space INTEGER maybe_space ')' {
    11311131        CSSParser *p = static_cast<CSSParser*>(parser);
    11321132        $$ = p->createFloatingSelector();
    11331133        $$->m_match = CSSSelector::PseudoClass;
    1134         $$->setArgument(String::number($3));
     1134        $$->setArgument(String::number($4));
    11351135        $$->m_value = $2;
    11361136        CSSSelector::PseudoType type = $$->pseudoType();
     
    11461146    }
    11471147    // used by :nth-*(odd/even) and :lang
    1148     | ':' FUNCTION IDENT ')' {
     1148    | ':' FUNCTION maybe_space IDENT maybe_space ')' {
    11491149        CSSParser *p = static_cast<CSSParser*>(parser);
    11501150        $$ = p->createFloatingSelector();
    11511151        $$->m_match = CSSSelector::PseudoClass;
    1152         $$->setArgument($3);
     1152        $$->setArgument($4);
    11531153        $2.lower();
    11541154        $$->m_value = $2;
Note: See TracChangeset for help on using the changeset viewer.