Bug 197654

Summary: Translucent gradient rendering bug due to will-change transform
Product: WebKit Reporter: Jonas Treub <jonastreub>
Component: CompositingAssignee: Simon Fraser (smfr) <simon.fraser>
Severity: Normal CC: ben, bfulgham, commit-queue, dino, graouts, liugb1101, sabouhallawa, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: Macintosh   
OS: macOS 10.14   
See Also: https://bugs.webkit.org/show_bug.cgi?id=153852
Description Flags
Patch none

Description Jonas Treub 2019-05-07 03:07:49 PDT

When toggling an element background from a color to a translucent gradient the gradient sometimes gets a black background.
This only appears to happen when will-change transform is enabled for the element.

1) View the example: https://codepen.io/jonastreub/pen/XwbWaR

2) Toggle the element background by clicking it

3) Notice that the gradient has a black background

Expected Results: The gradient to be translucent.
Comment 1 Radar WebKit Bug Importer 2019-05-07 11:18:29 PDT
Comment 2 Simon Fraser (smfr) 2019-05-07 13:29:39 PDT
Sounds like we're failing to update contentsOpaque.
Comment 3 Simon Fraser (smfr) 2019-05-11 12:33:25 PDT
We currently re-evaluate contentsOpaque in RenderLayerBacking::updateGeometry(), but that doesn't fire for just a background change (repaint triggers an updateConfiguration()). However, contentsOpaque depends on geometry, and updateConfiguration() runs first, so I think we'll have to move it to updateAfterDescendants().
Comment 4 Simon Fraser (smfr) 2019-05-11 13:00:49 PDT
Created attachment 369658 [details]
Comment 5 WebKit Commit Bot 2019-05-11 15:05:43 PDT
Comment on attachment 369658 [details]

Clearing flags on attachment: 369658

Committed r245207: <https://trac.webkit.org/changeset/245207>
Comment 6 WebKit Commit Bot 2019-05-11 15:05:44 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Simon Fraser (smfr) 2019-05-11 15:06:47 PDT
This did not fix bug 197611, so something else is going on there.
Comment 8 Simon Fraser (smfr) 2019-05-29 19:12:52 PDT
*** Bug 197611 has been marked as a duplicate of this bug. ***
Comment 9 Simon Fraser (smfr) 2019-06-01 19:54:50 PDT
*** Bug 196946 has been marked as a duplicate of this bug. ***