Chromium Code Reviews| Index: third_party/WebKit/Source/web/WebViewImpl.cpp |
| diff --git a/third_party/WebKit/Source/web/WebViewImpl.cpp b/third_party/WebKit/Source/web/WebViewImpl.cpp |
| index 945f27e4c99ab304fcb214c84680cb17730107fd..d6496bcdc611f8f6ea3844548d03a48ce06d9729 100644 |
| --- a/third_party/WebKit/Source/web/WebViewImpl.cpp |
| +++ b/third_party/WebKit/Source/web/WebViewImpl.cpp |
| @@ -3523,9 +3523,7 @@ void WebViewImpl::setIsTransparent(bool isTransparent) { |
| // Future frames check this to know whether to be transparent. |
| m_isTransparent = isTransparent; |
| - |
| - if (m_layerTreeView) |
| - m_layerTreeView->setHasTransparentBackground(this->isTransparent()); |
| + updateLayerTreeBackgroundColor(); |
| } |
| bool WebViewImpl::isTransparent() const { |
| @@ -4014,9 +4012,12 @@ void WebViewImpl::updateLayerTreeBackgroundColor() { |
| if (!m_layerTreeView) |
| return; |
| - m_layerTreeView->setBackgroundColor(alphaChannel(m_backgroundColorOverride) |
| - ? m_backgroundColorOverride |
| - : backgroundColor()); |
| + WebColor color = alphaChannel(m_backgroundColorOverride) |
| + ? m_backgroundColorOverride |
| + : backgroundColor(); |
| + m_layerTreeView->setBackgroundColor(color); |
| + m_layerTreeView->setHasTransparentBackground(alphaChannel(color) < |
|
dgozman
2017/03/01 19:11:52
Similarly to Chris' question, do we actually need
Eric Seckler
2017/03/07 18:00:47
Implemented as suggested.
|
| + SK_AlphaOPAQUE); |
| } |
| void WebViewImpl::updateLayerTreeDeviceScaleFactor() { |