summaryrefslogtreecommitdiffstats
path: root/ui/views/controls
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-01 21:44:40 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-01 21:44:40 +0000
commitb8bdc427dc7802592bb2fea2b042f1db9667cd61 (patch)
tree9d1337b4b30ad85a14dd9307cedd0ce438c33f41 /ui/views/controls
parent07407b6976668863b6ebff63674bfc90da89967f (diff)
downloadchromium_src-b8bdc427dc7802592bb2fea2b042f1db9667cd61.zip
chromium_src-b8bdc427dc7802592bb2fea2b042f1db9667cd61.tar.gz
chromium_src-b8bdc427dc7802592bb2fea2b042f1db9667cd61.tar.bz2
Pass const gfx::Rect& as the first parameter to FillRect.
BUG=100898 R=pkasting@chromium.org TBR=sky@chromium.org Review URL: https://chromiumcodereview.appspot.com/9021046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@120109 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/views/controls')
-rw-r--r--ui/views/controls/menu/menu_scroll_view_container.cc4
-rw-r--r--ui/views/controls/menu/submenu_view.cc2
-rw-r--r--ui/views/controls/native/native_view_host.cc4
-rw-r--r--ui/views/controls/separator.cc4
-rw-r--r--ui/views/controls/table/table_view_views.cc2
-rw-r--r--ui/views/controls/tree/tree_view_views.cc13
6 files changed, 14 insertions, 15 deletions
diff --git a/ui/views/controls/menu/menu_scroll_view_container.cc b/ui/views/controls/menu/menu_scroll_view_container.cc
index b04a318..5e61f06 100644
--- a/ui/views/controls/menu/menu_scroll_view_container.cc
+++ b/ui/views/controls/menu/menu_scroll_view_container.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -99,7 +99,7 @@ class MenuScrollButton : public View {
y += config.scroll_arrow_height;
}
for (int i = 0; i < config.scroll_arrow_height; ++i, --x, y += delta_y)
- canvas->FillRect(arrow_color, gfx::Rect(x, y, (i * 2) + 1, 1));
+ canvas->FillRect(gfx::Rect(x, y, (i * 2) + 1, 1), arrow_color);
}
private:
diff --git a/ui/views/controls/menu/submenu_view.cc b/ui/views/controls/menu/submenu_view.cc
index 3839ac7..b388073 100644
--- a/ui/views/controls/menu/submenu_view.cc
+++ b/ui/views/controls/menu/submenu_view.cc
@@ -382,7 +382,7 @@ void SubmenuView::PaintDropIndicator(gfx::Canvas* canvas,
return;
gfx::Rect bounds = CalculateDropIndicatorBounds(item, position);
- canvas->FillRect(kDropIndicatorColor, bounds);
+ canvas->FillRect(bounds, kDropIndicatorColor);
}
void SubmenuView::SchedulePaintForDropIndicator(
diff --git a/ui/views/controls/native/native_view_host.cc b/ui/views/controls/native/native_view_host.cc
index 63401e8..8a34c25 100644
--- a/ui/views/controls/native/native_view_host.cc
+++ b/ui/views/controls/native/native_view_host.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -125,7 +125,7 @@ void NativeViewHost::OnPaint(gfx::Canvas* canvas) {
// It would be nice if this used some approximation of the page's
// current background color.
if (native_wrapper_->HasInstalledClip())
- canvas->FillRect(SK_ColorWHITE, GetLocalBounds());
+ canvas->FillRect(GetLocalBounds(), SK_ColorWHITE);
}
void NativeViewHost::VisibilityChanged(View* starting_from, bool is_visible) {
diff --git a/ui/views/controls/separator.cc b/ui/views/controls/separator.cc
index 2842068..810e7d8 100644
--- a/ui/views/controls/separator.cc
+++ b/ui/views/controls/separator.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -37,7 +37,7 @@ void Separator::GetAccessibleState(ui::AccessibleViewState* state) {
}
void Separator::Paint(gfx::Canvas* canvas) {
- canvas->FillRect(kDefaultColor, bounds());
+ canvas->FillRect(bounds(), kDefaultColor);
}
std::string Separator::GetClassName() const {
diff --git a/ui/views/controls/table/table_view_views.cc b/ui/views/controls/table/table_view_views.cc
index 2788931..187c0d6 100644
--- a/ui/views/controls/table/table_view_views.cc
+++ b/ui/views/controls/table/table_view_views.cc
@@ -242,7 +242,7 @@ void TableView::OnPaint(gfx::Canvas* canvas) {
for (int i = min_row; i < max_row; ++i) {
gfx::Rect row_bounds(GetRowBounds(i));
if (i == selected_row_) {
- canvas->FillRect(kSelectedBackgroundColor, row_bounds);
+ canvas->FillRect(row_bounds, kSelectedBackgroundColor);
if (HasFocus())
canvas->DrawFocusRect(row_bounds);
}
diff --git a/ui/views/controls/tree/tree_view_views.cc b/ui/views/controls/tree/tree_view_views.cc
index b736637..b2225c0 100644
--- a/ui/views/controls/tree/tree_view_views.cc
+++ b/ui/views/controls/tree/tree_view_views.cc
@@ -661,7 +661,7 @@ void TreeView::PaintRow(gfx::Canvas* canvas,
if (base::i18n::IsRTL())
text_bounds.set_x(bounds.x());
if (node == selected_node_) {
- canvas->FillRect(kSelectedBackgroundColor, text_bounds);
+ canvas->FillRect(text_bounds, kSelectedBackgroundColor);
if (HasFocus())
canvas->DrawFocusRect(text_bounds);
}
@@ -688,16 +688,15 @@ void TreeView::PaintExpandControl(gfx::Canvas* canvas,
if (!expanded) {
int delta = base::i18n::IsRTL() ? 1 : -1;
for (int i = 0; i < 4; ++i) {
- canvas->FillRect(kArrowColor,
- gfx::Rect(center_x + delta * (2 - i),
- center_y - (3 - i), 1, (3 - i) * 2 + 1));
+ canvas->FillRect(gfx::Rect(center_x + delta * (2 - i),
+ center_y - (3 - i), 1, (3 - i) * 2 + 1),
+ kArrowColor);
}
} else {
center_y -= 2;
for (int i = 0; i < 4; ++i) {
- canvas->FillRect(kArrowColor,
- gfx::Rect(center_x - (3 - i), center_y + i,
- (3 - i) * 2 + 1, 1));
+ canvas->FillRect(gfx::Rect(center_x - (3 - i), center_y + i,
+ (3 - i) * 2 + 1, 1), kArrowColor);
}
}
}