Changeset 431 for trunk/WebCore/css/CSSGrammar.y
- Timestamp:
- 08/06/08 13:29:36 (5 months ago)
- Files:
-
- trunk/WebCore/css/CSSGrammar.y (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/WebCore/css/CSSGrammar.y
r424 r431 34 34 #include "HTMLNames.h" 35 35 #include "MediaList.h" 36 #include "WebKitCSSKeyframeRule.h" 37 #include "WebKitCSSKeyframesRule.h" 36 38 #include <stdlib.h> 37 39 #include <string.h> … … 71 73 CSSParserValueList* valueList; 72 74 Vector<MediaQueryExp*>* mediaQueryExpList; 75 WebKitCSSKeyframeRule* keyframeRule; 76 WebKitCSSKeyframesRule* keyframesRule; 77 float val; 73 78 } 74 79 … … 121 126 %token WEBKIT_RULE_SYM 122 127 %token WEBKIT_DECLS_SYM 128 %token WEBKIT_KEYFRAMES_SYM 123 129 %token WEBKIT_VALUE_SYM 124 130 %token WEBKIT_MEDIAQUERY_SYM … … 173 179 %type <rule> page 174 180 %type <rule> font_face 181 %type <rule> keyframes 175 182 %type <rule> invalid_rule 176 183 %type <rule> save_block … … 206 213 %type <mediaQueryExpList> maybe_and_media_query_exp_list 207 214 215 %type <string> keyframe_name 216 %type <keyframeRule> keyframe_rule 217 %type <keyframesRule> keyframes_rule 218 %type <val> key 219 208 220 %type <integer> property 209 221 … … 379 391 | page 380 392 | font_face 393 | keyframes 381 394 ; 382 395 … … 658 671 } 659 672 ; 673 674 keyframes: 675 WEBKIT_KEYFRAMES_SYM maybe_space keyframe_name maybe_space '{' maybe_space keyframes_rule '}' { 676 $$ = $7; 677 $7->setName($3); 678 } 679 ; 680 681 keyframe_name: 682 IDENT 683 | STRING 684 ; 685 686 keyframes_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 695 keyframe_rule: 696 key maybe_space '{' maybe_space declaration_list '}' { 697 $$ = static_cast<CSSParser*>(parser)->createKeyframeRule($1); 698 } 699 ; 700 701 key: 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 ; 660 714 661 715 /*
