summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-13 20:22:49 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-13 20:22:49 +0000
commit83a4075694df07811f995653615c8685bacef3ce (patch)
tree5085ecf85717710ae1970282dfeb168dcaf0d54b
parentebcb20c7ead50898319724aa42efb0e31acf1877 (diff)
downloadchromium_src-83a4075694df07811f995653615c8685bacef3ce.zip
chromium_src-83a4075694df07811f995653615c8685bacef3ce.tar.gz
chromium_src-83a4075694df07811f995653615c8685bacef3ce.tar.bz2
Use predefined color names where possible for clarity. Also use "SkColorSetARGB(0, 0, 0, 0)" in place of "NULL" since it's not obvious what the latter means as a color.
BUG=none TEST=none Review URL: http://codereview.chromium.org/273042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28874 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/browser_theme_provider.cc18
-rw-r--r--chrome/browser/views/browser_actions_container.cc4
-rw-r--r--chrome/browser/views/find_bar_view.cc4
-rw-r--r--chrome/browser/views/location_bar_view.cc2
-rw-r--r--views/focus/focus_manager_unittest.cc4
-rw-r--r--webkit/tools/test_shell/test_shell_webthemecontrol.cc6
6 files changed, 18 insertions, 20 deletions
diff --git a/chrome/browser/browser_theme_provider.cc b/chrome/browser/browser_theme_provider.cc
index 4e1562e..85fcd15 100644
--- a/chrome/browser/browser_theme_provider.cc
+++ b/chrome/browser/browser_theme_provider.cc
@@ -102,28 +102,26 @@ const SkColor BrowserThemeProvider::kDefaultColorFrameIncognitoInactive =
SkColorSetRGB(126, 139, 156);
const SkColor BrowserThemeProvider::kDefaultColorToolbar =
SkColorSetRGB(210, 225, 246);
-const SkColor BrowserThemeProvider::kDefaultColorTabText =
- SkColorSetRGB(0, 0, 0);
+const SkColor BrowserThemeProvider::kDefaultColorTabText = SK_ColorBLACK;
const SkColor BrowserThemeProvider::kDefaultColorBackgroundTabText =
SkColorSetRGB(64, 64, 64);
const SkColor BrowserThemeProvider::kDefaultColorBookmarkText =
SkColorSetRGB(18, 50, 114);
-const SkColor BrowserThemeProvider::kDefaultColorNTPBackground =
- SkColorSetRGB(255, 255, 255);
-const SkColor BrowserThemeProvider::kDefaultColorNTPText =
- SkColorSetRGB(0, 0, 0);
+const SkColor BrowserThemeProvider::kDefaultColorNTPBackground = SK_ColorWHITE;
+const SkColor BrowserThemeProvider::kDefaultColorNTPText = SK_ColorBLACK;
const SkColor BrowserThemeProvider::kDefaultColorNTPLink =
SkColorSetRGB(6, 55, 116);
const SkColor BrowserThemeProvider::kDefaultColorNTPHeader =
SkColorSetRGB(75, 140, 220);
const SkColor BrowserThemeProvider::kDefaultColorNTPSection =
SkColorSetRGB(229, 239, 254);
-const SkColor BrowserThemeProvider::kDefaultColorNTPSectionText =
- SkColorSetRGB(0, 0, 0);
+const SkColor BrowserThemeProvider::kDefaultColorNTPSectionText = SK_ColorBLACK;
const SkColor BrowserThemeProvider::kDefaultColorNTPSectionLink =
SkColorSetRGB(6, 55, 116);
-const SkColor BrowserThemeProvider::kDefaultColorControlBackground = NULL;
-const SkColor BrowserThemeProvider::kDefaultColorButtonBackground = NULL;
+const SkColor BrowserThemeProvider::kDefaultColorControlBackground =
+ SkColorSetARGB(0, 0, 0, 0);
+const SkColor BrowserThemeProvider::kDefaultColorButtonBackground =
+ SkColorSetARGB(0, 0, 0, 0);
// Default tints.
const color_utils::HSL BrowserThemeProvider::kDefaultTintButtons =
diff --git a/chrome/browser/views/browser_actions_container.cc b/chrome/browser/views/browser_actions_container.cc
index be59548..4d28f75 100644
--- a/chrome/browser/views/browser_actions_container.cc
+++ b/chrome/browser/views/browser_actions_container.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 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.
@@ -303,7 +303,7 @@ void BrowserActionView::PaintChildren(gfx::Canvas* canvas) {
SkTypeface* typeface = SkTypeface::CreateFromName("Arial", SkTypeface::kBold);
SkPaint text_paint;
text_paint.setAntiAlias(true);
- text_paint.setColor(SkColorSetARGB(255, 255, 255, 255));
+ text_paint.setColor(SK_ColorWHITE);
text_paint.setFakeBoldText(true);
text_paint.setTextAlign(SkPaint::kLeft_Align);
text_paint.setTextSize(SkIntToScalar(kTextSize));
diff --git a/chrome/browser/views/find_bar_view.cc b/chrome/browser/views/find_bar_view.cc
index 48d2a06..b97e7b1 100644
--- a/chrome/browser/views/find_bar_view.cc
+++ b/chrome/browser/views/find_bar_view.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 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.
@@ -44,7 +44,7 @@ static const SkColor kTextColorMatchCount = SkColorSetRGB(178, 178, 178);
static const SkColor kTextColorNoMatch = SK_ColorBLACK;
// The background color of the match count label when results are found.
-static const SkColor kBackgroundColorMatch = SkColorSetRGB(255, 255, 255);
+static const SkColor kBackgroundColorMatch = SK_ColorWHITE;
// The background color of the match count label when no results are found.
static const SkColor kBackgroundColorNoMatch = SkColorSetRGB(255, 102, 102);
diff --git a/chrome/browser/views/location_bar_view.cc b/chrome/browser/views/location_bar_view.cc
index ea6b526..9bb4210 100644
--- a/chrome/browser/views/location_bar_view.cc
+++ b/chrome/browser/views/location_bar_view.cc
@@ -225,7 +225,7 @@ SkColor LocationBarView::GetColor(bool is_secure, ColorKind kind) {
colors[NOT_SECURE][SELECTED_TEXT] = SK_ColorWHITE;
#endif
colors[SECURE][BACKGROUND] = SkColorSetRGB(255, 245, 195);
- colors[SECURE][TEXT] = SkColorSetRGB(0, 0, 0);
+ colors[SECURE][TEXT] = SK_ColorBLACK;
colors[SECURE][SELECTED_TEXT] = 0; // Unused
colors[NOT_SECURE][DEEMPHASIZED_TEXT] =
color_utils::AlphaBlend(colors[NOT_SECURE][TEXT],
diff --git a/views/focus/focus_manager_unittest.cc b/views/focus/focus_manager_unittest.cc
index 3f88610..bab3cf1 100644
--- a/views/focus/focus_manager_unittest.cc
+++ b/views/focus/focus_manager_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 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.
@@ -338,7 +338,7 @@ FocusTraversalTest::~FocusTraversalTest() {
void FocusTraversalTest::InitContentView() {
content_view_->set_background(
- Background::CreateSolidBackground(255, 255, 255));
+ Background::CreateSolidBackground(SK_ColorWHITE));
Checkbox* cb = new Checkbox(L"This is a checkbox");
content_view_->AddChildView(cb);
diff --git a/webkit/tools/test_shell/test_shell_webthemecontrol.cc b/webkit/tools/test_shell/test_shell_webthemecontrol.cc
index 1d806f3..f3071c1 100644
--- a/webkit/tools/test_shell/test_shell_webthemecontrol.cc
+++ b/webkit/tools/test_shell/test_shell_webthemecontrol.cc
@@ -18,12 +18,12 @@
namespace TestShellWebTheme {
-const SkColor kEdgeColor = SkColorSetRGB(0, 0, 0);
+const SkColor kEdgeColor = SK_ColorBLACK;
const SkColor kReadOnlyColor = SkColorSetRGB(0xe9, 0xc2, 0xa6);
-const SkColor kFgColor = SkColorSetRGB(0, 0, 0);
+const SkColor kFgColor = SK_ColorBLACK;
const SkColor kBgColors[] = {
- SkColorSetRGB(0, 0, 0), // Unknown
+ SK_ColorBLACK, // Unknown
SkColorSetRGB(0xc9, 0xc9, 0xc9), // Disabled
SkColorSetRGB(0xf3, 0xe0, 0xd0), // Readonly
SkColorSetRGB(0x89, 0xc4, 0xff), // Normal