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

Unified Diff: Source/core/animation/AnimatableLength.cpp

Issue 64293008: Wrap CSS length conversion arguments in an object (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: don't make it noncopyable ; clang doesn't do the RVO stuffs? Created 7 years, 1 month 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
« no previous file with comments | « Source/core/animation/AnimatableLength.h ('k') | Source/core/animation/AnimatableLengthTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/AnimatableLength.cpp
diff --git a/Source/core/animation/AnimatableLength.cpp b/Source/core/animation/AnimatableLength.cpp
index 886ff9b546d44548bde426f1df259d5b9695ceee..9cf7ba12b99956660b378b886ed053b435c35336 100644
--- a/Source/core/animation/AnimatableLength.cpp
+++ b/Source/core/animation/AnimatableLength.cpp
@@ -79,15 +79,15 @@ PassRefPtr<CSSValue> AnimatableLength::toCSSValue(NumberRange range) const
return toCSSPrimitiveValue(range);
}
-Length AnimatableLength::toLength(const RenderStyle* style, const RenderStyle* rootStyle, double zoom, NumberRange range) const
+Length AnimatableLength::toLength(const CSSToLengthConversionData& conversionData, NumberRange range) const
{
// Avoid creating a CSSValue in the common cases
if (m_unitType == UnitTypePixels)
- return Length(clampedNumber(range) * zoom, Fixed);
+ return Length(clampedNumber(range) * conversionData.zoom(), Fixed);
if (m_unitType == UnitTypePercentage)
return Length(clampedNumber(range), Percent);
- return toCSSPrimitiveValue(range)->convertToLength<AnyConversion>(style, rootStyle, zoom);
+ return toCSSPrimitiveValue(range)->convertToLength<AnyConversion>(conversionData);
}
PassRefPtr<AnimatableValue> AnimatableLength::interpolateTo(const AnimatableValue* value, double fraction) const
« no previous file with comments | « Source/core/animation/AnimatableLength.h ('k') | Source/core/animation/AnimatableLengthTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698