Changeset 24185 in webkit


Ignore:
Timestamp:
Jul 11, 2007 12:40:18 AM (17 years ago)
Author:
rwlbuis
Message:

Reviewed by Darin.

http://bugs.webkit.org/show_bug.cgi?id=14453
REGRESSION: www.nzherald.co.nz almost all the formating is gone

Be less strict for the hex color definition.

Location:
trunk
Files:
4 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r24182 r24185  
     12007-07-11  Rob Buis  <buis@kde.org>
     2
     3        Reviewed by Darin.
     4
     5        Regression test for:
     6        http://bugs.webkit.org/show_bug.cgi?id=14453
     7        REGRESSION: www.nzherald.co.nz almost all the formating is gone
     8
     9        * css2.1/bogus-color-span-expected.checksum: Added.
     10        * css2.1/bogus-color-span-expected.png: Added.
     11        * css2.1/bogus-color-span-expected.txt: Added.
     12        * css2.1/bogus-color-span.html: Added.
     13
    1142007-07-10  Sam Weinig  <sam@webkit.org>
    215
  • trunk/WebCore/ChangeLog

    r24184 r24185  
     12007-07-11  Rob Buis  <buis@kde.org>
     2
     3        Reviewed by Darin.
     4
     5        http://bugs.webkit.org/show_bug.cgi?id=14453
     6        REGRESSION: www.nzherald.co.nz almost all the formating is gone
     7 
     8        Be less strict for the hex color definition.
     9
     10        * css/CSSGrammar.y:
     11        * css/cssparser.cpp:
     12        (WebCore::CSSParser::lex):
     13        (WebCore::CSSParser::text):
     14        * css/tokenizer.flex:
     15
    1162007-07-11  Rob Buis  <buis@kde.org>
    217
  • trunk/WebCore/css/CSSGrammar.y

    r23854 r24185  
    173173%right <string> IDENT
    174174
    175 %nonassoc <string> HEX_OR_IDENT
     175%nonassoc <string> HEX
    176176%nonassoc <string> IDSEL
    177177%nonassoc ':'
     
    742742
    743743specifier:
    744     HEX_OR_IDENT {
     744    IDSEL {
    745745        CSSParser* p = static_cast<CSSParser*>(parser);
    746746        $$ = p->createFloatingSelector();
     
    751751        $$->m_value = atomicString($1);
    752752    }
    753   | IDSEL {
    754         CSSParser* p = static_cast<CSSParser*>(parser);
    755         $$ = p->createFloatingSelector();
    756         $$->m_match = CSSSelector::Id;
    757         if (!p->strict)
    758             $1.lower();
    759         $$->m_attr = idAttr;
    760         $$->m_value = atomicString($1);
     753  | HEX {
     754        if ($1.characters[0] >= '0' && $1.characters[0] <= '9') {
     755            $$ = 0;
     756        } else {
     757            CSSParser* p = static_cast<CSSParser*>(parser);
     758            $$ = p->createFloatingSelector();
     759            $$->m_match = CSSSelector::Id;
     760            if (!p->strict)
     761                $1.lower();
     762            $$->m_attr = idAttr;
     763            $$->m_value = atomicString($1);
     764        }
    761765    }
    762766  | class
     
    11251129 */
    11261130hexcolor:
    1127   HEX_OR_IDENT maybe_space { $$ = $1; }
     1131  HEX maybe_space { $$ = $1; }
     1132  | IDSEL maybe_space { $$ = $1; }
    11281133  ;
    11291134
  • trunk/WebCore/css/cssparser.cpp

    r23931 r24185  
    29692969    case STRING:
    29702970    case IDENT:
    2971     case HEX_OR_IDENT:
     2971    case HEX:
    29722972    case IDSEL:
    29732973    case DIMEN:
     
    30423042        l--;
    30433043        /* nobreak */
    3044     case HEX_OR_IDENT:
     3044    case HEX:
    30453045    case IDSEL:
    30463046        start++;
  • trunk/WebCore/css/tokenizer.flex

    r23922 r24185  
    4646{ident}                 {yyTok = IDENT; return yyTok;}
    4747
    48 "#"{hexcolor}           {yyTok = HEX_OR_IDENT; return yyTok;}
     48"#"{hexcolor}           {yyTok = HEX; return yyTok;}
    4949"#"{ident}              {yyTok = IDSEL; return yyTok;}
    5050
Note: See TracChangeset for help on using the changeset viewer.