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

Unified Diff: Source/core/animation/DeferredLegacyStyleInterpolation.cpp

Issue 719993002: Remove CSSValue::Type and CSSValue::cssValueType() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month 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 | Source/core/css/CSSValue.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/DeferredLegacyStyleInterpolation.cpp
diff --git a/Source/core/animation/DeferredLegacyStyleInterpolation.cpp b/Source/core/animation/DeferredLegacyStyleInterpolation.cpp
index e16df8bf753c850e63ea4b0d923baf015b82e3a5..c96ccecfd8969c8bb682234f248c1f209df27570 100644
--- a/Source/core/animation/DeferredLegacyStyleInterpolation.cpp
+++ b/Source/core/animation/DeferredLegacyStyleInterpolation.cpp
@@ -30,29 +30,21 @@ void DeferredLegacyStyleInterpolation::apply(StyleResolverState& state) const
bool DeferredLegacyStyleInterpolation::interpolationRequiresStyleResolve(const CSSValue& value)
{
- switch (value.cssValueType()) {
- case CSSValue::CSS_INHERIT:
+ // FIXME: should not require resolving styles for initial.
+ if (value.isInitialValue() || value.isInheritedValue())
return true;
- case CSSValue::CSS_PRIMITIVE_VALUE:
+ if (value.isPrimitiveValue())
return interpolationRequiresStyleResolve(toCSSPrimitiveValue(value));
- case CSSValue::CSS_VALUE_LIST:
+ if (value.isValueList())
return interpolationRequiresStyleResolve(toCSSValueList(value));
- case CSSValue::CSS_CUSTOM:
- if (value.isImageValue())
- return interpolationRequiresStyleResolve(toCSSImageValue(value));
- if (value.isShadowValue())
- return interpolationRequiresStyleResolve(toCSSShadowValue(value));
- if (value.isSVGDocumentValue())
- return interpolationRequiresStyleResolve(toCSSSVGDocumentValue(value));
- // FIXME: consider other custom types.
- return true;
- case CSSValue::CSS_INITIAL:
- // FIXME: should not require resolving styles for initial.
- return true;
- default:
- ASSERT_NOT_REACHED();
- return true;
- }
+ if (value.isImageValue())
+ return interpolationRequiresStyleResolve(toCSSImageValue(value));
+ if (value.isShadowValue())
+ return interpolationRequiresStyleResolve(toCSSShadowValue(value));
+ if (value.isSVGDocumentValue())
+ return interpolationRequiresStyleResolve(toCSSSVGDocumentValue(value));
+ // FIXME: consider other custom types.
+ return true;
}
bool DeferredLegacyStyleInterpolation::interpolationRequiresStyleResolve(const CSSPrimitiveValue& primitiveValue)
« no previous file with comments | « no previous file | Source/core/css/CSSValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698