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

Unified Diff: sky/engine/core/css/StylePropertyShorthandCustom.cpp

Issue 760183003: Enable/Unprefix Animations & Transitions, add basic tests (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: patch for landing Created 6 years 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 | « sky/engine/core/css/StylePropertySet.cpp ('k') | sky/engine/core/css/parser/CSSGrammar.y » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/css/StylePropertyShorthandCustom.cpp
diff --git a/sky/engine/core/css/StylePropertyShorthandCustom.cpp b/sky/engine/core/css/StylePropertyShorthandCustom.cpp
index 931eb79999de6398e77a2da3ae782ffc41fbf2ef..15bb0ec2ac9a554f6b5d53267264e39beb08cc0d 100644
--- a/sky/engine/core/css/StylePropertyShorthandCustom.cpp
+++ b/sky/engine/core/css/StylePropertyShorthandCustom.cpp
@@ -57,36 +57,10 @@ const StylePropertyShorthand& animationShorthandForParsing()
CSSPropertyAnimationPlayState,
CSSPropertyAnimationName
};
- DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitAnimationLonghandsForParsing, (CSSPropertyAnimation, animationPropertiesForParsing, WTF_ARRAY_LENGTH(animationPropertiesForParsing)));
- return webkitAnimationLonghandsForParsing;
+ DEFINE_STATIC_LOCAL(StylePropertyShorthand, animationLonghandsForParsing, (CSSPropertyAnimation, animationPropertiesForParsing, WTF_ARRAY_LENGTH(animationPropertiesForParsing)));
+ return animationLonghandsForParsing;
}
-const StylePropertyShorthand& webkitAnimationShorthandForParsing()
-{
- // When we parse the animation shorthand we need to look for animation-name
- // last because otherwise it might match against the keywords for fill mode,
- // timing functions and infinite iteration. This means that animation names
- // that are the same as keywords (e.g. 'forwards') won't always match in the
- // shorthand. In that case the authors should be using longhands (or
- // reconsidering their approach). This is covered by the animations spec
- // bug: https://www.w3.org/Bugs/Public/show_bug.cgi?id=14790
- // And in the spec (editor's draft) at:
- // http://dev.w3.org/csswg/css3-animations/#animation-shorthand-property
- static const CSSPropertyID animationPropertiesForParsing[] = {
- CSSPropertyWebkitAnimationDuration,
- CSSPropertyWebkitAnimationTimingFunction,
- CSSPropertyWebkitAnimationDelay,
- CSSPropertyWebkitAnimationIterationCount,
- CSSPropertyWebkitAnimationDirection,
- CSSPropertyWebkitAnimationFillMode,
- CSSPropertyWebkitAnimationPlayState,
- CSSPropertyWebkitAnimationName
- };
- DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitAnimationLonghandsForParsing, (CSSPropertyWebkitAnimation, animationPropertiesForParsing, WTF_ARRAY_LENGTH(animationPropertiesForParsing)));
- return webkitAnimationLonghandsForParsing;
-}
-
-// Similar to animations, we have property after timing-function and delay after duration
const StylePropertyShorthand& transitionShorthandForParsing()
{
static const CSSPropertyID transitionProperties[] = {
@@ -99,18 +73,6 @@ const StylePropertyShorthand& transitionShorthandForParsing()
return transitionLonghands;
}
-const StylePropertyShorthand& webkitTransitionShorthandForParsing()
-{
- static const CSSPropertyID webkitTransitionProperties[] = {
- CSSPropertyWebkitTransitionDuration,
- CSSPropertyWebkitTransitionTimingFunction,
- CSSPropertyWebkitTransitionDelay,
- CSSPropertyWebkitTransitionProperty
- };
- DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitTransitionLonghands, (CSSPropertyWebkitTransition, webkitTransitionProperties, WTF_ARRAY_LENGTH(webkitTransitionProperties)));
- return webkitTransitionLonghands;
-}
-
// Returns an empty list if the property is not a shorthand, otherwise the list of longhands for parsing.
const StylePropertyShorthand& parsingShorthandForProperty(CSSPropertyID propertyID)
{
@@ -119,12 +81,8 @@ const StylePropertyShorthand& parsingShorthandForProperty(CSSPropertyID property
return animationShorthandForParsing();
case CSSPropertyBorder:
return borderShorthandForParsing();
- case CSSPropertyWebkitAnimation:
- return webkitAnimationShorthandForParsing();
case CSSPropertyTransition:
return transitionShorthandForParsing();
- case CSSPropertyWebkitTransition:
- return webkitTransitionShorthandForParsing();
default:
return shorthandForProperty(propertyID);
}
« no previous file with comments | « sky/engine/core/css/StylePropertySet.cpp ('k') | sky/engine/core/css/parser/CSSGrammar.y » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698