Title: [245212] trunk
Revision
245212
Author
[email protected]
Date
2019-05-11 16:17:17 -0700 (Sat, 11 May 2019)

Log Message

Overflow scroll that becomes non-scrollable should stop being composited
https://bugs.webkit.org/show_bug.cgi?id=197817
<rdar://problem/50697290>

Reviewed by Antti Koivisto.

Source/WebCore:

Remove the iOS-specific #ifdef around code that triggers a compositing re-evaluation
when scrolling state changes.

Test: compositing/scrolling/async-overflow-scrolling/become-non-scrollable.html

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

LayoutTests:

Put in a compositing/scrolling/async-overflow-scrolling dir so we can enable it only
for platforms that have async overflow scrolling.

* TestExpectations:
* compositing/scrolling/async-overflow-scrolling/become-non-scrollable-expected.txt: Added.
* compositing/scrolling/async-overflow-scrolling/become-non-scrollable.html: Added.
* platform/ios-wk2/TestExpectations:
* platform/mac-wk2/TestExpectations:

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (245211 => 245212)


--- trunk/LayoutTests/ChangeLog	2019-05-11 23:14:03 UTC (rev 245211)
+++ trunk/LayoutTests/ChangeLog	2019-05-11 23:17:17 UTC (rev 245212)
@@ -1,3 +1,20 @@
+2019-05-11  Simon Fraser  <[email protected]>
+
+        Overflow scroll that becomes non-scrollable should stop being composited
+        https://bugs.webkit.org/show_bug.cgi?id=197817
+        <rdar://problem/50697290>
+
+        Reviewed by Antti Koivisto.
+
+        Put in a compositing/scrolling/async-overflow-scrolling dir so we can enable it only
+        for platforms that have async overflow scrolling.
+
+        * TestExpectations:
+        * compositing/scrolling/async-overflow-scrolling/become-non-scrollable-expected.txt: Added.
+        * compositing/scrolling/async-overflow-scrolling/become-non-scrollable.html: Added.
+        * platform/ios-wk2/TestExpectations:
+        * platform/mac-wk2/TestExpectations:
+
 2019-05-11  Alexey Proskuryakov  <[email protected]>
 
         Cleaning up results for legacy-animation-engine tests

Modified: trunk/LayoutTests/TestExpectations (245211 => 245212)


--- trunk/LayoutTests/TestExpectations	2019-05-11 23:14:03 UTC (rev 245211)
+++ trunk/LayoutTests/TestExpectations	2019-05-11 23:17:17 UTC (rev 245212)
@@ -61,6 +61,7 @@
 
 # Requires async overflow scrolling
 compositing/shared-backing/overflow-scroll [ Skip ]
+compositing/scrolling/async-overflow-scrolling [ Skip ]
 
 # WebKit2 only.
 printing/printing-events.html [ Skip ]

Added: trunk/LayoutTests/compositing/scrolling/async-overflow-scrolling/become-non-scrollable-expected.txt (0 => 245212)


--- trunk/LayoutTests/compositing/scrolling/async-overflow-scrolling/become-non-scrollable-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/compositing/scrolling/async-overflow-scrolling/become-non-scrollable-expected.txt	2019-05-11 23:17:17 UTC (rev 245212)
@@ -0,0 +1,3 @@
+There should be no layers.
+
+

Added: trunk/LayoutTests/compositing/scrolling/async-overflow-scrolling/become-non-scrollable.html (0 => 245212)


--- trunk/LayoutTests/compositing/scrolling/async-overflow-scrolling/become-non-scrollable.html	                        (rev 0)
+++ trunk/LayoutTests/compositing/scrolling/async-overflow-scrolling/become-non-scrollable.html	2019-05-11 23:17:17 UTC (rev 245212)
@@ -0,0 +1,51 @@
+<!DOCTYPE html> <!-- webkit-test-runner [ internal:AsyncOverflowScrollingEnabled=true ] -->
+<html>
+<head>
+    <title>Tests an overflow scroll stops compositing if its content shrinks</title>
+    <style>
+        .scrollable {
+            overflow-y: scroll;
+            height: 300px;
+            width: 300px;
+            margin: 10px;
+            border: 1px solid black;
+        }
+    
+        .contents {
+            height: 500px;
+            width: 20px;
+            background-color: silver;
+        }
+        
+        .contents.changed {
+            height: 100px;
+        }
+    </style>
+    <script>
+        if (window.testRunner) {
+            testRunner.dumpAsText();
+            testRunner.waitUntilDone();
+        }
+
+        window.addEventListener('load', () => {
+            setTimeout(() => {
+                document.querySelector('.contents').classList.add('changed');
+
+                if (window.internals)
+                    document.getElementById('layers').innerText = window.internals.layerTreeAsText(document);
+
+                if (window.testRunner)
+                    testRunner.notifyDone();
+            }, 0);
+        }, false);
+    </script>
+</head>
+<body>
+    <div class="scrollable">
+        <div class="contents"></div>
+    </div>
+<p>There should be no layers.</p>
+<pre id="layers"></pre>
+</body>
+</html>
+

Modified: trunk/LayoutTests/platform/ios-wk2/TestExpectations (245211 => 245212)


--- trunk/LayoutTests/platform/ios-wk2/TestExpectations	2019-05-11 23:14:03 UTC (rev 245211)
+++ trunk/LayoutTests/platform/ios-wk2/TestExpectations	2019-05-11 23:17:17 UTC (rev 245212)
@@ -8,6 +8,7 @@
 
 compositing/ios [ Pass ]
 compositing/shared-backing/overflow-scroll [ Pass ]
+compositing/scrolling/async-overflow-scrolling [ Pass ]
 fast/device-orientation [ Pass ]
 fast/history/ios [ Pass ]
 fast/scrolling/ios [ Pass ]

Modified: trunk/LayoutTests/platform/mac-wk2/TestExpectations (245211 => 245212)


--- trunk/LayoutTests/platform/mac-wk2/TestExpectations	2019-05-11 23:14:03 UTC (rev 245211)
+++ trunk/LayoutTests/platform/mac-wk2/TestExpectations	2019-05-11 23:17:17 UTC (rev 245212)
@@ -6,6 +6,7 @@
 #//////////////////////////////////////////////////////////////////////////////////////////
 
 compositing/shared-backing/overflow-scroll [ Pass ]
+compositing/scrolling/async-overflow-scrolling [ Pass ]
 editing/find [ Pass ]
 editing/undo-manager [ Pass ]
 fast/forms/select/mac-wk2 [ Pass ]

Modified: trunk/Source/WebCore/ChangeLog (245211 => 245212)


--- trunk/Source/WebCore/ChangeLog	2019-05-11 23:14:03 UTC (rev 245211)
+++ trunk/Source/WebCore/ChangeLog	2019-05-11 23:17:17 UTC (rev 245212)
@@ -1,5 +1,21 @@
 2019-05-11  Simon Fraser  <[email protected]>
 
+        Overflow scroll that becomes non-scrollable should stop being composited
+        https://bugs.webkit.org/show_bug.cgi?id=197817
+        <rdar://problem/50697290>
+
+        Reviewed by Antti Koivisto.
+
+        Remove the iOS-specific #ifdef around code that triggers a compositing re-evaluation
+        when scrolling state changes.
+
+        Test: compositing/scrolling/async-overflow-scrolling/become-non-scrollable.html
+
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::updateScrollInfoAfterLayout):
+
+2019-05-11  Simon Fraser  <[email protected]>
+
         Layer bounds are incorrect for sharing layers that paint with transforms
         https://bugs.webkit.org/show_bug.cgi?id=197768
         <rdar://problem/50695493>

Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (245211 => 245212)


--- trunk/Source/WebCore/rendering/RenderLayer.cpp	2019-05-11 23:14:03 UTC (rev 245211)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp	2019-05-11 23:17:17 UTC (rev 245212)
@@ -3709,10 +3709,8 @@
         setNeedsCompositingConfigurationUpdate();
     }
 
-#if PLATFORM(IOS_FAMILY)
     if (canUseCompositedScrolling())
         setNeedsPostLayoutCompositingUpdate();
-#endif
 
     updateScrollSnapState();
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to