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

Unified Diff: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp

Issue 2715243004: [blink] Support (semi-)transparent background colors in WebView/Frame. (Closed)
Patch Set: remove set/isTransparent from WebViewImpl and FrameView, use setBaseBackgroundColor instead Created 3 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
Index: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
index 3ebeeceaf812cbefbdf05167d1eb918708a8860c..dee6f288bcc235b8e2caa9beccfe4dc5be5d03f3 100644
--- a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
+++ b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
@@ -166,6 +166,7 @@
#include "platform/WebFrameScheduler.h"
#include "platform/clipboard/ClipboardUtilities.h"
#include "platform/fonts/FontCache.h"
+#include "platform/graphics/Color.h"
#include "platform/graphics/GraphicsContext.h"
#include "platform/graphics/GraphicsLayerClient.h"
#include "platform/graphics/paint/ClipRecorder.h"
@@ -1726,12 +1727,12 @@ void WebLocalFrameImpl::createFrameView() {
IntSize initialSize = (isMainFrame || !frameWidget())
? webView->mainFrameSize()
: (IntSize)frameWidget()->size();
- bool isTransparent = !isMainFrame && parent()->isWebRemoteFrame()
- ? true
- : webView->isTransparent();
+ Color baseBackgroundColor = webView->baseBackgroundColor();
+ if (!isMainFrame && parent()->isWebRemoteFrame()) {
lfg 2017/03/23 16:05:21 nit: no need for {}
Eric Seckler 2017/03/23 16:34:49 Done.
+ baseBackgroundColor = Color::transparent;
+ }
- frame()->createView(initialSize, webView->baseBackgroundColor(),
- isTransparent);
+ frame()->createView(initialSize, webView->baseBackgroundColor());
if (isMainFrame) {
frame()->view()->setInitialViewportSize(
webView->pageScaleConstraintsSet().initialViewportSize());

Powered by Google App Engine
This is Rietveld 408576698