Title: [258541] trunk
Revision
258541
Author
[email protected]
Date
2020-03-16 22:27:00 -0700 (Mon, 16 Mar 2020)

Log Message

Remove the zero-delay ScrollingCoordinatorMac commit timer
https://bugs.webkit.org/show_bug.cgi?id=209164

Reviewed by Zalan Bujtas.

Source/WebCore:

The scrolling tree on macOS should just commit at rendering update time. There's no need
for a separate zero-delay timer.

Tested by existing tests.

* page/scrolling/mac/ScrollingCoordinatorMac.h:
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::ScrollingCoordinatorMac):
(WebCore::ScrollingCoordinatorMac::pageDestroyed):
(WebCore::ScrollingCoordinatorMac::scheduleTreeStateCommit):
(WebCore::ScrollingCoordinatorMac::commitTreeStateIfNeeded):
(WebCore::ScrollingCoordinatorMac::commitTreeState): Deleted.

LayoutTests:

Dumping layers just made this test flakey. It's enough to test for scroll events on the overflow.

* tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-expected.txt:
* tiled-drawing/scrolling/fast-scroll-div-latched-mainframe.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (258540 => 258541)


--- trunk/LayoutTests/ChangeLog	2020-03-17 05:22:41 UTC (rev 258540)
+++ trunk/LayoutTests/ChangeLog	2020-03-17 05:27:00 UTC (rev 258541)
@@ -1,3 +1,15 @@
+2020-03-16  Simon Fraser  <[email protected]>
+
+        Remove the zero-delay ScrollingCoordinatorMac commit timer
+        https://bugs.webkit.org/show_bug.cgi?id=209164
+
+        Reviewed by Zalan Bujtas.
+
+        Dumping layers just made this test flakey. It's enough to test for scroll events on the overflow.
+
+        * tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-expected.txt:
+        * tiled-drawing/scrolling/fast-scroll-div-latched-mainframe.html:
+
 2020-03-16  Lauro Moura  <[email protected]>
 
         WPE and GTK gardening.

Modified: trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-expected.txt (258540 => 258541)


--- trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-expected.txt	2020-03-17 05:22:41 UTC (rev 258540)
+++ trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-expected.txt	2020-03-17 05:27:00 UTC (rev 258541)
@@ -53,26 +53,4 @@
 
 TEST COMPLETE
 PASS Scrollable div did not receive wheel events.
-(GraphicsLayer
-  (anchor 0.00 0.00)
-  (bounds 2008.00 2266.00)
-  (visible rect 0.00, 70.00 785.00 x 585.00)
-  (coverage rect 0.00, 70.00 785.00 x 585.00)
-  (intersects coverage rect 1)
-  (contentsScale 1.00)
-  (children 1
-    (GraphicsLayer
-      (bounds 2008.00 2266.00)
-      (contentsOpaque 1)
-      (visible rect 0.00, 70.00 785.00 x 585.00)
-      (coverage rect 0.00, 0.00 1570.00 x 1755.00)
-      (intersects coverage rect 1)
-      (contentsScale 1.00)
-      (tile cache coverage 0, 0 2008 x 2048)
-      (tile size 512 x 512)
-      (top left tile 0, 0 tiles grid 4 x 4)
-      (in window 1)
-    )
-  )
-)
 

Modified: trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe.html (258540 => 258541)


--- trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe.html	2020-03-17 05:22:41 UTC (rev 258540)
+++ trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe.html	2020-03-17 05:27:00 UTC (rev 258541)
@@ -63,11 +63,6 @@
     else
         testPassed("Scrollable div did not receive wheel events.");
 
-    if (window.internals) {
-        document.getElementById('layers').innerText = internals.layerTreeAsText(document,
-            internals.LAYER_TREE_INCLUDES_VISIBLE_RECTS | internals.LAYER_TREE_INCLUDES_TILE_CACHES);
-    }
-
     testRunner.notifyDone();
 }
 
@@ -175,7 +170,6 @@
 <script>
 description("Tests that a scrollable div doesn't consume wheel events when scroll is latched to main frame.");
 </script>
-<pre id="layers">Layer tree goes here</p>
 <script src=""
 </body>
 </html>

Modified: trunk/Source/WebCore/ChangeLog (258540 => 258541)


--- trunk/Source/WebCore/ChangeLog	2020-03-17 05:22:41 UTC (rev 258540)
+++ trunk/Source/WebCore/ChangeLog	2020-03-17 05:27:00 UTC (rev 258541)
@@ -1,5 +1,25 @@
 2020-03-16  Simon Fraser  <[email protected]>
 
+        Remove the zero-delay ScrollingCoordinatorMac commit timer
+        https://bugs.webkit.org/show_bug.cgi?id=209164
+
+        Reviewed by Zalan Bujtas.
+
+        The scrolling tree on macOS should just commit at rendering update time. There's no need
+        for a separate zero-delay timer.
+
+        Tested by existing tests.
+
+        * page/scrolling/mac/ScrollingCoordinatorMac.h:
+        * page/scrolling/mac/ScrollingCoordinatorMac.mm:
+        (WebCore::ScrollingCoordinatorMac::ScrollingCoordinatorMac):
+        (WebCore::ScrollingCoordinatorMac::pageDestroyed):
+        (WebCore::ScrollingCoordinatorMac::scheduleTreeStateCommit):
+        (WebCore::ScrollingCoordinatorMac::commitTreeStateIfNeeded):
+        (WebCore::ScrollingCoordinatorMac::commitTreeState): Deleted.
+
+2020-03-16  Simon Fraser  <[email protected]>
+
         Add a bit more UIHitTesting logging, and make it possible to dump EventRegions from WebKit
         https://bugs.webkit.org/show_bug.cgi?id=209058
 

Modified: trunk/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.h (258540 => 258541)


--- trunk/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.h	2020-03-17 05:22:41 UTC (rev 258540)
+++ trunk/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.h	2020-03-17 05:27:00 UTC (rev 258541)
@@ -38,19 +38,15 @@
 
     void pageDestroyed() override;
 
-    void commitTreeStateIfNeeded() override;
+    void commitTreeStateIfNeeded() final;
 
     // Handle the wheel event on the scrolling thread. Returns whether the event was handled or not.
     ScrollingEventResult handleWheelEvent(FrameView&, const PlatformWheelEvent&) override;
 
 private:
-    void scheduleTreeStateCommit() override;
+    void scheduleTreeStateCommit() final;
 
-    void commitTreeState();
-    
     void updateTiledScrollingIndicator();
-
-    Timer m_scrollingStateTreeCommitterTimer;
 };
 
 } // namespace WebCore

Modified: trunk/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm (258540 => 258541)


--- trunk/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm	2020-03-17 05:22:41 UTC (rev 258540)
+++ trunk/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm	2020-03-17 05:27:00 UTC (rev 258541)
@@ -53,7 +53,6 @@
 
 ScrollingCoordinatorMac::ScrollingCoordinatorMac(Page* page)
     : AsyncScrollingCoordinator(page)
-    , m_scrollingStateTreeCommitterTimer(*this, &ScrollingCoordinatorMac::commitTreeState)
 {
     setScrollingTree(ScrollingTreeMac::create(*this));
 }
@@ -67,8 +66,6 @@
 {
     AsyncScrollingCoordinator::pageDestroyed();
 
-    m_scrollingStateTreeCommitterTimer.stop();
-
     // Invalidating the scrolling tree will break the reference cycle between the ScrollingCoordinator and ScrollingTree objects.
     RefPtr<ThreadedScrollingTree> scrollingTree = static_pointer_cast<ThreadedScrollingTree>(releaseScrollingTree());
     ScrollingThread::dispatch([scrollingTree] {
@@ -76,12 +73,6 @@
     });
 }
 
-void ScrollingCoordinatorMac::commitTreeStateIfNeeded()
-{
-    commitTreeState();
-    m_scrollingStateTreeCommitterTimer.stop();
-}
-
 ScrollingEventResult ScrollingCoordinatorMac::handleWheelEvent(FrameView&, const PlatformWheelEvent& wheelEvent)
 {
     ASSERT(isMainThread());
@@ -99,16 +90,10 @@
 
 void ScrollingCoordinatorMac::scheduleTreeStateCommit()
 {
-    ASSERT(scrollingStateTree()->hasChangedProperties() || eventTrackingRegionsDirty());
-
-    if (m_scrollingStateTreeCommitterTimer.isActive())
-        return;
-
-    LOG(Scrolling, "ScrollingCoordinatorMac::scheduleTreeStateCommit");
-    m_scrollingStateTreeCommitterTimer.startOneShot(0_s);
+    m_page->scheduleRenderingUpdate();
 }
 
-void ScrollingCoordinatorMac::commitTreeState()
+void ScrollingCoordinatorMac::commitTreeStateIfNeeded()
 {
     willCommitTree();
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to