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

Unified Diff: third_party/WebKit/Source/platform/testing/WebLayerTreeViewImplForTesting.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/platform/testing/WebLayerTreeViewImplForTesting.cpp
diff --git a/third_party/WebKit/Source/platform/testing/WebLayerTreeViewImplForTesting.cpp b/third_party/WebKit/Source/platform/testing/WebLayerTreeViewImplForTesting.cpp
index 09a880a99047af4c4bdcfba98a866310f5e5525e..6d567b1a0ad0802714269a81bd9de77a7909e080 100644
--- a/third_party/WebKit/Source/platform/testing/WebLayerTreeViewImplForTesting.cpp
+++ b/third_party/WebKit/Source/platform/testing/WebLayerTreeViewImplForTesting.cpp
@@ -92,11 +92,8 @@ void WebLayerTreeViewImplForTesting::setDeviceScaleFactor(
void WebLayerTreeViewImplForTesting::setBackgroundColor(WebColor color) {
m_layerTreeHost->set_background_color(color);
-}
-
-void WebLayerTreeViewImplForTesting::setHasTransparentBackground(
- bool transparent) {
- m_layerTreeHost->set_has_transparent_background(transparent);
+ m_layerTreeHost->set_has_transparent_background(SkColorGetA(color) <
+ SK_AlphaOPAQUE);
}
void WebLayerTreeViewImplForTesting::setVisible(bool visible) {

Powered by Google App Engine
This is Rietveld 408576698