summaryrefslogtreecommitdiffstats
path: root/views/controls
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
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')
-rw-r--r--views/controls/menu/submenu_view.cc2
-rw-r--r--views/controls/scroll_view.cc4
-rw-r--r--views/controls/textfield/native_textfield_views.cc2
3 files changed, 4 insertions, 4 deletions
diff --git a/views/controls/menu/submenu_view.cc b/views/controls/menu/submenu_view.cc
index 67486cd..7c1f69e 100644
--- a/views/controls/menu/submenu_view.cc
+++ b/views/controls/menu/submenu_view.cc
@@ -351,7 +351,7 @@ void SubmenuView::SchedulePaintForDropIndicator(
if (position == MenuDelegate::DROP_ON) {
item->SchedulePaint();
} else if (position != MenuDelegate::DROP_NONE) {
- SchedulePaintInRect(CalculateDropIndicatorBounds(item, position), false);
+ SchedulePaintInRect(CalculateDropIndicatorBounds(item, position));
}
}
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());
}
}
}
diff --git a/views/controls/textfield/native_textfield_views.cc b/views/controls/textfield/native_textfield_views.cc
index 6e62f87..5642ef9 100644
--- a/views/controls/textfield/native_textfield_views.cc
+++ b/views/controls/textfield/native_textfield_views.cc
@@ -437,7 +437,7 @@ void NativeTextfieldViews::UpdateCursor() {
void NativeTextfieldViews::RepaintCursor() {
gfx::Rect r = cursor_bounds_;
r.Inset(-1, -1, -1, -1);
- SchedulePaintInRect(r, false);
+ SchedulePaintInRect(r);
}
void NativeTextfieldViews::UpdateCursorBoundsAndTextOffset() {