Bug 197654 - Translucent gradient rendering bug due to will-change transform
Summary: Translucent gradient rendering bug due to will-change transform
Alias: None
Product: WebKit
Classification: Unclassified
Component: Compositing (show other bugs)
Version: Safari Technology Preview
Hardware: Macintosh macOS 10.14
: P2 Normal
Assignee: Simon Fraser (smfr)
Keywords: InRadar
: 196946 197611 (view as bug list)
Depends on:
Reported: 2019-05-07 03:07 PDT by Jonas Treub
Modified: 2019-06-01 19:54 PDT (History)
10 users (show)

See Also:

Patch (7.94 KB, patch)
2019-05-11 13:00 PDT, Simon Fraser (smfr)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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. ***