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

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

Issue 2715243004: [blink] Support (semi-)transparent background colors in WebView/Frame. (Closed)
Patch Set: add unit test for remote frame transparency 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 9c925b2e5566093604c6d68803ce8276a347fc60..76a4e718a0e556043422ea8259fae3dc6448457a 100644
--- a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
+++ b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
@@ -165,6 +165,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,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;
- frame()->createView(initialSize, webView->baseBackgroundColor(),
- isTransparent);
+ frame()->createView(initialSize, baseBackgroundColor);
if (isMainFrame) {
frame()->view()->setInitialViewportSize(
webView->pageScaleConstraintsSet().initialViewportSize());

Powered by Google App Engine
This is Rietveld 408576698