Show
Ignore:
Timestamp:
08/06/08 13:29:36 (5 months ago)
Author:
mbensi
Message:

merge with webkit revision 35588

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/WebCore/css/CSSGrammar.y

    r424 r431  
    3434#include "HTMLNames.h" 
    3535#include "MediaList.h" 
     36#include "WebKitCSSKeyframeRule.h" 
     37#include "WebKitCSSKeyframesRule.h" 
    3638#include <stdlib.h> 
    3739#include <string.h> 
     
    7173    CSSParserValueList* valueList; 
    7274    Vector<MediaQueryExp*>* mediaQueryExpList; 
     75    WebKitCSSKeyframeRule* keyframeRule; 
     76    WebKitCSSKeyframesRule* keyframesRule; 
     77    float val; 
    7378} 
    7479 
     
    121126%token WEBKIT_RULE_SYM 
    122127%token WEBKIT_DECLS_SYM 
     128%token WEBKIT_KEYFRAMES_SYM 
    123129%token WEBKIT_VALUE_SYM 
    124130%token WEBKIT_MEDIAQUERY_SYM 
     
    173179%type <rule> page 
    174180%type <rule> font_face 
     181%type <rule> keyframes 
    175182%type <rule> invalid_rule 
    176183%type <rule> save_block 
     
    206213%type <mediaQueryExpList> maybe_and_media_query_exp_list 
    207214 
     215%type <string> keyframe_name 
     216%type <keyframeRule> keyframe_rule 
     217%type <keyframesRule> keyframes_rule 
     218%type <val> key 
     219 
    208220%type <integer> property 
    209221 
     
    379391  | page 
    380392  | font_face 
     393  | keyframes 
    381394  ; 
    382395 
     
    658671  } 
    659672  ; 
     673 
     674keyframes: 
     675    WEBKIT_KEYFRAMES_SYM maybe_space keyframe_name maybe_space '{' maybe_space keyframes_rule '}' { 
     676        $$ = $7; 
     677        $7->setName($3); 
     678    } 
     679    ; 
     680   
     681keyframe_name: 
     682    IDENT 
     683    | STRING 
     684    ; 
     685 
     686keyframes_rule: 
     687    /* empty */ { $$ = static_cast<CSSParser*>(parser)->createKeyframesRule(); } 
     688    | keyframes_rule keyframe_rule maybe_space { 
     689        $$ = $1; 
     690        if ($2) 
     691            $$->insert($2); 
     692    } 
     693    ; 
     694 
     695keyframe_rule: 
     696    key maybe_space '{' maybe_space declaration_list '}' { 
     697        $$ = static_cast<CSSParser*>(parser)->createKeyframeRule($1); 
     698    } 
     699    ; 
     700 
     701key: 
     702    PERCENTAGE { $$ = (float) $1; } 
     703    | IDENT { 
     704        $$ = -1; 
     705        CSSParserString& str = $1; 
     706        if (equalIgnoringCase(static_cast<const String&>(str), "from")) 
     707            $$ = 0; 
     708        else if (equalIgnoringCase(static_cast<const String&>(str), "to")) 
     709            $$ = 100; 
     710        else 
     711            YYERROR; 
     712    } 
     713    ; 
    660714 
    661715/*