Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(589)

Unified Diff: sky/engine/core/css/parser/CSSGrammar.y

Issue 871773003: Remove @keyframe parsing. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | sky/engine/core/css/parser/CSSTokenizer-in.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/css/parser/CSSGrammar.y
diff --git a/sky/engine/core/css/parser/CSSGrammar.y b/sky/engine/core/css/parser/CSSGrammar.y
index 5dbd42cb5b2cc40a9eea121454af2c709a5284c6..10e9b092ebd763f275a7e9c9fcfe3f57eb9032cb 100644
--- a/sky/engine/core/css/parser/CSSGrammar.y
+++ b/sky/engine/core/css/parser/CSSGrammar.y
@@ -29,9 +29,7 @@
#include "core/css/CSSPrimitiveValue.h"
#include "core/css/CSSSelector.h"
#include "core/css/CSSSelectorList.h"
-#include "core/css/StyleKeyframe.h"
#include "core/css/StyleRule.h"
-#include "core/css/StyleRuleKeyframes.h"
#include "core/css/StyleSheetContents.h"
#include "core/css/parser/BisonCSSParser.h"
#include "core/css/parser/CSSParserMode.h"
@@ -70,16 +68,14 @@ using namespace blink;
StyleRuleBase* rule;
// The content of the three below HeapVectors are guaranteed to be kept alive by
- // the corresponding m_parsedRules, and m_parsedKeyFrames
+ // the corresponding m_parsedRules.
// lists in BisonCSSParser.h.
Vector<RefPtr<StyleRuleBase> >* ruleList;
- Vector<RefPtr<StyleKeyframe> >* keyframeRuleList;
CSSParserSelector* selector;
Vector<OwnPtr<CSSParserSelector> >* selectorList;
CSSSelector::AttributeMatchType attributeMatchType;
CSSParserValue value;
CSSParserValueList* valueList;
- StyleKeyframe* keyframe;
float val;
CSSPropertyID id;
CSSParserLocation location;
@@ -167,10 +163,7 @@ inline static CSSParserValue makeIdentValue(CSSParserString string)
%token INTERNAL_RULE_SYM
%token INTERNAL_SELECTOR_SYM
%token INTERNAL_VALUE_SYM
-%token INTERNAL_KEYFRAME_RULE_SYM
-%token INTERNAL_KEYFRAME_KEY_LIST_SYM
%token INTERNAL_SUPPORTS_CONDITION_SYM
-%token KEYFRAMES_SYM
%token ATKEYWORD
@@ -219,7 +212,6 @@ inline static CSSParserValue makeIdentValue(CSSParserString string)
%type <rule> ruleset
%type <rule> font_face
-%type <rule> keyframes
%type <rule> rule
%type <rule> valid_rule
%type <ruleList> block_rule_body
@@ -227,7 +219,6 @@ inline static CSSParserValue makeIdentValue(CSSParserString string)
%type <rule> block_rule
%type <rule> block_valid_rule
%type <rule> supports
-%type <boolean> keyframes_rule_start
%type <string> ident_or_string
@@ -238,13 +229,6 @@ inline static CSSParserValue makeIdentValue(CSSParserString string)
%type <boolean> supports_disjunction
%type <boolean> supports_declaration_condition
-%type <string> keyframe_name
-%type <keyframe> keyframe_rule
-%type <keyframeRuleList> keyframes_rule
-%type <keyframeRuleList> keyframe_rule_list
-%type <valueList> key_list
-%type <value> key
-
%type <id> property
%type <selector> specifier
@@ -294,8 +278,6 @@ stylesheet:
| internal_rule
| internal_selector
| internal_value
- | internal_keyframe_rule
- | internal_keyframe_key_list
| internal_supports_condition
;
@@ -305,18 +287,6 @@ internal_rule:
}
;
-internal_keyframe_rule:
- INTERNAL_KEYFRAME_RULE_SYM maybe_space keyframe_rule maybe_space TOKEN_EOF {
- parser->m_keyframe = $3;
- }
-;
-
-internal_keyframe_key_list:
- INTERNAL_KEYFRAME_KEY_LIST_SYM maybe_space key_list TOKEN_EOF {
- parser->m_valueList = parser->sinkFloatingValueList($3);
- }
-;
-
internal_decls:
INTERNAL_DECLS_SYM maybe_space_before_declaration declaration_list TOKEN_EOF {
/* can be empty */
@@ -402,7 +372,6 @@ rule_list:
valid_rule:
ruleset
| font_face
- | keyframes
| supports
;
@@ -445,7 +414,6 @@ block_rule_recovery:
block_valid_rule:
ruleset
| font_face
- | keyframes
| supports
;
@@ -555,86 +523,6 @@ supports_declaration_condition:
}
;
-before_keyframes_rule:
- /* empty */ {
- parser->startRuleHeader(CSSRuleSourceData::KEYFRAMES_RULE);
- }
- ;
-
-keyframes_rule_start:
- before_keyframes_rule KEYFRAMES_SYM maybe_space {
- $$ = false;
- }
- ;
-
-keyframes:
- keyframes_rule_start keyframe_name at_rule_header_end_maybe_space '{' at_rule_body_start maybe_space location_label keyframes_rule closing_brace {
- $$ = parser->createKeyframesRule($2, parser->sinkFloatingKeyframeVector($8), $1 /* isPrefixed */);
- }
- ;
-
-keyframe_name:
- IDENT
- | STRING
- ;
-
-keyframes_rule:
- keyframe_rule_list
- | keyframe_rule_list keyframes_error_recovery {
- parser->clearProperties();
- };
-
-keyframe_rule_list:
- /* empty */ {
- $$ = parser->createFloatingKeyframeVector();
- }
- | keyframe_rule_list keyframe_rule maybe_space location_label {
- $$ = $1;
- $$->append($2);
- }
- | keyframe_rule_list keyframes_error_recovery invalid_block maybe_space location_label {
- parser->clearProperties();
- }
- ;
-
-keyframe_rule:
- key_list '{' maybe_space declaration_list closing_brace {
- $$ = parser->createKeyframe($1);
- }
- ;
-
-key_list:
- key maybe_space {
- $$ = parser->createFloatingValueList();
- $$->addValue(parser->sinkFloatingValue($1));
- }
- | key_list ',' maybe_space key maybe_space {
- $$ = $1;
- $$->addValue(parser->sinkFloatingValue($4));
- }
- ;
-
-key:
- maybe_unary_operator PERCENTAGE {
- $$.setFromNumber($1 * $2);
- }
- | IDENT {
- if ($1.equalIgnoringCase("from"))
- $$.setFromNumber(0);
- else if ($1.equalIgnoringCase("to"))
- $$.setFromNumber(100);
- else {
- YYERROR;
- }
- }
- ;
-
-keyframes_error_recovery:
- error rule_error_recovery {
- parser->reportError(parser->lastLocationLabel(), InvalidKeyframeSelectorCSSError);
- }
- ;
-
before_font_face_rule:
/* empty */ {
parser->startRuleHeader(CSSRuleSourceData::FONT_FACE_RULE);
@@ -1206,8 +1094,7 @@ at_rule_end:
;
regular_invalid_at_rule_header:
- keyframes_rule_start at_rule_header_recovery
- | before_font_face_rule FONT_FACE_SYM at_rule_header_recovery
+ before_font_face_rule FONT_FACE_SYM at_rule_header_recovery
| before_supports_rule SUPPORTS_SYM error error_location rule_error_recovery {
parser->reportError($4, InvalidSupportsConditionCSSError);
parser->popSupportsRuleData();
@@ -1260,11 +1147,6 @@ error_location: {
}
;
-location_label: {
- parser->setLocationLabel(parser->currentLocation());
- }
- ;
-
error_recovery:
/* empty */
| error_recovery error
« no previous file with comments | « no previous file | sky/engine/core/css/parser/CSSTokenizer-in.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698