summaryrefslogtreecommitdiffstats
path: root/cc/layer_tree_host_impl.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/layer_tree_host_impl.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/layer_tree_host_impl.cc')
-rw-r--r--cc/layer_tree_host_impl.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/cc/layer_tree_host_impl.cc b/cc/layer_tree_host_impl.cc
index 8ea79c2..b558568 100644
--- a/cc/layer_tree_host_impl.cc
+++ b/cc/layer_tree_host_impl.cc
@@ -14,7 +14,6 @@
#include "cc/delay_based_time_source.h"
#include "cc/font_atlas.h"
#include "cc/frame_rate_counter.h"
-#include "cc/geometry.h"
#include "cc/gl_renderer.h"
#include "cc/heads_up_display_layer_impl.h"
#include "cc/layer_iterator.h"
@@ -1016,7 +1015,7 @@ void LayerTreeHostImpl::updateMaxScrollOffset()
viewBounds.Scale(1 / m_pinchZoomViewport.pageScaleDelta());
}
- gfx::Vector2dF maxScroll = BottomRight(gfx::Rect(contentBounds)) - BottomRight(gfx::RectF(viewBounds));
+ gfx::Vector2dF maxScroll = gfx::Rect(contentBounds).bottom_right() - gfx::RectF(viewBounds).bottom_right();
maxScroll.Scale(1 / m_deviceScaleFactor);
// The viewport may be larger than the contents in some cases, such as
@@ -1309,7 +1308,7 @@ void LayerTreeHostImpl::computePinchZoomDeltas(ScrollAndScaleSet* scrollInfo)
gfx::Vector2dF scrollEnd = scrollBegin + anchorOffset;
scrollEnd.Scale(m_pinchZoomViewport.minPageScaleFactor() / scaleBegin);
scrollEnd -= anchorOffset;
- scrollEnd.ClampToMax(BottomRight(gfx::RectF(scaledContentsSize)) - BottomRight(gfx::Rect(m_deviceViewportSize)));
+ scrollEnd.ClampToMax(gfx::RectF(scaledContentsSize).bottom_right() - gfx::Rect(m_deviceViewportSize).bottom_right());
scrollEnd.ClampToMin(gfx::Vector2d());
scrollEnd.Scale(1 / pageScaleDeltaToSend);
scrollEnd.Scale(m_deviceScaleFactor);