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

Unified Diff: cc/page_scale_animation.cc

Issue 11377068: ui: Make gfx::Size::Scale() mutate the class. Add gfx::ScaleSize() similar to Rect/Point. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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: cc/page_scale_animation.cc
diff --git a/cc/page_scale_animation.cc b/cc/page_scale_animation.cc
index 49948abd333e9ce8aa72f83e6db51e143e58ebe2..ce4b372c582bed245b1099d1dd3e54b12c239784 100644
--- a/cc/page_scale_animation.cc
+++ b/cc/page_scale_animation.cc
@@ -79,7 +79,7 @@ void PageScaleAnimation::zoomWithAnchor(gfx::Vector2d anchor, float finalPageSca
m_scrollEnd -= anchor;
m_scrollEnd = ClampFromBelow(m_scrollEnd, gfx::Vector2d());
- gfx::SizeF scaledContentSize = m_contentSize.Scale(finalPageScale / m_pageScaleStart);
+ gfx::SizeF scaledContentSize = gfx::ScaleSize(m_contentSize, finalPageScale / m_pageScaleStart);
gfx::Vector2d maxScrollOffset = gfx::ToRoundedVector2d(BottomRight(gfx::RectF(scaledContentSize)) - BottomRight(gfx::Rect(m_windowSize)));
m_scrollEnd = m_scrollEnd;
m_scrollEnd = ClampFromAbove(m_scrollEnd, maxScrollOffset);

Powered by Google App Engine
This is Rietveld 408576698