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

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

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/WebFrameWidgetImpl.h
diff --git a/third_party/WebKit/Source/web/WebFrameWidgetImpl.h b/third_party/WebKit/Source/web/WebFrameWidgetImpl.h
index cd6bf97c7bc93d6edda5594650a326f72a07e89c..07d1c9e7a96549ec71d37780703b64cf66a6c64a 100644
--- a/third_party/WebKit/Source/web/WebFrameWidgetImpl.h
+++ b/third_party/WebKit/Source/web/WebFrameWidgetImpl.h
@@ -114,8 +114,10 @@ class WebFrameWidgetImpl final
// WebFrameWidget implementation.
WebLocalFrameImpl* localRoot() const override { return m_localRoot; }
void setVisibilityState(WebPageVisibilityState) override;
- bool isTransparent() const override;
- void setIsTransparent(bool) override;
+ void setBackgroundColorOverride(WebColor) override;
+ void clearBackgroundColorOverride() override;
+ void setBaseBackgroundColorOverride(WebColor) override;
+ void clearBaseBackgroundColorOverride() override;
void setBaseBackgroundColor(WebColor) override;
WebInputMethodControllerImpl* getActiveWebInputMethodController()
const override;
@@ -151,7 +153,7 @@ class WebFrameWidgetImpl final
WebLayerTreeView* layerTreeView() const { return m_layerTreeView; }
GraphicsLayer* rootGraphicsLayer() const { return m_rootGraphicsLayer; };
- Color baseBackgroundColor() const { return m_baseBackgroundColor; }
+ Color baseBackgroundColor() const;
DECLARE_TRACE();
@@ -169,6 +171,7 @@ class WebFrameWidgetImpl final
void updateLayerTreeViewport();
void updateLayerTreeBackgroundColor();
void updateLayerTreeDeviceScaleFactor();
+ void updateBaseBackgroundColor();
// PageWidgetEventHandler functions
void handleMouseLeave(LocalFrame&, const WebMouseEvent&) override;
@@ -221,8 +224,10 @@ class WebFrameWidgetImpl final
bool m_suppressNextKeypressEvent;
- // Whether the WebFrameWidget is rendering transparently.
- bool m_isTransparent;
+ bool m_backgroundColorOverrideEnabled;
+ WebColor m_backgroundColorOverride;
+ bool m_baseBackgroundColorOverrideEnabled;
+ WebColor m_baseBackgroundColorOverride;
// TODO(ekaramad): Can we remove this and make sure IME events are not called
// when there is no page focus?

Powered by Google App Engine
This is Rietveld 408576698