Bug 199133

Summary: [Async overflow scroll] Clipped composited layers inside overflow scroll jitter and get incorrectly clipped
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: ScrollingAssignee: Simon Fraser (smfr) <simon.fraser>
Status: RESOLVED FIXED    
Severity: Normal CC: ews-watchlist, koivisto, mcatanzaro, rniwa, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 199132    
Bug Blocks:    
Attachments:
Description Flags
Patch
koivisto: review+
Patch
ews-watchlist: commit-queue-
Archive of layout-test-results from ews101 for mac-highsierra
none
Archive of layout-test-results from ews105 for mac-highsierra-wk2
none
Archive of layout-test-results from ews116 for mac-highsierra
none
Archive of layout-test-results from ews124 for ios-simulator-wk2
none
Patch
ews-watchlist: commit-queue-
Archive of layout-test-results from ews101 for mac-highsierra
none
Archive of layout-test-results from ews115 for mac-highsierra
none
Archive of layout-test-results from ews122 for ios-simulator-wk2 none

Description Simon Fraser (smfr) 2019-06-22 21:46:21 PDT
[Async overflow scroll] Clipped composited layers inside overflow scroll jitter and get incorrectly clipped
Comment 1 Simon Fraser (smfr) 2019-06-22 22:22:03 PDT
Created attachment 372693 [details]
Patch
Comment 2 Simon Fraser (smfr) 2019-06-22 22:23:36 PDT
<rdar://problem/43614439>
Comment 3 Antti Koivisto 2019-06-23 12:19:31 PDT
Comment on attachment 372693 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=372693&action=review

> Source/WebCore/ChangeLog:54
> +        With this patch, ScrollingTreePositionedNode are purely for absolute position inside non-containing-block
> +        stacking context overflow scroll. LayoutConstraints is renamed to AbsolutePositionConstraints accordingly.

You might also want to rename ScrollingTreePositionedNode to something more specific (AbsolutePositionedNode?).

> LayoutTests/compositing/scrolling/async-overflow-scrolling/clipped-layer-in-overflow-clipped-by-scroll.html:50
> +                document.getElementById('layers').innerText = window.internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_CLIPPING);

It would be good to also have some dynamic reftests showing element moving like they should, not just tree dumps.
Comment 4 Antti Koivisto 2019-06-23 12:37:18 PDT
Comment on attachment 372693 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=372693&action=review

> Source/WebCore/rendering/LayerAncestorClippingStack.cpp:124
> +    int numClipEntries = clipDataStack.size();
> +    int numStackEntries = m_stack.size();

I prefer 'clipEntryCount', 'stackEntryCount'

> Source/WebCore/rendering/RenderLayerCompositor.cpp:4237
> +            // FIXME: The child might be in a child frame. Need to do something that crosses frame boundaries.

The child might be a child frame but this doesn't shouldn't happen in any more general case (and is already handled by frame hosting nodes perhaps?).
Comment 5 Simon Fraser (smfr) 2019-06-23 13:59:36 PDT
Created attachment 372709 [details]
Patch
Comment 6 EWS Watchlist 2019-06-23 15:13:19 PDT Comment hidden (obsolete)
Comment 7 EWS Watchlist 2019-06-23 15:13:20 PDT Comment hidden (obsolete)
Comment 8 EWS Watchlist 2019-06-23 15:21:17 PDT Comment hidden (obsolete)
Comment 9 EWS Watchlist 2019-06-23 15:21:19 PDT Comment hidden (obsolete)
Comment 10 EWS Watchlist 2019-06-23 15:52:49 PDT Comment hidden (obsolete)
Comment 11 EWS Watchlist 2019-06-23 15:52:51 PDT Comment hidden (obsolete)
Comment 12 EWS Watchlist 2019-06-23 16:03:43 PDT Comment hidden (obsolete)
Comment 13 EWS Watchlist 2019-06-23 16:03:45 PDT Comment hidden (obsolete)
Comment 14 Simon Fraser (smfr) 2019-06-23 17:05:56 PDT
Created attachment 372720 [details]
Patch
Comment 15 EWS Watchlist 2019-06-23 18:20:27 PDT
Comment on attachment 372720 [details]
Patch

Attachment 372720 [details] did not pass mac-ews (mac):
Output: https://webkit-queues.webkit.org/results/12558068

New failing tests:
compositing/rtl/rtl-scrolling-with-transformed-descendants.html
compositing/overflow/scrolling-content-clip-to-viewport.html
Comment 16 EWS Watchlist 2019-06-23 18:20:29 PDT
Created attachment 372724 [details]
Archive of layout-test-results from ews101 for mac-highsierra

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews101  Port: mac-highsierra  Platform: Mac OS X 10.13.6
Comment 17 EWS Watchlist 2019-06-23 19:00:52 PDT
Comment on attachment 372720 [details]
Patch

Attachment 372720 [details] did not pass mac-debug-ews (mac):
Output: https://webkit-queues.webkit.org/results/12558098

New failing tests:
compositing/rtl/rtl-scrolling-with-transformed-descendants.html
compositing/overflow/scrolling-content-clip-to-viewport.html
Comment 18 EWS Watchlist 2019-06-23 19:00:54 PDT
Created attachment 372727 [details]
Archive of layout-test-results from ews115 for mac-highsierra

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews115  Port: mac-highsierra  Platform: Mac OS X 10.13.6
Comment 19 EWS Watchlist 2019-06-23 19:09:26 PDT
Comment on attachment 372720 [details]
Patch

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

New failing tests:
platform/ios/media/video-play-glyph-composited-outside-overflow-scrolling-touch-container.html
Comment 20 EWS Watchlist 2019-06-23 19:09:28 PDT
Created attachment 372728 [details]
Archive of layout-test-results from ews122 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews122  Port: ios-simulator-wk2  Platform: Mac OS X 10.14.5
Comment 21 Simon Fraser (smfr) 2019-06-23 20:10:21 PDT
https://trac.webkit.org/r246725
Comment 22 Radar WebKit Bug Importer 2019-06-23 20:11:29 PDT
<rdar://problem/52039797>
Comment 23 Michael Catanzaro 2019-07-16 10:11:04 PDT
I'm seeing spam from GraphicsContext now:

GraphicsContext 0x7ffd8765f6b0 stack changed by 1
GraphicsContext 0x7ffd8765f830 stack changed by 1
GraphicsContext 0x7ffd8765f6b0 stack changed by 1

WebKit shouldn't print anything during normal use. Simon, can we remove this?
Comment 24 Simon Fraser (smfr) 2019-07-16 10:38:52 PDT
Ooops, I left those in by mistake. I'll remove.
Comment 25 Simon Fraser (smfr) 2019-07-16 11:34:42 PDT
Removing via bug 199834.