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

Unified Diff: Source/core/css/CSSComputedStyleDeclaration.cpp

Issue 22925002: Add support to resolve unprefixed CSS animations properties. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 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
Index: Source/core/css/CSSComputedStyleDeclaration.cpp
diff --git a/Source/core/css/CSSComputedStyleDeclaration.cpp b/Source/core/css/CSSComputedStyleDeclaration.cpp
index 9a18d3e1ae0993029e654458ef3012d8c4474731..06a017a27960c791bfa444dc0418817cfcecb970 100644
--- a/Source/core/css/CSSComputedStyleDeclaration.cpp
+++ b/Source/core/css/CSSComputedStyleDeclaration.cpp
@@ -83,6 +83,14 @@ namespace WebCore {
// NOTE: Do not use this list, use computableProperties() instead
// to respect runtime enabling of CSS properties.
static const CSSPropertyID staticComputableProperties[] = {
+ CSSPropertyAnimationDelay,
+ CSSPropertyAnimationDirection,
+ CSSPropertyAnimationDuration,
+ CSSPropertyAnimationFillMode,
+ CSSPropertyAnimationIterationCount,
+ CSSPropertyAnimationName,
+ CSSPropertyAnimationPlayState,
+ CSSPropertyAnimationTimingFunction,
CSSPropertyBackgroundAttachment,
CSSPropertyBackgroundBlendMode,
CSSPropertyBackgroundClip,
@@ -2330,8 +2338,14 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert
return cssValuePool().createIdentifierValue(CSSValueBorderBox);
case CSSPropertyWebkitAppRegion:
return cssValuePool().createIdentifierValue(style->getDraggableRegionMode() == DraggableRegionDrag ? CSSValueDrag : CSSValueNoDrag);
+ case CSSPropertyAnimationDelay:
+ if (!RuntimeEnabledFeatures::cssAnimationUnprefixedEnabled())
+ break;
case CSSPropertyWebkitAnimationDelay:
return getDelayValue(style->animations());
+ case CSSPropertyAnimationDirection:
+ if (!RuntimeEnabledFeatures::cssAnimationUnprefixedEnabled())
+ break;
case CSSPropertyWebkitAnimationDirection: {
RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
const CSSAnimationDataList* t = style->animations();
@@ -2346,8 +2360,14 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert
list->append(cssValuePool().createIdentifierValue(CSSValueNormal));
return list.release();
}
+ case CSSPropertyAnimationDuration:
+ if (!RuntimeEnabledFeatures::cssAnimationUnprefixedEnabled())
+ break;
case CSSPropertyWebkitAnimationDuration:
return getDurationValue(style->animations());
+ case CSSPropertyAnimationFillMode:
+ if (!RuntimeEnabledFeatures::cssAnimationUnprefixedEnabled())
+ break;
case CSSPropertyWebkitAnimationFillMode: {
RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
const CSSAnimationDataList* t = style->animations();
@@ -2372,6 +2392,9 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert
list->append(cssValuePool().createIdentifierValue(CSSValueNone));
return list.release();
}
+ case CSSPropertyAnimationIterationCount:
+ if (!RuntimeEnabledFeatures::cssAnimationUnprefixedEnabled())
+ break;
case CSSPropertyWebkitAnimationIterationCount: {
RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
const CSSAnimationDataList* t = style->animations();
@@ -2387,6 +2410,9 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert
list->append(cssValuePool().createValue(CSSAnimationData::initialAnimationIterationCount(), CSSPrimitiveValue::CSS_NUMBER));
return list.release();
}
+ case CSSPropertyAnimationName:
+ if (!RuntimeEnabledFeatures::cssAnimationUnprefixedEnabled())
+ break;
case CSSPropertyWebkitAnimationName: {
RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
const CSSAnimationDataList* t = style->animations();
@@ -2397,6 +2423,9 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert
list->append(cssValuePool().createIdentifierValue(CSSValueNone));
return list.release();
}
+ case CSSPropertyAnimationPlayState:
+ if (!RuntimeEnabledFeatures::cssAnimationUnprefixedEnabled())
+ break;
case CSSPropertyWebkitAnimationPlayState: {
RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
const CSSAnimationDataList* t = style->animations();
@@ -2412,6 +2441,9 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert
list->append(cssValuePool().createIdentifierValue(CSSValueRunning));
return list.release();
}
+ case CSSPropertyAnimationTimingFunction:
+ if (!RuntimeEnabledFeatures::cssAnimationUnprefixedEnabled())
+ break;
case CSSPropertyWebkitAnimationTimingFunction:
return getTimingFunctionValue(style->animations());
case CSSPropertyWebkitAppearance:
@@ -2766,6 +2798,7 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert
break;
/* Unimplemented -webkit- properties */
+ case CSSPropertyAnimation:
case CSSPropertyWebkitAnimation:
case CSSPropertyWebkitBorderRadius:
case CSSPropertyWebkitMarginCollapse:

Powered by Google App Engine
This is Rietveld 408576698