summaryrefslogtreecommitdiffstats
path: root/cc/page_scale_animation.cc
diff options
context:
space:
mode:
authordanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-20 20:28:07 +0000
committerdanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-20 20:28:07 +0000
commit0eef4b889fde3e26f1165d0d662b25af61ad292e (patch)
treef108ab89e1711ac2218e79ba73e41a4eeb0f1a11 /cc/page_scale_animation.cc
parent948adfcfca37c614dbff91864a229c7f972a5dae (diff)
downloadchromium_src-0eef4b889fde3e26f1165d0d662b25af61ad292e.zip
chromium_src-0eef4b889fde3e26f1165d0d662b25af61ad292e.tar.gz
chromium_src-0eef4b889fde3e26f1165d0d662b25af61ad292e.tar.bz2
ui: Add methods to Rect classes to get points at each of the rect's corners.
This adds the following methods: RectBase::TopRight() RectBase::BottomLeft() RectBase::BottomRight() RectBase::origin() still provides the rect's top-left corner. Tests: ui_unittests:RectTest.Cornders BUG=147395 R=sky Review URL: https://chromiumcodereview.appspot.com/11358240 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168859 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/page_scale_animation.cc')
-rw-r--r--cc/page_scale_animation.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/cc/page_scale_animation.cc b/cc/page_scale_animation.cc
index e1d5f45..b8f1fe6 100644
--- a/cc/page_scale_animation.cc
+++ b/cc/page_scale_animation.cc
@@ -5,7 +5,6 @@
#include "cc/page_scale_animation.h"
#include "base/logging.h"
-#include "cc/geometry.h"
#include "ui/gfx/point_f.h"
#include "ui/gfx/rect_f.h"
#include "ui/gfx/vector2d_conversions.h"
@@ -117,7 +116,7 @@ void PageScaleAnimation::inferTargetAnchorFromScrollOffsets()
void PageScaleAnimation::clampTargetScrollOffset()
{
- gfx::Vector2dF maxScrollOffset = BottomRight(gfx::RectF(m_rootLayerSize)) - BottomRight(gfx::RectF(targetViewportSize()));
+ gfx::Vector2dF maxScrollOffset = gfx::RectF(m_rootLayerSize).bottom_right() - gfx::RectF(targetViewportSize()).bottom_right();
m_targetScrollOffset.ClampToMin(gfx::Vector2dF());
m_targetScrollOffset.ClampToMax(maxScrollOffset);
}