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

Unified Diff: third_party/WebKit/Source/core/animation/CSSNumberInterpolationType.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/CSSNumberInterpolationType.cpp
diff --git a/third_party/WebKit/Source/core/animation/CSSNumberInterpolationType.cpp b/third_party/WebKit/Source/core/animation/CSSNumberInterpolationType.cpp
index b2df15d02eecdb5dbdce7f303437b47f5ed02385..640d579b8856c6f8ea4a608e407cdc0bc8fbdee7 100644
--- a/third_party/WebKit/Source/core/animation/CSSNumberInterpolationType.cpp
+++ b/third_party/WebKit/Source/core/animation/CSSNumberInterpolationType.cpp
@@ -76,7 +76,7 @@ InterpolationValue CSSNumberInterpolationType::maybeConvertValue(const CSSValue&
InterpolationValue CSSNumberInterpolationType::maybeConvertUnderlyingValue(const InterpolationEnvironment& environment) const
{
double underlyingNumber;
- if (!NumberPropertyFunctions::getNumber(cssProperty(), *environment.state().style(), underlyingNumber))
+ if (!NumberPropertyFunctions::getNumber(cssProperty(), environment.style(), underlyingNumber))
return nullptr;
return createNumberValue(underlyingNumber);
}
@@ -84,7 +84,7 @@ InterpolationValue CSSNumberInterpolationType::maybeConvertUnderlyingValue(const
void CSSNumberInterpolationType::apply(const InterpolableValue& interpolableValue, const NonInterpolableValue*, InterpolationEnvironment& environment) const
{
double clampedNumber = NumberPropertyFunctions::clampNumber(cssProperty(), toInterpolableNumber(interpolableValue).value());
- if (!NumberPropertyFunctions::setNumber(cssProperty(), *environment.state().style(), clampedNumber))
+ if (!NumberPropertyFunctions::setNumber(cssProperty(), environment.style(), clampedNumber))
StyleBuilder::applyProperty(cssProperty(), environment.state(), *CSSPrimitiveValue::create(clampedNumber, CSSPrimitiveValue::UnitType::Number));
}

Powered by Google App Engine
This is Rietveld 408576698