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

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

Issue 1885353004: Add ComputedStyle constructor and getter to InterpolationEnvironment (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@_transformInterpolationType
Patch Set: Rebased Created 4 years, 4 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/CSSScaleInterpolationType.cpp
diff --git a/third_party/WebKit/Source/core/animation/CSSScaleInterpolationType.cpp b/third_party/WebKit/Source/core/animation/CSSScaleInterpolationType.cpp
index 8ff23f43e93edcb4384d077805b7db0a9e7dd758..b8625f90ae4879ea8641f958a5d815e2eba20bd9 100644
--- a/third_party/WebKit/Source/core/animation/CSSScaleInterpolationType.cpp
+++ b/third_party/WebKit/Source/core/animation/CSSScaleInterpolationType.cpp
@@ -180,7 +180,8 @@ PairwiseInterpolationValue CSSScaleInterpolationType::maybeMergeSingles(Interpol
InterpolationValue CSSScaleInterpolationType::maybeConvertUnderlyingValue(const InterpolationEnvironment& environment) const
{
- return InterpolationValue(Scale(environment.state().style()->scale()).createInterpolableValue());
+ Scale scale = Scale(environment.style().scale());
+ return InterpolationValue(scale.createInterpolableValue(), CSSScaleNonInterpolableValue::create(scale, false));
}
void CSSScaleInterpolationType::composite(UnderlyingValueOwner& underlyingValueOwner, double underlyingFraction, const InterpolationValue& value, double interpolationFraction) const
@@ -200,7 +201,7 @@ void CSSScaleInterpolationType::composite(UnderlyingValueOwner& underlyingValueO
void CSSScaleInterpolationType::apply(const InterpolableValue& interpolableValue, const NonInterpolableValue*, InterpolationEnvironment& environment) const
{
Scale scale(interpolableValue);
- environment.state().style()->setScale(ScaleTransformOperation::create(scale.array[0], scale.array[1], scale.array[2], TransformOperation::Scale3D));
+ environment.style().setScale(ScaleTransformOperation::create(scale.array[0], scale.array[1], scale.array[2], TransformOperation::Scale3D));
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698