Translucent gradient rendering bug due to will-change transform
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 11 May 2019 22:05:37 +0000 (22:05 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 11 May 2019 22:05:37 +0000 (22:05 +0000)
commit89188a75e3533339ec182b6edc979e05e46cdf25
tree0c747d1f1e87ce7322742a392bd490a956019c43
parent82210061fb01793b2b6a113f1143b2e6fa225d92
Translucent gradient rendering bug due to will-change transform
https://bugs.webkit.org/show_bug.cgi?id=197654
<rdar://problem/50547664>

Reviewed by Dean Jackson.
Source/WebCore:

We failed to re-evaluate 'contentsOpaque' when a background changed, because this
happened in updateGeometry() and that doesn't run for background changes.

However, 'contentsOpaque' also requires knowing about geometry because we have to
turn it off when there's subpixel positioning, and updateConfiguration()
runs before updateGeometry().

So compute m_hasSubpixelRounding in updateGeometry() and set contentsOpaque in
updateAfterDescendants().

Test: compositing/contents-opaque/background-change-to-transparent.html

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateConfiguration):
(WebCore::RenderLayerBacking::updateGeometry):
(WebCore::RenderLayerBacking::updateAfterDescendants):
* rendering/RenderLayerBacking.h:

LayoutTests:

* compositing/contents-opaque/background-change-to-transparent-expected.txt: Added.
* compositing/contents-opaque/background-change-to-transparent.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245207 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/compositing/contents-opaque/background-change-to-transparent-expected.txt [new file with mode: 0644]
LayoutTests/compositing/contents-opaque/background-change-to-transparent.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderLayerBacking.cpp
Source/WebCore/rendering/RenderLayerBacking.h