Index: Source/core/css/CSSParser-in.cpp |
diff --git a/Source/core/css/CSSParser-in.cpp b/Source/core/css/CSSParser-in.cpp |
index 0e45c5c3823153039f0374dbb2109765b02dd9b1..d4ca634605c5574a5aaef330eb48c4512e3ea0a2 100644 |
--- a/Source/core/css/CSSParser-in.cpp |
+++ b/Source/core/css/CSSParser-in.cpp |
@@ -2402,6 +2402,16 @@ bool CSSParser::parseValue(CSSPropertyID propId, bool important) |
} |
return false; |
} |
+ case CSSPropertyAnimationDelay: |
+ case CSSPropertyAnimationDirection: |
+ case CSSPropertyAnimationDuration: |
+ case CSSPropertyAnimationFillMode: |
+ case CSSPropertyAnimationName: |
+ case CSSPropertyAnimationPlayState: |
+ case CSSPropertyAnimationIterationCount: |
+ case CSSPropertyAnimationTimingFunction: |
+ if (!RuntimeEnabledFeatures::cssAnimationUnprefixedEnabled()) |
+ break; |
case CSSPropertyWebkitAnimationDelay: |
case CSSPropertyWebkitAnimationDirection: |
case CSSPropertyWebkitAnimationDuration: |
@@ -2593,7 +2603,7 @@ bool CSSParser::parseValue(CSSPropertyID propId, bool important) |
case CSSPropertyBorder: |
// [ 'border-width' || 'border-style' || <color> ] | inherit |
{ |
- if (parseShorthand(propId, borderShorthandForParsing(), important)) { |
+ if (parseShorthand(propId, parsingShorthandForProperty(CSSPropertyBorder), important)) { |
// The CSS3 Borders and Backgrounds specification says that border also resets border-image. It's as |
// though a value of none was specified for the image. |
addExpandedPropertyForValue(CSSPropertyBorderImage, cssValuePool().createImplicitInitialValue(), important); |
@@ -2657,8 +2667,11 @@ bool CSSParser::parseValue(CSSPropertyID propId, bool important) |
return parseShorthand(propId, webkitColumnRuleShorthand(), important); |
case CSSPropertyWebkitTextStroke: |
return parseShorthand(propId, webkitTextStrokeShorthand(), important); |
+ case CSSPropertyAnimation: |
+ if (!RuntimeEnabledFeatures::cssAnimationUnprefixedEnabled()) |
+ break; |
case CSSPropertyWebkitAnimation: |
- return parseAnimationShorthand(important); |
+ return parseAnimationShorthand(propId, important); |
case CSSPropertyTransition: |
case CSSPropertyWebkitTransition: |
return parseTransitionShorthand(propId, important); |
@@ -3073,18 +3086,18 @@ void CSSParser::addAnimationValue(RefPtr<CSSValue>& lval, PassRefPtr<CSSValue> r |
lval = rval; |
} |
-bool CSSParser::parseAnimationShorthand(bool important) |
+bool CSSParser::parseAnimationShorthand(CSSPropertyID propId, bool important) |
{ |
- const StylePropertyShorthand& animationProperties = webkitAnimationShorthandForParsing(); |
+ const StylePropertyShorthand& animationProperties = parsingShorthandForProperty(propId); |
const unsigned numProperties = 7; |
// The list of properties in the shorthand should be the same |
// length as the list with animation name in last position, even though they are |
// in a different order. |
- ASSERT(numProperties == webkitAnimationShorthandForParsing().length()); |
- ASSERT(numProperties == webkitAnimationShorthand().length()); |
+ ASSERT(numProperties == animationProperties.length()); |
+ ASSERT(numProperties == shorthandForProperty(propId).length()); |
- ShorthandScope scope(this, CSSPropertyWebkitAnimation); |
+ ShorthandScope scope(this, propId); |
bool parsedProperty[numProperties] = { false }; |
AnimationParseContext context; |
@@ -4450,6 +4463,7 @@ bool CSSParser::parseAnimationProperty(CSSPropertyID propId, RefPtr<CSSValue>& r |
} |
else { |
switch (propId) { |
+ case CSSPropertyAnimationDelay: |
case CSSPropertyWebkitAnimationDelay: |
case CSSPropertyTransitionDelay: |
case CSSPropertyWebkitTransitionDelay: |
@@ -4457,11 +4471,13 @@ bool CSSParser::parseAnimationProperty(CSSPropertyID propId, RefPtr<CSSValue>& r |
if (currValue) |
m_valueList->next(); |
break; |
+ case CSSPropertyAnimationDirection: |
case CSSPropertyWebkitAnimationDirection: |
currValue = parseAnimationDirection(); |
if (currValue) |
m_valueList->next(); |
break; |
+ case CSSPropertyAnimationDuration: |
case CSSPropertyWebkitAnimationDuration: |
case CSSPropertyTransitionDuration: |
case CSSPropertyWebkitTransitionDuration: |
@@ -4469,21 +4485,25 @@ bool CSSParser::parseAnimationProperty(CSSPropertyID propId, RefPtr<CSSValue>& r |
if (currValue) |
m_valueList->next(); |
break; |
+ case CSSPropertyAnimationFillMode: |
eseidel
2013/08/13 17:49:15
Are the expected implementations of these really i
darktears
2013/08/13 18:08:54
The parsing should be the same. And the tests adde
|
case CSSPropertyWebkitAnimationFillMode: |
currValue = parseAnimationFillMode(); |
if (currValue) |
m_valueList->next(); |
break; |
+ case CSSPropertyAnimationIterationCount: |
case CSSPropertyWebkitAnimationIterationCount: |
currValue = parseAnimationIterationCount(); |
if (currValue) |
m_valueList->next(); |
break; |
+ case CSSPropertyAnimationName: |
case CSSPropertyWebkitAnimationName: |
currValue = parseAnimationName(); |
if (currValue) |
m_valueList->next(); |
break; |
+ case CSSPropertyAnimationPlayState: |
case CSSPropertyWebkitAnimationPlayState: |
currValue = parseAnimationPlayState(); |
if (currValue) |
@@ -4497,6 +4517,7 @@ bool CSSParser::parseAnimationProperty(CSSPropertyID propId, RefPtr<CSSValue>& r |
if (currValue) |
m_valueList->next(); |
break; |
+ case CSSPropertyAnimationTimingFunction: |
case CSSPropertyWebkitAnimationTimingFunction: |
case CSSPropertyTransitionTimingFunction: |
case CSSPropertyWebkitTransitionTimingFunction: |
@@ -10205,7 +10226,7 @@ inline void CSSParser::detectAtToken(int length, bool hasEscape) |
--length; |
// charset, font-face, import, media, namespace, page, supports, |
- // -webkit-keyframes, and -webkit-mediaquery are not affected by hasEscape. |
+ // -webkit-keyframes, keyframes, and -webkit-mediaquery are not affected by hasEscape. |
SWITCH(name, length) { |
CASE("bottom-left") { |
if (LIKELY(!hasEscape)) |
@@ -10241,6 +10262,9 @@ inline void CSSParser::detectAtToken(int length, bool hasEscape) |
m_parsingMode = MediaQueryMode; |
m_token = IMPORT_SYM; |
} |
+ CASE("keyframes") { |
+ m_token = WEBKIT_KEYFRAMES_SYM; |
+ } |
CASE("left-top") { |
if (LIKELY(!hasEscape)) |
m_token = LEFTTOP_SYM; |