Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3738)

Unified Diff: chrome/browser/ui/views/frame/contents_web_view.cc

Issue 1731373002: Allow to have a transparent UA dependent background. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/frame/contents_web_view.cc
diff --git a/chrome/browser/ui/views/frame/contents_web_view.cc b/chrome/browser/ui/views/frame/contents_web_view.cc
index f77f34515dd190739e49d64309bea88f202821c0..771bebaf542059d4c8ebaf3ffa7969733706a737 100644
--- a/chrome/browser/ui/views/frame/contents_web_view.cc
+++ b/chrome/browser/ui/views/frame/contents_web_view.cc
@@ -57,8 +57,10 @@ void ContentsWebView::OnThemeChanged() {
// view is sized specially for fullscreen tab capture. See WebView header
// file comments for more details.
const int kBackgroundBrightness = 0x33; // 20%
+ // FIXME: Clear alpha only upon a call to
+ // content::RenderWidgetHostView->SetBackgroundColor(SK_ColorTRANSPARENT).
const SkColor ntp_background =
- theme->GetColor(ThemeProperties::COLOR_NTP_BACKGROUND);
+ theme->GetColor(ThemeProperties::COLOR_NTP_BACKGROUND) & 0x00FFFFFF;
trchen 2016/02/25 02:30:12 ditto.
Julien Isorce Samsung 2016/02/25 11:33:55 Same
set_background(views::Background::CreateSolidBackground(
SkColorGetR(ntp_background) * kBackgroundBrightness / 0xFF,
SkColorGetG(ntp_background) * kBackgroundBrightness / 0xFF,

Powered by Google App Engine
This is Rietveld 408576698