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

Unified Diff: ui/views/controls/webview/webview.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, 9 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
« no previous file with comments | « ui/views/controls/webview/webview.h ('k') | ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/webview/webview.cc
diff --git a/ui/views/controls/webview/webview.cc b/ui/views/controls/webview/webview.cc
index 44baa228dc32c69c48a85537ce4c832f9d49f37b..44beb47507db6bca208442224c4b8011854434a5 100644
--- a/ui/views/controls/webview/webview.cc
+++ b/ui/views/controls/webview/webview.cc
@@ -400,4 +400,11 @@ content::WebContents* WebView::CreateWebContents(
return contents;
}
+void WebView::OnPaintBackground(gfx::Canvas* canvas) {
+ if (!GetWebContents()->GetRenderWidgetHostView()->GetBackgroundOpaque())
+ return;
+
+ View::OnPaintBackground(canvas);
+}
+
} // namespace views
« no previous file with comments | « ui/views/controls/webview/webview.h ('k') | ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698