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

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

Issue 2715243004: [blink] Support (semi-)transparent background colors in WebView/Frame. (Closed)
Patch Set: address comments 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 ebda68aa738d402ad920e1bc0c4419b893699343..1a389bb88c343a6e50b7df67167f62fee4040a24 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"
@@ -1715,12 +1716,11 @@ 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())
+ baseBackgroundColor = Color::transparent;
chrishtr 2017/03/28 19:45:56 I think the old code just used a conditional here
Eric Seckler 2017/03/29 10:50:18 My understanding is that the old code was setting
lfg 2017/03/29 15:19:43 Yes, that's my understanding as well.
Eric Seckler 2017/03/30 10:46:38 Added a unit test and filed https://crbug.com/7067
- 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