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

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

Issue 2811253003: Make InterpolationEnvironment virutal (Closed)
Patch Set: protected Created 3 years, 7 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: third_party/WebKit/Source/core/animation/SVGInterpolationType.cpp
diff --git a/third_party/WebKit/Source/core/animation/SVGInterpolationType.cpp b/third_party/WebKit/Source/core/animation/SVGInterpolationType.cpp
index ad5415fb717b0cc1465199ced7af3fe929b735e0..2fe4100bd7079fddab9b624c4382db6bf1cbb3c6 100644
--- a/third_party/WebKit/Source/core/animation/SVGInterpolationType.cpp
+++ b/third_party/WebKit/Source/core/animation/SVGInterpolationType.cpp
@@ -4,7 +4,7 @@
#include "core/animation/SVGInterpolationType.h"
-#include "core/animation/InterpolationEnvironment.h"
+#include "core/animation/SVGInterpolationEnvironment.h"
#include "core/animation/StringKeyframe.h"
#include "core/svg/SVGElement.h"
#include "core/svg/properties/SVGProperty.h"
@@ -19,22 +19,28 @@ InterpolationValue SVGInterpolationType::MaybeConvertSingle(
if (keyframe.IsNeutral())
return MaybeConvertNeutral(underlying, conversion_checkers);
- SVGPropertyBase* svg_value = environment.SvgBaseValue().CloneForAnimation(
- ToSVGPropertySpecificKeyframe(keyframe).Value());
+ SVGPropertyBase* svg_value =
+ ToSVGInterpolationEnvironment(environment)
+ .SvgBaseValue()
+ .CloneForAnimation(ToSVGPropertySpecificKeyframe(keyframe).Value());
return MaybeConvertSVGValue(*svg_value);
}
InterpolationValue SVGInterpolationType::MaybeConvertUnderlyingValue(
const InterpolationEnvironment& environment) const {
- return MaybeConvertSVGValue(environment.SvgBaseValue());
+ return MaybeConvertSVGValue(
+ ToSVGInterpolationEnvironment(environment).SvgBaseValue());
}
void SVGInterpolationType::Apply(
const InterpolableValue& interpolable_value,
const NonInterpolableValue* non_interpolable_value,
InterpolationEnvironment& environment) const {
- environment.SvgElement().SetWebAnimatedAttribute(
- Attribute(), AppliedSVGValue(interpolable_value, non_interpolable_value));
+ ToSVGInterpolationEnvironment(environment)
+ .SvgElement()
+ .SetWebAnimatedAttribute(
+ Attribute(),
+ AppliedSVGValue(interpolable_value, non_interpolable_value));
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698