Chromium Code Reviews| 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 { |