summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_theme_provider.cc
diff options
context:
space:
mode:
authortony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-02 01:41:06 +0000
committertony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-02 01:41:06 +0000
commit9829d8d83608c54937e5187512f98a81b29f80bb (patch)
tree29db8d5ea5f6e7ad1ec67a84f8b251d513c97dc7 /chrome/browser/browser_theme_provider.cc
parent6d7342d33a13358f7acfb78cee3c7a3ebd67c226 (diff)
downloadchromium_src-9829d8d83608c54937e5187512f98a81b29f80bb.zip
chromium_src-9829d8d83608c54937e5187512f98a81b29f80bb.tar.gz
chromium_src-9829d8d83608c54937e5187512f98a81b29f80bb.tar.bz2
Take 2 at: Fix the opacity of titlebars on the NTP page.
We were accidentally setting the opacity to 1/255. This bug was introduced in r32643. Fix the unittest too. BUG=29107 Review URL: http://codereview.chromium.org/461003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33529 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_theme_provider.cc')
-rw-r--r--chrome/browser/browser_theme_provider.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/chrome/browser/browser_theme_provider.cc b/chrome/browser/browser_theme_provider.cc
index be81770..aceedf1 100644
--- a/chrome/browser/browser_theme_provider.cc
+++ b/chrome/browser/browser_theme_provider.cc
@@ -1112,9 +1112,9 @@ void BrowserThemeProvider::SetColorData(DictionaryValue* colors_value) {
colors_[WideToUTF8(*iter)] =
SkColorSetARGB(static_cast<int>(alpha * 255), r, g, b);
} else if (color_list->GetInteger(3, &alpha_int) &&
- (alpha_int >= 0 && alpha_int <= 255)) {
+ (alpha_int == 0 || alpha_int == 1)) {
colors_[WideToUTF8(*iter)] =
- SkColorSetARGB(alpha_int, r, g, b);
+ SkColorSetARGB(alpha_int ? 255 : 0, r, g, b);
}
} else {
colors_[WideToUTF8(*iter)] = SkColorSetRGB(r, g, b);