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

Unified Diff: third_party/WebKit/Source/platform/testing/WebLayerTreeViewImplForTesting.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/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 d31e86f12875f955069334868f8e0bd978086e67..eae44d909f0666684d09acf69996f3826de611b6 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