Bug 204605 - Flashing and partly visible elements
Summary: Flashing and partly visible elements
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: Safari 13
Hardware: iPhone / iPad iOS 13
: P2 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords: InRadar
: 207689 209526 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-11-26 01:44 PST by Roland Soos
Modified: 2020-03-25 15:29 PDT (History)
13 users (show)

See Also:


Attachments
Test (1.03 MB, application/x-zip-compressed)
2019-11-26 01:44 PST, Roland Soos
no flags Details
Reduced test case (1.65 KB, text/html)
2019-12-02 19:24 PST, Simon Fraser (smfr)
no flags Details
Testcase which reproduces on trunk (1.66 KB, text/html)
2020-03-24 20:47 PDT, Simon Fraser (smfr)
no flags Details
Patch (15.89 KB, patch)
2020-03-25 12:39 PDT, Simon Fraser (smfr)
zalan: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Roland Soos 2019-11-26 01:44:37 PST
Created attachment 384339 [details]
Test

Elements are flashing or become partly rendered after transform change. 

Reproduce:

1. Open in Safari on iPad or iPhone: https://smartslider3.com/bugs/webkit/flashing/
2. Swipe left on the two small image
3. It starts to amimate and the elements are flashing and end up being partly visible.

Screen capture: https://www.youtube.com/watch?v=FizN0noXky0

Attached the source code for testing.
Comment 1 Radar WebKit Bug Importer 2019-11-26 15:45:15 PST
<rdar://problem/57496061>
Comment 2 Simon Fraser (smfr) 2019-12-02 14:37:43 PST
I can reproduce. Looks like we fail to repaint when the animating photos drop out of layers.
Comment 3 Simon Fraser (smfr) 2019-12-02 19:24:08 PST
Created attachment 384682 [details]
Reduced test case

This is about repaints in backing sharing layers.
Comment 4 Simon Fraser (smfr) 2019-12-02 22:13:23 PST
We have a layer tree that looks like this:

S---------C-c-- -- ------ ------ 0x80945eb00 (0,0) width=858 height=1029 (layerID 40) {sc 5} RenderView
S-----------c-- -- ------ ------   + 0x80945ec60 (0,0) width=858 height=544  <html>
-NO-------CP--- -- ------ ------     n 0x80945edc0 (18,10) width=822 height=524 (layerID 46) {sc 6}  <div> class='container'
S----------pcs- -- ------ ------     + 0x80945e000 (12,12) width=2000 height=0  <div> class='wrapper'
S-O-------C-cs- -- ------ ------       + 0x80945e160 (0,0) width=2000 height=250 (layerID 47) clipping  <div> class='intermediate2'
S--A------C--s- -- ------ ------         + 0x80945e2c0 (22,22) width=300 height=200 (layerID 43)  <div> class='animated slide'

0x80945e2c0 becomes non-composited, issuing a repaint in 0x80945e160. 0x80945e160 becomes non-composited, which also needs to issue a repaint. It should repaint in 0x80945e000, but when we issue this repaint, we're also in the process of rebuilding backing sharing layers, so 0x80945e000 isn't currently marked as "paints into provided backing" in RenderLayer::enclosingCompositingLayerForRepaint(), so we end up issuing the repaint on the RenderView's layer.
Comment 5 Simon Fraser (smfr) 2020-03-24 19:00:32 PDT
The testcase no longer reproduces this after https://trac.webkit.org/changeset/258336/webkit, and the original testcase seems to have lost its images.
Comment 6 Simon Fraser (smfr) 2020-03-24 20:47:25 PDT
Created attachment 394467 [details]
Testcase which reproduces on trunk
Comment 7 Simon Fraser (smfr) 2020-03-24 22:08:41 PDT
*** Bug 207689 has been marked as a duplicate of this bug. ***
Comment 8 Simon Fraser (smfr) 2020-03-24 22:09:39 PDT
*** Bug 209526 has been marked as a duplicate of this bug. ***
Comment 9 Simon Fraser (smfr) 2020-03-25 12:39:36 PDT
Created attachment 394526 [details]
Patch
Comment 10 Simon Fraser (smfr) 2020-03-25 15:29:26 PDT
https://trac.webkit.org/changeset/259015/webkit