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

Unified Diff: third_party/WebKit/Source/core/animation/CSSClipInterpolationType.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/CSSClipInterpolationType.cpp
diff --git a/third_party/WebKit/Source/core/animation/CSSClipInterpolationType.cpp b/third_party/WebKit/Source/core/animation/CSSClipInterpolationType.cpp
index f3d3a359b35b63f92eac5c40ac125495492a558c..0166cfc23ed9f2af7884757d83ace997e1e826b9 100644
--- a/third_party/WebKit/Source/core/animation/CSSClipInterpolationType.cpp
+++ b/third_party/WebKit/Source/core/animation/CSSClipInterpolationType.cpp
@@ -223,9 +223,10 @@ InterpolationValue CSSClipInterpolationType::maybeConvertValue(const CSSValue& v
InterpolationValue CSSClipInterpolationType::maybeConvertUnderlyingValue(const InterpolationEnvironment& environment) const
{
- if (environment.state().style()->hasAutoClip())
+ const ComputedStyle& style = environment.style();
+ if (style.hasAutoClip())
return nullptr;
- return createClipValue(environment.state().style()->clip(), environment.state().style()->effectiveZoom());
+ return createClipValue(style.clip(), style.effectiveZoom());
}
PairwiseInterpolationValue CSSClipInterpolationType::maybeMergeSingles(InterpolationValue&& start, InterpolationValue&& end) const
@@ -257,7 +258,7 @@ void CSSClipInterpolationType::apply(const InterpolableValue& interpolableValue,
return Length(Auto);
return CSSLengthInterpolationType::resolveInterpolableLength(*list.get(index), nullptr, environment.state().cssToLengthConversionData(), ValueRangeAll);
};
- environment.state().style()->setClip(LengthBox(
+ environment.style().setClip(LengthBox(
convertIndex(autos.isTopAuto, ClipTop),
convertIndex(autos.isRightAuto, ClipRight),
convertIndex(autos.isBottomAuto, ClipBottom),

Powered by Google App Engine
This is Rietveld 408576698