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

Unified Diff: sky/engine/core/animation/animatable/AnimatableLength.cpp

Issue 711203002: Remove zoom() and effectiveZoom(). (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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
Index: sky/engine/core/animation/animatable/AnimatableLength.cpp
diff --git a/sky/engine/core/animation/animatable/AnimatableLength.cpp b/sky/engine/core/animation/animatable/AnimatableLength.cpp
index e0e642917cd1e6240a86e2e52dd64813377a6950..2dba8943a5fc54760cb53a507651e1de37b0405c 100644
--- a/sky/engine/core/animation/animatable/AnimatableLength.cpp
+++ b/sky/engine/core/animation/animatable/AnimatableLength.cpp
@@ -48,23 +48,22 @@ double clampNumber(double value, ValueRange range)
} // namespace
-AnimatableLength::AnimatableLength(const Length& length, float zoom)
+AnimatableLength::AnimatableLength(const Length& length)
{
- ASSERT(zoom);
PixelsAndPercent pixelsAndPercent = length.pixelsAndPercent();
- m_pixels = pixelsAndPercent.pixels / zoom;
+ m_pixels = pixelsAndPercent.pixels;
m_percent = pixelsAndPercent.percent;
m_hasPixels = length.type() != Percent;
m_hasPercent = !length.isFixed();
}
-Length AnimatableLength::length(float zoom, ValueRange range) const
+Length AnimatableLength::length(ValueRange range) const
{
if (!m_hasPercent)
- return Length(clampNumber(m_pixels, range) * zoom, Fixed);
+ return Length(clampNumber(m_pixels, range), Fixed);
if (!m_hasPixels)
return Length(clampNumber(m_percent, range), Percent);
- return Length(CalculationValue::create(PixelsAndPercent(m_pixels * zoom, m_percent), range));
+ return Length(CalculationValue::create(PixelsAndPercent(m_pixels, m_percent), range));
}
PassRefPtr<AnimatableValue> AnimatableLength::interpolateTo(const AnimatableValue* value, double fraction) const
« no previous file with comments | « sky/engine/core/animation/animatable/AnimatableLength.h ('k') | sky/engine/core/animation/animatable/AnimatableLengthTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698