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

Unified Diff: third_party/WebKit/Source/core/animation/CSSInterpolationType.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/CSSInterpolationType.cpp
diff --git a/third_party/WebKit/Source/core/animation/CSSInterpolationType.cpp b/third_party/WebKit/Source/core/animation/CSSInterpolationType.cpp
index 70b70b3c5057725ab2586ebb47053497fe1a484d..ff48065087d8527517427ea5ce6adcf79b3dd242 100644
--- a/third_party/WebKit/Source/core/animation/CSSInterpolationType.cpp
+++ b/third_party/WebKit/Source/core/animation/CSSInterpolationType.cpp
@@ -6,6 +6,7 @@
#include <memory>
#include "core/StylePropertyShorthand.h"
+#include "core/animation/CSSInterpolationEnvironment.h"
#include "core/animation/StringKeyframe.h"
#include "core/css/CSSCustomPropertyDeclaration.h"
#include "core/css/CSSValue.h"
@@ -128,7 +129,8 @@ InterpolationValue CSSInterpolationType::MaybeConvertSingleInternal(
const InterpolationValue& underlying,
ConversionCheckers& conversion_checkers) const {
const CSSValue* value = ToCSSPropertySpecificKeyframe(keyframe).Value();
- const StyleResolverState& state = environment.GetState();
+ const StyleResolverState& state =
+ ToCSSInterpolationEnvironment(environment).GetState();
if (!value)
return MaybeConvertNeutral(underlying, conversion_checkers);
@@ -243,7 +245,8 @@ CSSInterpolationType::MaybeConvertCustomPropertyDeclarationInternal(
InterpolationValue CSSInterpolationType::MaybeConvertUnderlyingValue(
const InterpolationEnvironment& environment) const {
- const ComputedStyle& style = environment.Style();
+ const ComputedStyle& style =
+ ToCSSInterpolationEnvironment(environment).Style();
if (!GetProperty().IsCSSCustomProperty()) {
return MaybeConvertStandardPropertyUnderlyingValue(style);
}
@@ -271,7 +274,8 @@ void CSSInterpolationType::Apply(
const InterpolableValue& interpolable_value,
const NonInterpolableValue* non_interpolable_value,
InterpolationEnvironment& environment) const {
- StyleResolverState& state = environment.GetState();
+ StyleResolverState& state =
+ ToCSSInterpolationEnvironment(environment).GetState();
if (GetProperty().IsCSSCustomProperty()) {
ApplyCustomPropertyValue(interpolable_value, non_interpolable_value, state);

Powered by Google App Engine
This is Rietveld 408576698