Bug 188655

Summary: REGRESSION (r233268): contents of an animated element inside overflow:hidden disappear
Product: WebKit Reporter: Antoine Quint <graouts>
Component: Layout and RenderingAssignee: Simon Fraser (smfr) <simon.fraser>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, dino, dstockwell, ews-watchlist, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=186909
Attachments:
Description Flags
Test
none
simpler test
none
Patch
graouts: review+, ews-watchlist: commit-queue-
Archive of layout-test-results from ews121 for ios-simulator-wk2 none

Description Antoine Quint 2018-08-16 08:40:02 PDT
Created attachment 347266 [details]
Test

The attached test case regressed with https://trac.webkit.org/changeset/233268 which was a fix for https://bugs.webkit.org/show_bug.cgi?id=186909. The issue goes away under several scenarios:

- use an <img> directly instead of a <picture>
- change .grid to not have explicit left and transform values and change slide-in to animate to translateX(100%)
- add an explicit 0% { transform: translateX(-100%) } keframe for the slide-in animation
Comment 1 Radar WebKit Bug Importer 2018-08-16 08:41:58 PDT
<rdar://problem/43382687>
Comment 2 Simon Fraser (smfr) 2018-11-11 15:57:08 PST
Created attachment 354513 [details]
simpler test
Comment 3 Simon Fraser (smfr) 2018-12-13 17:21:30 PST
I think this happens when the un-animated state of the element has a transform. We are confused, in GraphicsLayerCA::computeVisibleAndCoverageRect(), about layerTransform and currentTransform, and seem to use different ones for layerBounds and coverageRect.
Comment 4 Simon Fraser (smfr) 2018-12-13 18:14:40 PST
Ah, the actual issue is that getOverlapBoundsIncludingChildrenAccountingForTransformAnimations() looks at keyframes to get the bounds, but in this example there is no 0% keyframe, so we fail to take the static translateX(-100%) into account.
Comment 5 Simon Fraser (smfr) 2018-12-13 18:50:46 PST
Created attachment 357283 [details]
Patch
Comment 6 EWS Watchlist 2018-12-13 20:32:53 PST
Comment on attachment 357283 [details]
Patch

Attachment 357283 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: https://webkit-queues.webkit.org/results/10391430

New failing tests:
legacy-animation-engine/compositing/backing/backing-store-attachment-empty-keyframe.html
compositing/backing/backing-store-attachment-empty-keyframe.html
Comment 7 EWS Watchlist 2018-12-13 20:32:56 PST
Created attachment 357295 [details]
Archive of layout-test-results from ews121 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews121  Port: ios-simulator-wk2  Platform: Mac OS X 10.13.6
Comment 8 Simon Fraser (smfr) 2018-12-14 11:06:13 PST
https://trac.webkit.org/changeset/239222/webkit