summaryrefslogtreecommitdiffstats
path: root/views/controls/scroll_view.cc
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-08 00:09:16 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-08 00:09:16 +0000
commit97a311466bc7db336d8315587ff1b2ec06f7ea9c (patch)
tree524babd269504a1a13a6a9874014d0dd52fc25ea /views/controls/scroll_view.cc
parent9d333fa174e9653dcbe60e525d4c03628bb217ae (diff)
downloadchromium_src-97a311466bc7db336d8315587ff1b2ec06f7ea9c.zip
chromium_src-97a311466bc7db336d8315587ff1b2ec06f7ea9c.tar.gz
chromium_src-97a311466bc7db336d8315587ff1b2ec06f7ea9c.tar.bz2
Rework basic bounds methods on View to match new V2 API:
SetBounds(const gfx::Rect& rect) -> SetBoundsRect(); DidChangeBounds()->OnBoundsChanged() GetLocalBounds(false)->GetLocalBounds() GetLocalBounds(true)->GetContentsBounds() Moved GetBounds(), GetX(), and GetPosition into RTL section. http://crbug.com/72040 TEST=none Review URL: http://codereview.chromium.org/6410109 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74052 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls/scroll_view.cc')
-rw-r--r--views/controls/scroll_view.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/views/controls/scroll_view.cc b/views/controls/scroll_view.cc
index 86e7a00..ecaf3e2 100644
--- a/views/controls/scroll_view.cc
+++ b/views/controls/scroll_view.cc
@@ -147,7 +147,7 @@ void ScrollView::Layout() {
// override this default behavior, the inner view has to calculate the
// available space, used ComputeScrollBarsVisibility() to use the same
// calculation that is done here and sets its bound to fit within.
- gfx::Rect viewport_bounds = GetLocalBounds(true);
+ gfx::Rect viewport_bounds = GetContentsBounds();
// Realign it to 0 so it can be used as-is for SetBounds().
viewport_bounds.set_origin(gfx::Point(0, 0));
// viewport_size is the total client space available.
@@ -163,7 +163,7 @@ void ScrollView::Layout() {
int vert_sb_width = GetScrollBarWidth();
viewport_bounds.set_width(viewport_bounds.width() - vert_sb_width);
// Update the bounds right now so the inner views can fit in it.
- viewport_->SetBounds(viewport_bounds);
+ viewport_->SetBoundsRect(viewport_bounds);
// Give contents_ a chance to update its bounds if it depends on the
// viewport.
@@ -220,7 +220,7 @@ void ScrollView::Layout() {
}
// Update to the real client size with the visible scrollbars.
- viewport_->SetBounds(viewport_bounds);
+ viewport_->SetBoundsRect(viewport_bounds);
if (should_layout_contents && contents_)
contents_->Layout();