Title: [246407] trunk
Revision
246407
Author
[email protected]
Date
2019-06-13 11:36:03 -0700 (Thu, 13 Jun 2019)

Log Message

twitch.tv: embedded video hovers down the screen when scrolling on iPad
https://bugs.webkit.org/show_bug.cgi?id=198832
<rdar://problem/51541439>

Reviewed by Simon Fraser.

Source/WebCore:

Test: compositing/scrolling/async-overflow-scrolling/overflow-scroll-paint-order-sibling.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollTo):

Overflow scroll layer may have composited descendants that are its paint order siblings. We need to invalidate
the tree of the paint order parent for compositing update (instead of just the tree of the overflow scroll layer).

This matches what RenderLayer::updateLayerPosition() does.

LayoutTests:

* compositing/scrolling/async-overflow-scrolling/overflow-scroll-paint-order-sibling-expected.html: Added.
* compositing/scrolling/async-overflow-scrolling/overflow-scroll-paint-order-sibling.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (246406 => 246407)


--- trunk/LayoutTests/ChangeLog	2019-06-13 18:35:26 UTC (rev 246406)
+++ trunk/LayoutTests/ChangeLog	2019-06-13 18:36:03 UTC (rev 246407)
@@ -1,3 +1,14 @@
+2019-06-13  Antti Koivisto  <[email protected]>
+
+        twitch.tv: embedded video hovers down the screen when scrolling on iPad
+        https://bugs.webkit.org/show_bug.cgi?id=198832
+        <rdar://problem/51541439>
+
+        Reviewed by Simon Fraser.
+
+        * compositing/scrolling/async-overflow-scrolling/overflow-scroll-paint-order-sibling-expected.html: Added.
+        * compositing/scrolling/async-overflow-scrolling/overflow-scroll-paint-order-sibling.html: Added.
+
 2019-06-13  Youenn Fablet  <[email protected]>
 
         Import WPT websockets tests

Added: trunk/LayoutTests/compositing/scrolling/async-overflow-scrolling/overflow-scroll-paint-order-sibling-expected.html (0 => 246407)


--- trunk/LayoutTests/compositing/scrolling/async-overflow-scrolling/overflow-scroll-paint-order-sibling-expected.html	                        (rev 0)
+++ trunk/LayoutTests/compositing/scrolling/async-overflow-scrolling/overflow-scroll-paint-order-sibling-expected.html	2019-06-13 18:36:03 UTC (rev 246407)
@@ -0,0 +1,31 @@
+<!DOCTYPE html> <!-- webkit-test-runner [ internal:AsyncOverflowScrollingEnabled=true ] -->
+<style>
+.scroll {
+    overflow:scroll;
+    width: 500px;
+    height: 500px;
+    border: 2px solid yellow;
+}
+.content {
+    overflow:hidden;
+    width: 500px;
+    height: 1500px;
+    border: 10px solid green;
+}
+.stuff {
+    position:relative;
+    top: 200px;
+    width: 50px;
+    height: 50px;
+    background: red;
+}
+</style>
+<div class="scroll" id="scroller">
+    <div class="content">
+        <div class="stuff">
+        </div>
+    </div>
+</div>
+<script>
+scroller.scrollTo(0, 100);
+</script>

Added: trunk/LayoutTests/compositing/scrolling/async-overflow-scrolling/overflow-scroll-paint-order-sibling.html (0 => 246407)


--- trunk/LayoutTests/compositing/scrolling/async-overflow-scrolling/overflow-scroll-paint-order-sibling.html	                        (rev 0)
+++ trunk/LayoutTests/compositing/scrolling/async-overflow-scrolling/overflow-scroll-paint-order-sibling.html	2019-06-13 18:36:03 UTC (rev 246407)
@@ -0,0 +1,32 @@
+<!DOCTYPE html> <!-- webkit-test-runner [ internal:AsyncOverflowScrollingEnabled=true ] -->
+<style>
+.scroll {
+    overflow:scroll;
+    width: 500px;
+    height: 500px;
+    border: 2px solid yellow;
+}
+.content {
+    overflow:hidden;
+    width: 500px;
+    height: 1500px;
+    border: 10px solid green;
+}
+.stuff {
+    position:relative;
+    top: 200px;
+    width: 50px;
+    height: 50px;
+    background: red;
+    will-change:transform;
+}
+</style>
+<div class="scroll" id="scroller">
+    <div class="content">
+        <div class="stuff">
+        </div>
+    </div>
+</div>
+<script>
+scroller.scrollTo(0, 100);
+</script>

Modified: trunk/Source/WebCore/ChangeLog (246406 => 246407)


--- trunk/Source/WebCore/ChangeLog	2019-06-13 18:35:26 UTC (rev 246406)
+++ trunk/Source/WebCore/ChangeLog	2019-06-13 18:36:03 UTC (rev 246407)
@@ -1,3 +1,21 @@
+2019-06-13  Antti Koivisto  <[email protected]>
+
+        twitch.tv: embedded video hovers down the screen when scrolling on iPad
+        https://bugs.webkit.org/show_bug.cgi?id=198832
+        <rdar://problem/51541439>
+
+        Reviewed by Simon Fraser.
+
+        Test: compositing/scrolling/async-overflow-scrolling/overflow-scroll-paint-order-sibling.html
+
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::scrollTo):
+
+        Overflow scroll layer may have composited descendants that are its paint order siblings. We need to invalidate
+        the tree of the paint order parent for compositing update (instead of just the tree of the overflow scroll layer).
+
+        This matches what RenderLayer::updateLayerPosition() does.
+
 2019-06-13  Youenn Fablet  <[email protected]>
 
         SocketStreamHandle should not be destroyed in a background thread

Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (246406 => 246407)


--- trunk/Source/WebCore/rendering/RenderLayer.cpp	2019-06-13 18:35:26 UTC (rev 246406)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp	2019-06-13 18:36:03 UTC (rev 246407)
@@ -2515,7 +2515,11 @@
             // when that completes.
             if (usesCompositedScrolling()) {
                 setNeedsCompositingGeometryUpdate();
-                setDescendantsNeedUpdateBackingAndHierarchyTraversal();
+
+                // 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())
+                    paintParent->setDescendantsNeedUpdateBackingAndHierarchyTraversal();
             }
 
             updateCompositingLayersAfterScroll();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to