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

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

Issue 1215563002: Implement left property animation on InvalidatableStyleInterpolation (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Make Windows not crash Created 5 years, 5 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 | « Source/core/animation/StringKeyframe.h ('k') | Source/core/core.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/StringKeyframe.cpp
diff --git a/Source/core/animation/StringKeyframe.cpp b/Source/core/animation/StringKeyframe.cpp
index 25c36703bb71163c26129d0b43ee686640b8ac6e..9ceb434c8e93318a95e31992efe2cb8d7eb23b5e 100644
--- a/Source/core/animation/StringKeyframe.cpp
+++ b/Source/core/animation/StringKeyframe.cpp
@@ -22,6 +22,7 @@
#include "core/animation/InvalidatableStyleInterpolation.h"
#include "core/animation/LegacyStyleInterpolation.h"
#include "core/animation/LengthBoxStyleInterpolation.h"
+#include "core/animation/LengthInterpolationType.h"
#include "core/animation/LengthPairStyleInterpolation.h"
#include "core/animation/LengthSVGInterpolation.h"
#include "core/animation/LengthStyleInterpolation.h"
@@ -161,11 +162,20 @@ const Vector<const InterpolationType*>* applicableTypesForProperty(CSSPropertyID
if (entry != applicableTypesMap.end())
return entry->value;
- // TODO(alancutter): Support all interpolable CSS properties here so we can stop falling back to the old StyleInterpolation implementation.
- if (CSSPropertyMetadata::isInterpolableProperty(property))
- return nullptr;
-
auto applicableTypes = new Vector<const InterpolationType*>();
+ switch (property) {
+ case CSSPropertyLeft:
+ applicableTypes->append(new LengthInterpolationType(property));
+ break;
+ default:
+ // TODO(alancutter): Support all interpolable CSS properties here so we can stop falling back to the old StyleInterpolation implementation.
+ if (CSSPropertyMetadata::isInterpolableProperty(property)) {
+ delete applicableTypes;
+ applicableTypesMap.add(property, nullptr);
+ return nullptr;
+ }
+ break;
+ }
applicableTypes->append(new CSSValueInterpolationType(property));
applicableTypesMap.add(property, applicableTypes);
return applicableTypes;
« no previous file with comments | « Source/core/animation/StringKeyframe.h ('k') | Source/core/core.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698