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

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

Issue 2715243004: [blink] Support (semi-)transparent background colors in WebView/Frame. (Closed)
Patch Set: Set WebViewImpl transparency for fullscreen. Created 3 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: third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp b/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp
index 4477ed4c6197b6129c2ae4c7fd395bfc927ba4c4..e3574539fed08809a9046c7ddcc998701d4ffff6 100644
--- a/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp
+++ b/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp
@@ -267,7 +267,10 @@ void WebFrameWidgetImpl::updateLayerTreeBackgroundColor() {
if (!m_layerTreeView)
return;
- m_layerTreeView->setBackgroundColor(backgroundColor());
+ WebColor color = backgroundColor();
+ m_layerTreeView->setBackgroundColor(color);
+ m_layerTreeView->setHasTransparentBackground(alphaChannel(color) <
+ SK_AlphaOPAQUE);
}
void WebFrameWidgetImpl::updateLayerTreeDeviceScaleFactor() {
@@ -280,9 +283,7 @@ void WebFrameWidgetImpl::updateLayerTreeDeviceScaleFactor() {
void WebFrameWidgetImpl::setIsTransparent(bool isTransparent) {
m_isTransparent = isTransparent;
chrishtr 2017/03/01 16:16:53 It seems it is not guaranteed that m_isTransparent
Eric Seckler 2017/03/07 18:00:47 FWIW, I think this would have been sort-of guarant
-
- if (m_layerTreeView)
- m_layerTreeView->setHasTransparentBackground(isTransparent);
+ updateLayerTreeBackgroundColor();
}
bool WebFrameWidgetImpl::isTransparent() const {

Powered by Google App Engine
This is Rietveld 408576698