Title: [261616] trunk/Source/WebKit
Revision
261616
Author
[email protected]
Date
2020-05-13 07:42:45 -0700 (Wed, 13 May 2020)

Log Message

REGRESSION(r260571): RequestedScrollPosition doesn't have its scroll change applied to layers anymore
https://bugs.webkit.org/show_bug.cgi?id=211374

Reviewed by Carlos Garcia Campos.

Use WebPage::finalizeRenderingUpdate() to perform the compositing state flush
and the scrolling tree layer positioning, instead of doing things half-baked
by manually invoking the FrameView method.

Additional WebPage calls (updateRendering(), flushPendingEditorStateUpdate())
are moved into CompositingCoordinator::flushPendingLayerChanges() from the
LayerTreeHost::layerFlushTimerFired() method for consistency. The additional
CompositingCoordinator::syncDisplayState() method call is removed -- this call
triggered any necessary layout, but that's already done through WebPage::updateRendering().

CompositingCoordinator::flushPendingLayerChanges() doesn't rely on the
FrameView flush return value since that's not available anymore -- instead,
true is returned always.

* WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
(WebKit::CompositingCoordinator::flushPendingLayerChanges):
* WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp:
(WebKit::LayerTreeHost::layerFlushTimerFired):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (261615 => 261616)


--- trunk/Source/WebKit/ChangeLog	2020-05-13 14:30:36 UTC (rev 261615)
+++ trunk/Source/WebKit/ChangeLog	2020-05-13 14:42:45 UTC (rev 261616)
@@ -1,3 +1,29 @@
+2020-05-13  Zan Dobersek  <[email protected]>
+
+        REGRESSION(r260571): RequestedScrollPosition doesn't have its scroll change applied to layers anymore
+        https://bugs.webkit.org/show_bug.cgi?id=211374
+
+        Reviewed by Carlos Garcia Campos.
+
+        Use WebPage::finalizeRenderingUpdate() to perform the compositing state flush
+        and the scrolling tree layer positioning, instead of doing things half-baked
+        by manually invoking the FrameView method.
+
+        Additional WebPage calls (updateRendering(), flushPendingEditorStateUpdate())
+        are moved into CompositingCoordinator::flushPendingLayerChanges() from the
+        LayerTreeHost::layerFlushTimerFired() method for consistency. The additional
+        CompositingCoordinator::syncDisplayState() method call is removed -- this call
+        triggered any necessary layout, but that's already done through WebPage::updateRendering().
+
+        CompositingCoordinator::flushPendingLayerChanges() doesn't rely on the
+        FrameView flush return value since that's not available anymore -- instead,
+        true is returned always.
+
+        * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
+        (WebKit::CompositingCoordinator::flushPendingLayerChanges):
+        * WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp:
+        (WebKit::LayerTreeHost::layerFlushTimerFired):
+
 2020-05-13  Per Arne Vollan  <[email protected]>
 
         Unreviewed compile fix after r261584.

Modified: trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp (261615 => 261616)


--- trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp	2020-05-13 14:30:36 UTC (rev 261615)
+++ trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp	2020-05-13 14:42:45 UTC (rev 261616)
@@ -121,6 +121,9 @@
 
     initializeRootCompositingLayerIfNeeded();
 
+    m_page.updateRendering();
+    m_page.flushPendingEditorStateUpdate();
+
     m_rootLayer->flushCompositingStateForThisLayerOnly();
     m_client.didFlushRootLayer(m_visibleContentsRect);
 
@@ -127,7 +130,7 @@
     if (m_overlayCompositingLayer)
         m_overlayCompositingLayer->flushCompositingState(FloatRect(FloatPoint(), m_rootLayer->size()));
 
-    bool didSync = m_page.corePage()->mainFrame().view()->flushCompositingStateIncludingSubframes();
+    m_page.finalizeRenderingUpdate({ FinalizeRenderingUpdateFlags::ApplyScrollingTreeLayerPositions });
 
     auto& coordinatedLayer = downcast<CoordinatedGraphicsLayer>(*m_rootLayer);
     coordinatedLayer.updateContentBuffersIncludingSubLayers();
@@ -134,8 +137,6 @@
     coordinatedLayer.syncPendingStateChangesIncludingSubLayers();
 
     if (m_shouldSyncFrame) {
-        didSync = true;
-
         m_state.nicosia.scene->accessState(
             [this](Nicosia::Scene::State& state)
             {
@@ -172,7 +173,7 @@
         m_shouldSyncFrame = false;
     }
 
-    return didSync;
+    return true;
 }
 
 double CompositingCoordinator::timestamp() const

Modified: trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp (261615 => 261616)


--- trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp	2020-05-13 14:30:36 UTC (rev 261615)
+++ trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp	2020-05-13 14:42:45 UTC (rev 261616)
@@ -136,10 +136,6 @@
     if (m_isSuspended || m_isWaitingForRenderer)
         return;
 
-    m_coordinator.syncDisplayState();
-    m_webPage.updateRendering();
-    m_webPage.flushPendingEditorStateUpdate();
-
     if (!m_coordinator.rootCompositingLayer())
         return;
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to