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-23 17:50:56 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-23 17:50:56 +0000
commit0a119c96c644fce867059839ab24fb7cc38e4047 (patch)
tree40c94228fe028f0df40a9a6522fd77c0123211de /views/controls/scroll_view.cc
parent529623ed3b5c444fa30203fb982c2e69c97825a5 (diff)
downloadchromium_src-0a119c96c644fce867059839ab24fb7cc38e4047.zip
chromium_src-0a119c96c644fce867059839ab24fb7cc38e4047.tar.gz
chromium_src-0a119c96c644fce867059839ab24fb7cc38e4047.tar.bz2
Dramatically simplify view painting by getting rid of RootView's redundant knowledge of invalid rects.The OS is capable of doing this for us (see: InvalidateRect, etc.), so we should just defer to it.I was also able to remove all of the custom logic in WindowWin::OnNCPaint and replace it with a simple SetMsgHandled check.http://crbug.com/72040TEST=none
Review URL: http://codereview.chromium.org/6469096 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75758 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls/scroll_view.cc')
-rw-r--r--views/controls/scroll_view.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/views/controls/scroll_view.cc b/views/controls/scroll_view.cc
index 707c8d6..9db46da 100644
--- a/views/controls/scroll_view.cc
+++ b/views/controls/scroll_view.cc
@@ -346,7 +346,7 @@ void ScrollView::ScrollToPosition(ScrollBar* source, int position) {
else if (position > max_pos)
position = max_pos;
contents_->SetX(-position);
- contents_->SchedulePaintInRect(contents_->GetVisibleBounds(), true);
+ contents_->SchedulePaintInRect(contents_->GetVisibleBounds());
}
} else if (source == vert_sb_ && vert_sb_->IsVisible()) {
int vh = viewport_->height();
@@ -359,7 +359,7 @@ void ScrollView::ScrollToPosition(ScrollBar* source, int position) {
else if (position > max_pos)
position = max_pos;
contents_->SetY(-position);
- contents_->SchedulePaintInRect(contents_->GetVisibleBounds(), true);
+ contents_->SchedulePaintInRect(contents_->GetVisibleBounds());
}
}
}