- Revision
- 267067
- Author
- [email protected]
- Date
- 2020-09-14 19:17:25 -0700 (Mon, 14 Sep 2020)
Log Message
REGRESSION (Async overflow scroll): Code snippets on getkirby.com appear and disappear as content is scrolled
https://bugs.webkit.org/show_bug.cgi?id=216490
<rdar://problem/67018073>
Reviewed by Zalan Bujtas.
Source/WebCore:
The content in question had a z-order layer tree like this:
A (0,0) width=997 height=829 (layerID 20) {sc 2} RenderView
+ B (0,0) width=997 height=8 RenderBlock HTML class='no-js'
+ C (0,0) width=997 height=829 RenderFlexibleBox MAIN
n D (0,0) width=256 height=829 RenderFlexibleBox NAV class='left panel'
n E (0,0) width=256 height=829 (layerID 25) {sc 3} RenderBlock DIV class='scroller'
n F (256,0) width=741 height=829 RenderFlexibleBox ARTICLE class='main panel'
n G (0,0) width=741 height=829 (layerID 26) {sc 4} RenderBlock DIV class='scroller'
n H (0,-816) width=741 height=2810 RenderBlock DIV class='article-content'
+ I (0,0) width=256 height=1000 (layerID 27) overlap RenderBlock (relative positioned) DIV class='content'
+ J (10,300) width=721 height=202 (layerID 28) overlap RenderBlock (relative positioned) DIV class='relative-box'
+ K (10,802) width=721 height=202 (layerID 29) overlap RenderBlock (relative positioned) DIV class='relative-box'
+ L (10,1304) width=721 height=202 (layerID 30) overlap RenderBlock (relative positioned) DIV class='relative-box'
+ M (10,1806) width=721 height=202 (layerID 31) overlap RenderBlock (relative positioned) DIV class='relative-box'
+ M (10,2308) width=721 height=202 (layerID 32) overlap RenderBlock (relative positioned) DIV class='relative-box'
When layer 'G' is scrolled, the code would find the paint-order parent, F, which is normal-flow because it has overflow:hidden,
and would call setDescendantsNeedUpdateBackingAndHierarchyTraversal() on it. However, that doesn't go high enough, because
we need to update J-M since their ancestor clipping stacks have geometry that relies on the scroll position of G. If we don't
update that geometry, GraphicsLayers have an incorrect notion of what's visible, and we don't attach backing store.
The fix is to climb up to the stacking context B and call setDescendantsNeedUpdateBackingAndHierarchyTraversal() on it.
Test: compositing/scrolling/async-overflow-scrolling/nested-scrollers-backing-attachment.html
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollTo):
LayoutTests:
* compositing/scrolling/async-overflow-scrolling/nested-scrollers-backing-attachment-expected.txt: Added.
* compositing/scrolling/async-overflow-scrolling/nested-scrollers-backing-attachment.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (267066 => 267067)
--- trunk/LayoutTests/ChangeLog 2020-09-15 01:59:20 UTC (rev 267066)
+++ trunk/LayoutTests/ChangeLog 2020-09-15 02:17:25 UTC (rev 267067)
@@ -1,3 +1,14 @@
+2020-09-14 Simon Fraser <[email protected]>
+
+ REGRESSION (Async overflow scroll): Code snippets on getkirby.com appear and disappear as content is scrolled
+ https://bugs.webkit.org/show_bug.cgi?id=216490
+ <rdar://problem/67018073>
+
+ Reviewed by Zalan Bujtas.
+
+ * compositing/scrolling/async-overflow-scrolling/nested-scrollers-backing-attachment-expected.txt: Added.
+ * compositing/scrolling/async-overflow-scrolling/nested-scrollers-backing-attachment.html: Added.
+
2020-09-14 Chris Dumez <[email protected]>
Type of AnalyserNode's attributes should not be unrestricted double
Modified: trunk/LayoutTests/compositing/scrolling/async-overflow-scrolling/clipped-layer-in-overflow-nested-expected.txt (267066 => 267067)
--- trunk/LayoutTests/compositing/scrolling/async-overflow-scrolling/clipped-layer-in-overflow-nested-expected.txt 2020-09-15 01:59:20 UTC (rev 267066)
+++ trunk/LayoutTests/compositing/scrolling/async-overflow-scrolling/clipped-layer-in-overflow-nested-expected.txt 2020-09-15 02:17:25 UTC (rev 267067)
@@ -87,6 +87,7 @@
(children 1
(GraphicsLayer
(position 23.00 23.00)
+ (bounds origin 0.00 150.00)
(bounds 195.00 210.00)
(clips 1)
(children 1
Added: trunk/LayoutTests/compositing/scrolling/async-overflow-scrolling/nested-scrollers-backing-attachment-expected.txt (0 => 267067)
--- trunk/LayoutTests/compositing/scrolling/async-overflow-scrolling/nested-scrollers-backing-attachment-expected.txt (rev 0)
+++ trunk/LayoutTests/compositing/scrolling/async-overflow-scrolling/nested-scrollers-backing-attachment-expected.txt 2020-09-15 02:17:25 UTC (rev 267067)
@@ -0,0 +1,304 @@
+(GraphicsLayer
+ (anchor 0.00 0.00)
+ (bounds 800.00 600.00)
+ (clips 1)
+ (backingStoreAttached 1)
+ (children 1
+ (GraphicsLayer
+ (bounds 800.00 600.00)
+ (contentsOpaque 1)
+ (backingStoreAttached 1)
+ (children 10
+ (GraphicsLayer
+ (position 9.00 14.00)
+ (bounds 256.00 500.00)
+ (clips 1)
+ (backingStoreAttached 1)
+ (children 1
+ (GraphicsLayer
+ (bounds 256.00 500.00)
+ (backingStoreAttached 1)
+ (children 1
+ (GraphicsLayer
+ (bounds 241.00 485.00)
+ (clips 1)
+ (backingStoreAttached 1)
+ (children 1
+ (GraphicsLayer
+ (anchor 0.00 0.00)
+ (bounds 241.00 1000.00)
+ (backingStoreAttached 1)
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ (GraphicsLayer
+ (position 265.00 14.00)
+ (bounds 444.00 500.00)
+ (clips 1)
+ (backingStoreAttached 1)
+ (children 1
+ (GraphicsLayer
+ (bounds 444.00 500.00)
+ (backingStoreAttached 1)
+ (children 1
+ (GraphicsLayer
+ (bounds origin 0.00 1000.00)
+ (bounds 429.00 485.00)
+ (clips 1)
+ (backingStoreAttached 1)
+ (children 1
+ (GraphicsLayer
+ (scrollOffset (0,1000))
+ (anchor 0.00 0.00)
+ (bounds 429.00 2810.00)
+ (backingStoreAttached 1)
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ (GraphicsLayer
+ (position 9.00 14.00)
+ (bounds 256.00 500.00)
+ (clips 1)
+ (backingStoreAttached 1)
+ (children 1
+ (GraphicsLayer
+ (bounds 241.00 485.00)
+ (clips 1)
+ (backingStoreAttached 1)
+ (children 1
+ (GraphicsLayer
+ (bounds 241.00 1000.00)
+ (contentsOpaque 1)
+ (backingStoreAttached 1)
+ )
+ )
+ )
+ )
+ )
+ (GraphicsLayer
+ (position 9.00 14.00)
+ (bounds 256.00 500.00)
+ (clips 1)
+ (backingStoreAttached 1)
+ (children 1
+ (GraphicsLayer
+ (bounds 256.00 500.00)
+ (backingStoreAttached 1)
+ (children 3
+ (GraphicsLayer
+ (position 0.00 485.00)
+ (bounds 241.00 15.00)
+ (drawsContent 1)
+ (backingStoreAttached 1)
+ )
+ (GraphicsLayer
+ (position 241.00 0.00)
+ (bounds 15.00 485.00)
+ (drawsContent 1)
+ (backingStoreAttached 1)
+ )
+ (GraphicsLayer
+ (position 241.00 485.00)
+ (bounds 15.00 15.00)
+ (drawsContent 1)
+ (backingStoreAttached 1)
+ )
+ )
+ )
+ )
+ )
+ (GraphicsLayer
+ (position 265.00 14.00)
+ (bounds 444.00 500.00)
+ (clips 1)
+ (backingStoreAttached 1)
+ (children 1
+ (GraphicsLayer
+ (bounds origin 0.00 1000.00)
+ (bounds 429.00 485.00)
+ (clips 1)
+ (backingStoreAttached 1)
+ (children 1
+ (GraphicsLayer
+ (bounds 429.00 2810.00)
+ (clips 1)
+ (backingStoreAttached 1)
+ (children 1
+ (GraphicsLayer
+ (position 10.00 300.00)
+ (bounds 409.00 202.00)
+ (contentsOpaque 1)
+ (drawsContent 1)
+ (backingStoreAttached 0)
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ (GraphicsLayer
+ (position 265.00 14.00)
+ (bounds 444.00 500.00)
+ (clips 1)
+ (backingStoreAttached 1)
+ (children 1
+ (GraphicsLayer
+ (bounds origin 0.00 1000.00)
+ (bounds 429.00 485.00)
+ (clips 1)
+ (backingStoreAttached 1)
+ (children 1
+ (GraphicsLayer
+ (bounds 429.00 2810.00)
+ (clips 1)
+ (backingStoreAttached 1)
+ (children 1
+ (GraphicsLayer
+ (position 10.00 802.00)
+ (bounds 409.00 202.00)
+ (contentsOpaque 1)
+ (drawsContent 1)
+ (backingStoreAttached 1)
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ (GraphicsLayer
+ (position 265.00 14.00)
+ (bounds 444.00 500.00)
+ (clips 1)
+ (backingStoreAttached 1)
+ (children 1
+ (GraphicsLayer
+ (bounds origin 0.00 1000.00)
+ (bounds 429.00 485.00)
+ (clips 1)
+ (backingStoreAttached 1)
+ (children 1
+ (GraphicsLayer
+ (bounds 429.00 2810.00)
+ (clips 1)
+ (backingStoreAttached 1)
+ (children 1
+ (GraphicsLayer
+ (position 10.00 1304.00)
+ (bounds 409.00 202.00)
+ (contentsOpaque 1)
+ (drawsContent 1)
+ (backingStoreAttached 1)
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ (GraphicsLayer
+ (position 265.00 14.00)
+ (bounds 444.00 500.00)
+ (clips 1)
+ (backingStoreAttached 1)
+ (children 1
+ (GraphicsLayer
+ (bounds origin 0.00 1000.00)
+ (bounds 429.00 485.00)
+ (clips 1)
+ (backingStoreAttached 1)
+ (children 1
+ (GraphicsLayer
+ (bounds 429.00 2810.00)
+ (clips 1)
+ (backingStoreAttached 1)
+ (children 1
+ (GraphicsLayer
+ (position 10.00 1806.00)
+ (bounds 409.00 202.00)
+ (contentsOpaque 1)
+ (drawsContent 1)
+ (backingStoreAttached 0)
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ (GraphicsLayer
+ (position 265.00 14.00)
+ (bounds 444.00 500.00)
+ (clips 1)
+ (backingStoreAttached 1)
+ (children 1
+ (GraphicsLayer
+ (bounds origin 0.00 1000.00)
+ (bounds 429.00 485.00)
+ (clips 1)
+ (backingStoreAttached 1)
+ (children 1
+ (GraphicsLayer
+ (bounds 429.00 2810.00)
+ (clips 1)
+ (backingStoreAttached 1)
+ (children 1
+ (GraphicsLayer
+ (position 10.00 2308.00)
+ (bounds 409.00 202.00)
+ (contentsOpaque 1)
+ (drawsContent 1)
+ (backingStoreAttached 0)
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ (GraphicsLayer
+ (position 265.00 14.00)
+ (bounds 444.00 500.00)
+ (clips 1)
+ (backingStoreAttached 1)
+ (children 1
+ (GraphicsLayer
+ (bounds 444.00 500.00)
+ (backingStoreAttached 1)
+ (children 3
+ (GraphicsLayer
+ (position 0.00 485.00)
+ (bounds 429.00 15.00)
+ (drawsContent 1)
+ (backingStoreAttached 1)
+ )
+ (GraphicsLayer
+ (position 429.00 0.00)
+ (bounds 15.00 485.00)
+ (drawsContent 1)
+ (backingStoreAttached 1)
+ )
+ (GraphicsLayer
+ (position 429.00 485.00)
+ (bounds 15.00 15.00)
+ (drawsContent 1)
+ (backingStoreAttached 1)
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+)
+
Added: trunk/LayoutTests/compositing/scrolling/async-overflow-scrolling/nested-scrollers-backing-attachment.html (0 => 267067)
--- trunk/LayoutTests/compositing/scrolling/async-overflow-scrolling/nested-scrollers-backing-attachment.html (rev 0)
+++ trunk/LayoutTests/compositing/scrolling/async-overflow-scrolling/nested-scrollers-backing-attachment.html 2020-09-15 02:17:25 UTC (rev 267067)
@@ -0,0 +1,103 @@
+<!DOCTYPE html> <!-- webkit-test-runner [ internal:AsyncOverflowScrollingEnabled=true ] -->
+<html>
+<head>
+ <title>Tests that with nested scrollers, we trigger geometry updates on relative layers within the correct ancestor to get backing store attachment right.</title>
+ <style>
+ main {
+ display: flex;
+ position: absolute;
+ width: 700px;
+ height: 500px;
+ border: 1px solid black;
+ }
+
+ .left {
+ flex-basis: 20%;
+ flex-grow: 0;
+ min-width: 16rem;
+ }
+
+ .main {
+ flex-grow: 1;
+ flex-shrink: 1;
+ min-width: 20rem;
+ }
+
+ .panel {
+ display: flex;
+ flex-direction: column;
+ flex-shrink: 0;
+ overflow: hidden;
+ }
+
+ .scroller {
+ overflow: scroll;
+ }
+
+ .article-content {
+ margin: 0 auto;
+ max-width: 60rem;
+ overflow: hidden;
+ }
+
+ .content {
+ position: relative;
+ background-color: silver;
+ height: 1000px;
+ }
+
+ .relative-box {
+ position: relative;
+ height: 200px;
+ margin: 300px 10px;
+ background-color: silver;
+ border: 1px solid gray;
+ }
+ </style>
+ <script>
+ if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+ }
+
+ window.addEventListener('load', () => {
+ setTimeout(() => {
+ let scroller = document.getElementById('target');
+ scroller.scrollTo(0, 1000);
+ if (window.internals)
+ document.getElementById('layers').innerText = window.internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_CLIPPING + internals.LAYER_TREE_INCLUDES_BACKING_STORE_ATTACHED);
+ if (window.testRunner)
+ testRunner.notifyDone();
+ }, 0);
+ }, false);
+ </script>
+</head>
+<body>
+ <main>
+ <nav class="left panel">
+ <div class="scroller">
+ <div class="content">
+ </div>
+ </div>
+ </nav>
+ <article class="main panel">
+ <div id="target" class="scroller">
+ <div class="article-content">
+ <div class="relative-box">
+ </div>
+ <div class="relative-box">
+ </div>
+ <div class="relative-box">
+ </div>
+ <div class="relative-box">
+ </div>
+ <div class="relative-box">
+ </div>
+ </div>
+ </div>
+ </article>
+ </main>
+<pre id="layers"></pre>
+</body>
+</html>
+
Modified: trunk/LayoutTests/platform/ios-wk2/compositing/scrolling/async-overflow-scrolling/clipped-layer-in-overflow-nested-expected.txt (267066 => 267067)
--- trunk/LayoutTests/platform/ios-wk2/compositing/scrolling/async-overflow-scrolling/clipped-layer-in-overflow-nested-expected.txt 2020-09-15 01:59:20 UTC (rev 267066)
+++ trunk/LayoutTests/platform/ios-wk2/compositing/scrolling/async-overflow-scrolling/clipped-layer-in-overflow-nested-expected.txt 2020-09-15 02:17:25 UTC (rev 267067)
@@ -76,6 +76,7 @@
(children 1
(GraphicsLayer
(position 23.00 23.00)
+ (bounds origin 0.00 150.00)
(bounds 210.00 210.00)
(clips 1)
(children 1
Added: trunk/LayoutTests/platform/ios-wk2/compositing/scrolling/async-overflow-scrolling/nested-scrollers-backing-attachment-expected.txt (0 => 267067)
--- trunk/LayoutTests/platform/ios-wk2/compositing/scrolling/async-overflow-scrolling/nested-scrollers-backing-attachment-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/ios-wk2/compositing/scrolling/async-overflow-scrolling/nested-scrollers-backing-attachment-expected.txt 2020-09-15 02:17:25 UTC (rev 267067)
@@ -0,0 +1,240 @@
+(GraphicsLayer
+ (anchor 0.00 0.00)
+ (bounds 800.00 600.00)
+ (clips 1)
+ (backingStoreAttached 1)
+ (children 1
+ (GraphicsLayer
+ (bounds 800.00 600.00)
+ (contentsOpaque 1)
+ (backingStoreAttached 1)
+ (children 8
+ (GraphicsLayer
+ (position 9.00 14.00)
+ (bounds 256.00 500.00)
+ (clips 1)
+ (backingStoreAttached 1)
+ (children 1
+ (GraphicsLayer
+ (bounds 256.00 500.00)
+ (backingStoreAttached 1)
+ (children 1
+ (GraphicsLayer
+ (bounds 256.00 500.00)
+ (clips 1)
+ (backingStoreAttached 1)
+ (children 1
+ (GraphicsLayer
+ (anchor 0.00 0.00)
+ (bounds 256.00 1000.00)
+ (backingStoreAttached 1)
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ (GraphicsLayer
+ (position 265.00 14.00)
+ (bounds 444.00 500.00)
+ (clips 1)
+ (backingStoreAttached 1)
+ (children 1
+ (GraphicsLayer
+ (bounds 444.00 500.00)
+ (backingStoreAttached 1)
+ (children 1
+ (GraphicsLayer
+ (bounds origin 0.00 1000.00)
+ (bounds 444.00 500.00)
+ (clips 1)
+ (backingStoreAttached 1)
+ (children 1
+ (GraphicsLayer
+ (scrollOffset (0,1000))
+ (anchor 0.00 0.00)
+ (bounds 444.00 2810.00)
+ (backingStoreAttached 1)
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ (GraphicsLayer
+ (position 9.00 14.00)
+ (bounds 256.00 500.00)
+ (clips 1)
+ (backingStoreAttached 1)
+ (children 1
+ (GraphicsLayer
+ (bounds 256.00 500.00)
+ (clips 1)
+ (backingStoreAttached 1)
+ (children 1
+ (GraphicsLayer
+ (bounds 256.00 1000.00)
+ (contentsOpaque 1)
+ (backingStoreAttached 1)
+ )
+ )
+ )
+ )
+ )
+ (GraphicsLayer
+ (position 265.00 14.00)
+ (bounds 444.00 500.00)
+ (clips 1)
+ (backingStoreAttached 1)
+ (children 1
+ (GraphicsLayer
+ (bounds origin 0.00 1000.00)
+ (bounds 444.00 500.00)
+ (clips 1)
+ (backingStoreAttached 1)
+ (children 1
+ (GraphicsLayer
+ (bounds 444.00 2810.00)
+ (clips 1)
+ (backingStoreAttached 1)
+ (children 1
+ (GraphicsLayer
+ (position 10.00 300.00)
+ (bounds 424.00 202.00)
+ (contentsOpaque 1)
+ (drawsContent 1)
+ (backingStoreAttached 0)
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ (GraphicsLayer
+ (position 265.00 14.00)
+ (bounds 444.00 500.00)
+ (clips 1)
+ (backingStoreAttached 1)
+ (children 1
+ (GraphicsLayer
+ (bounds origin 0.00 1000.00)
+ (bounds 444.00 500.00)
+ (clips 1)
+ (backingStoreAttached 1)
+ (children 1
+ (GraphicsLayer
+ (bounds 444.00 2810.00)
+ (clips 1)
+ (backingStoreAttached 1)
+ (children 1
+ (GraphicsLayer
+ (position 10.00 802.00)
+ (bounds 424.00 202.00)
+ (contentsOpaque 1)
+ (drawsContent 1)
+ (backingStoreAttached 1)
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ (GraphicsLayer
+ (position 265.00 14.00)
+ (bounds 444.00 500.00)
+ (clips 1)
+ (backingStoreAttached 1)
+ (children 1
+ (GraphicsLayer
+ (bounds origin 0.00 1000.00)
+ (bounds 444.00 500.00)
+ (clips 1)
+ (backingStoreAttached 1)
+ (children 1
+ (GraphicsLayer
+ (bounds 444.00 2810.00)
+ (clips 1)
+ (backingStoreAttached 1)
+ (children 1
+ (GraphicsLayer
+ (position 10.00 1304.00)
+ (bounds 424.00 202.00)
+ (contentsOpaque 1)
+ (drawsContent 1)
+ (backingStoreAttached 1)
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ (GraphicsLayer
+ (position 265.00 14.00)
+ (bounds 444.00 500.00)
+ (clips 1)
+ (backingStoreAttached 1)
+ (children 1
+ (GraphicsLayer
+ (bounds origin 0.00 1000.00)
+ (bounds 444.00 500.00)
+ (clips 1)
+ (backingStoreAttached 1)
+ (children 1
+ (GraphicsLayer
+ (bounds 444.00 2810.00)
+ (clips 1)
+ (backingStoreAttached 1)
+ (children 1
+ (GraphicsLayer
+ (position 10.00 1806.00)
+ (bounds 424.00 202.00)
+ (contentsOpaque 1)
+ (drawsContent 1)
+ (backingStoreAttached 0)
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ (GraphicsLayer
+ (position 265.00 14.00)
+ (bounds 444.00 500.00)
+ (clips 1)
+ (backingStoreAttached 1)
+ (children 1
+ (GraphicsLayer
+ (bounds origin 0.00 1000.00)
+ (bounds 444.00 500.00)
+ (clips 1)
+ (backingStoreAttached 1)
+ (children 1
+ (GraphicsLayer
+ (bounds 444.00 2810.00)
+ (clips 1)
+ (backingStoreAttached 1)
+ (children 1
+ (GraphicsLayer
+ (position 10.00 2308.00)
+ (bounds 424.00 202.00)
+ (contentsOpaque 1)
+ (drawsContent 1)
+ (backingStoreAttached 0)
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+)
+
Modified: trunk/Source/WebCore/ChangeLog (267066 => 267067)
--- trunk/Source/WebCore/ChangeLog 2020-09-15 01:59:20 UTC (rev 267066)
+++ trunk/Source/WebCore/ChangeLog 2020-09-15 02:17:25 UTC (rev 267067)
@@ -1,3 +1,40 @@
+2020-09-14 Simon Fraser <[email protected]>
+
+ REGRESSION (Async overflow scroll): Code snippets on getkirby.com appear and disappear as content is scrolled
+ https://bugs.webkit.org/show_bug.cgi?id=216490
+ <rdar://problem/67018073>
+
+ Reviewed by Zalan Bujtas.
+
+ The content in question had a z-order layer tree like this:
+
+ A (0,0) width=997 height=829 (layerID 20) {sc 2} RenderView
+ + B (0,0) width=997 height=8 RenderBlock HTML class='no-js'
+ + C (0,0) width=997 height=829 RenderFlexibleBox MAIN
+ n D (0,0) width=256 height=829 RenderFlexibleBox NAV class='left panel'
+ n E (0,0) width=256 height=829 (layerID 25) {sc 3} RenderBlock DIV class='scroller'
+ n F (256,0) width=741 height=829 RenderFlexibleBox ARTICLE class='main panel'
+ n G (0,0) width=741 height=829 (layerID 26) {sc 4} RenderBlock DIV class='scroller'
+ n H (0,-816) width=741 height=2810 RenderBlock DIV class='article-content'
+ + I (0,0) width=256 height=1000 (layerID 27) overlap RenderBlock (relative positioned) DIV class='content'
+ + J (10,300) width=721 height=202 (layerID 28) overlap RenderBlock (relative positioned) DIV class='relative-box'
+ + K (10,802) width=721 height=202 (layerID 29) overlap RenderBlock (relative positioned) DIV class='relative-box'
+ + L (10,1304) width=721 height=202 (layerID 30) overlap RenderBlock (relative positioned) DIV class='relative-box'
+ + M (10,1806) width=721 height=202 (layerID 31) overlap RenderBlock (relative positioned) DIV class='relative-box'
+ + M (10,2308) width=721 height=202 (layerID 32) overlap RenderBlock (relative positioned) DIV class='relative-box'
+
+ When layer 'G' is scrolled, the code would find the paint-order parent, F, which is normal-flow because it has overflow:hidden,
+ and would call setDescendantsNeedUpdateBackingAndHierarchyTraversal() on it. However, that doesn't go high enough, because
+ we need to update J-M since their ancestor clipping stacks have geometry that relies on the scroll position of G. If we don't
+ update that geometry, GraphicsLayers have an incorrect notion of what's visible, and we don't attach backing store.
+
+ The fix is to climb up to the stacking context B and call setDescendantsNeedUpdateBackingAndHierarchyTraversal() on it.
+
+ Test: compositing/scrolling/async-overflow-scrolling/nested-scrollers-backing-attachment.html
+
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::scrollTo):
+
2020-09-14 Chris Dumez <[email protected]>
Type of AnalyserNode's attributes should not be unrestricted double
Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (267066 => 267067)
--- trunk/Source/WebCore/rendering/RenderLayer.cpp 2020-09-15 01:59:20 UTC (rev 267066)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp 2020-09-15 02:17:25 UTC (rev 267067)
@@ -2729,8 +2729,8 @@
setNeedsCompositingGeometryUpdate();
// Scroll position can affect the location of a composited descendant (which may be a sibling in z-order),
- // so trigger a descendant walk from the paint-order parent.
- if (auto* paintParent = paintOrderParent())
+ // so trigger a descendant walk from the stacking context.
+ if (auto* paintParent = stackingContext())
paintParent->setDescendantsNeedUpdateBackingAndHierarchyTraversal();
}