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

Unified Diff: third_party/WebKit/Source/core/animation/CSSValueInterpolationType.cpp

Issue 2614613002: Remove maybeConvertSingle override in CSSValueInterpolationType (Closed)
Patch Set: Added comment Created 3 years, 11 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 | « third_party/WebKit/Source/core/animation/CSSValueInterpolationType.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/animation/CSSValueInterpolationType.cpp
diff --git a/third_party/WebKit/Source/core/animation/CSSValueInterpolationType.cpp b/third_party/WebKit/Source/core/animation/CSSValueInterpolationType.cpp
index 9f15de81abc38c2bfc2fd385c4940cda650154fb..50acd0214ae1ef91cb33e91c86f52829a50c6d1e 100644
--- a/third_party/WebKit/Source/core/animation/CSSValueInterpolationType.cpp
+++ b/third_party/WebKit/Source/core/animation/CSSValueInterpolationType.cpp
@@ -6,6 +6,8 @@
#include "core/animation/InterpolationEnvironment.h"
#include "core/animation/StringKeyframe.h"
+#include "core/css/CSSInheritedValue.h"
+#include "core/css/CSSInitialValue.h"
#include "core/css/resolver/StyleBuilder.h"
namespace blink {
@@ -35,22 +37,30 @@ class CSSValueNonInterpolableValue : public NonInterpolableValue {
DEFINE_NON_INTERPOLABLE_VALUE_TYPE(CSSValueNonInterpolableValue);
DEFINE_NON_INTERPOLABLE_VALUE_TYPE_CASTS(CSSValueNonInterpolableValue);
-InterpolationValue CSSValueInterpolationType::maybeConvertSingle(
- const PropertySpecificKeyframe& keyframe,
- const InterpolationEnvironment&,
- const InterpolationValue&,
- ConversionCheckers&) const {
- if (keyframe.isNeutral())
- return nullptr;
-
- return InterpolationValue(
- InterpolableList::create(0),
- CSSValueNonInterpolableValue::create(
- toCSSPropertySpecificKeyframe(keyframe).value()));
+InterpolationValue CSSValueInterpolationType::maybeConvertInitial(
+ const StyleResolverState& state,
+ ConversionCheckers& conversionCheckers) const {
+ return maybeConvertValue(*CSSInitialValue::create(), state,
+ conversionCheckers);
+}
+
+InterpolationValue CSSValueInterpolationType::maybeConvertInherit(
+ const StyleResolverState& state,
+ ConversionCheckers& conversionCheckers) const {
+ return maybeConvertValue(*CSSInheritedValue::create(), state,
+ conversionCheckers);
+}
+
+InterpolationValue CSSValueInterpolationType::maybeConvertValue(
+ const CSSValue& value,
+ const StyleResolverState& state,
+ ConversionCheckers& conversionCheckers) const {
+ return InterpolationValue(InterpolableList::create(0),
+ CSSValueNonInterpolableValue::create(&value));
}
void CSSValueInterpolationType::applyStandardPropertyValue(
- const InterpolableValue&,
+ const InterpolableValue& interpolableValue,
const NonInterpolableValue* nonInterpolableValue,
StyleResolverState& state) const {
StyleBuilder::applyProperty(
« no previous file with comments | « third_party/WebKit/Source/core/animation/CSSValueInterpolationType.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698