Title: [270156] trunk/Source
Revision
270156
Author
[email protected]
Date
2020-11-21 19:54:00 -0800 (Sat, 21 Nov 2020)

Log Message

Propagate the 'wheelEventGesturesBecomeNonBlocking' setting to the ScrollingTree
https://bugs.webkit.org/show_bug.cgi?id=219241

Reviewed by Tim Horton.

Propagate the 'wheelEventGesturesBecomeNonBlocking' setting to the ScrollingTree
via the ScrollingStateFrameScrollingNode, as we do for other settings.

Source/WebCore:

* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::setFrameScrollingNodeState):
(WebCore::AsyncScrollingCoordinator::wheelEventGesturesBecomeNonBlocking const):
* page/scrolling/AsyncScrollingCoordinator.h:
* page/scrolling/ScrollingStateFrameScrollingNode.cpp:
(WebCore::ScrollingStateFrameScrollingNode::ScrollingStateFrameScrollingNode):
(WebCore::ScrollingStateFrameScrollingNode::applicableProperties const):
(WebCore::ScrollingStateFrameScrollingNode::setWheelEventGesturesBecomeNonBlocking):
* page/scrolling/ScrollingStateFrameScrollingNode.h:
* page/scrolling/ScrollingStateNode.h:
* page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::commitTreeState):
(WebCore::ScrollingTree::setAsyncFrameOrOverflowScrollingEnabled): Deleted.
* page/scrolling/ScrollingTree.h:
(WebCore::ScrollingTree::setAsyncFrameOrOverflowScrollingEnabled):
(WebCore::ScrollingTree::wheelEventGesturesBecomeNonBlocking const):
(WebCore::ScrollingTree::setWheelEventGesturesBecomeNonBlocking):

Source/WebKit:

* Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
(ArgumentCoder<ScrollingStateFrameScrollingNode>::encode):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (270155 => 270156)


--- trunk/Source/WebCore/ChangeLog	2020-11-22 03:03:46 UTC (rev 270155)
+++ trunk/Source/WebCore/ChangeLog	2020-11-22 03:54:00 UTC (rev 270156)
@@ -1,3 +1,31 @@
+2020-11-21  Simon Fraser  <[email protected]>
+
+        Propagate the 'wheelEventGesturesBecomeNonBlocking' setting to the ScrollingTree
+        https://bugs.webkit.org/show_bug.cgi?id=219241
+
+        Reviewed by Tim Horton.
+
+        Propagate the 'wheelEventGesturesBecomeNonBlocking' setting to the ScrollingTree
+        via the ScrollingStateFrameScrollingNode, as we do for other settings.
+
+        * page/scrolling/AsyncScrollingCoordinator.cpp:
+        (WebCore::AsyncScrollingCoordinator::setFrameScrollingNodeState):
+        (WebCore::AsyncScrollingCoordinator::wheelEventGesturesBecomeNonBlocking const):
+        * page/scrolling/AsyncScrollingCoordinator.h:
+        * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
+        (WebCore::ScrollingStateFrameScrollingNode::ScrollingStateFrameScrollingNode):
+        (WebCore::ScrollingStateFrameScrollingNode::applicableProperties const):
+        (WebCore::ScrollingStateFrameScrollingNode::setWheelEventGesturesBecomeNonBlocking):
+        * page/scrolling/ScrollingStateFrameScrollingNode.h:
+        * page/scrolling/ScrollingStateNode.h:
+        * page/scrolling/ScrollingTree.cpp:
+        (WebCore::ScrollingTree::commitTreeState):
+        (WebCore::ScrollingTree::setAsyncFrameOrOverflowScrollingEnabled): Deleted.
+        * page/scrolling/ScrollingTree.h:
+        (WebCore::ScrollingTree::setAsyncFrameOrOverflowScrollingEnabled):
+        (WebCore::ScrollingTree::wheelEventGesturesBecomeNonBlocking const):
+        (WebCore::ScrollingTree::setWheelEventGesturesBecomeNonBlocking):
+
 2020-11-21  Chris Dumez  <[email protected]>
 
         Unreviewed, reverting r270141.

Modified: trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp (270155 => 270156)


--- trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp	2020-11-22 03:03:46 UTC (rev 270155)
+++ trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp	2020-11-22 03:54:00 UTC (rev 270156)
@@ -675,6 +675,7 @@
     frameScrollingNode.setTopContentInset(frameView.topContentInset());
     frameScrollingNode.setLayoutViewport(frameView.layoutViewportRect());
     frameScrollingNode.setAsyncFrameOrOverflowScrollingEnabled(asyncFrameOrOverflowScrollingEnabled());
+    frameScrollingNode.setWheelEventGesturesBecomeNonBlocking(wheelEventGesturesBecomeNonBlocking());
 
     frameScrollingNode.setMinLayoutViewportOrigin(frameView.minStableLayoutViewportOrigin());
     frameScrollingNode.setMaxLayoutViewportOrigin(frameView.maxStableLayoutViewportOrigin());
@@ -858,6 +859,12 @@
     return settings.asyncFrameScrollingEnabled() || settings.asyncOverflowScrollingEnabled();
 }
 
+bool AsyncScrollingCoordinator::wheelEventGesturesBecomeNonBlocking() const
+{
+    auto& settings = m_page->mainFrame().settings();
+    return settings.wheelEventGesturesBecomeNonBlocking();
+}
+
 ScrollingNodeID AsyncScrollingCoordinator::scrollableContainerNodeID(const RenderObject& renderer) const
 {
     if (auto overflowScrollingNodeID = renderer.view().compositor().asyncScrollableContainerNodeID(renderer))

Modified: trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.h (270155 => 270156)


--- trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.h	2020-11-22 03:03:46 UTC (rev 270155)
+++ trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.h	2020-11-22 03:54:00 UTC (rev 270156)
@@ -97,6 +97,7 @@
     bool hasVisibleSlowRepaintViewportConstrainedObjects(const FrameView&) const override { return false; }
     
     bool asyncFrameOrOverflowScrollingEnabled() const;
+    bool wheelEventGesturesBecomeNonBlocking() const;
 
     WEBCORE_EXPORT ScrollingNodeID scrollableContainerNodeID(const RenderObject&) const override;
 

Modified: trunk/Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.cpp (270155 => 270156)


--- trunk/Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.cpp	2020-11-22 03:03:46 UTC (rev 270155)
+++ trunk/Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.cpp	2020-11-22 03:54:00 UTC (rev 270156)
@@ -59,6 +59,7 @@
     , m_fixedElementsLayoutRelativeToFrame(stateNode.fixedElementsLayoutRelativeToFrame())
     , m_visualViewportIsSmallerThanLayoutViewport(stateNode.visualViewportIsSmallerThanLayoutViewport())
     , m_asyncFrameOrOverflowScrollingEnabled(stateNode.asyncFrameOrOverflowScrollingEnabled())
+    , m_wheelEventGesturesBecomeNonBlocking(stateNode.wheelEventGesturesBecomeNonBlocking())
 {
     if (hasChangedProperty(Property::RootContentsLayer))
         setRootContentsLayer(stateNode.rootContentsLayer().toRepresentation(adoptiveTree.preferredLayerRepresentation()));
@@ -104,6 +105,7 @@
         Property::FixedElementsLayoutRelativeToFrame,
         Property::VisualViewportIsSmallerThanLayoutViewport,
         Property::AsyncFrameOrOverflowScrollingEnabled,
+        Property::WheelEventGesturesBecomeNonBlocking,
         Property::LayoutViewport,
         Property::MinLayoutViewportOrigin,
         Property::MaxLayoutViewportOrigin,
@@ -287,6 +289,15 @@
     setPropertyChanged(Property::AsyncFrameOrOverflowScrollingEnabled);
 }
 
+void ScrollingStateFrameScrollingNode::setWheelEventGesturesBecomeNonBlocking(bool enabled)
+{
+    if (enabled == m_wheelEventGesturesBecomeNonBlocking)
+        return;
+    
+    m_wheelEventGesturesBecomeNonBlocking = enabled;
+    setPropertyChanged(Property::WheelEventGesturesBecomeNonBlocking);
+}
+
 void ScrollingStateFrameScrollingNode::dumpProperties(TextStream& ts, ScrollingStateTreeAsTextBehavior behavior) const
 {
     ts << "Frame scrolling node";

Modified: trunk/Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.h (270155 => 270156)


--- trunk/Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.h	2020-11-22 03:03:46 UTC (rev 270155)
+++ trunk/Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.h	2020-11-22 03:54:00 UTC (rev 270156)
@@ -111,6 +111,9 @@
     bool asyncFrameOrOverflowScrollingEnabled() const { return m_asyncFrameOrOverflowScrollingEnabled; }
     void setAsyncFrameOrOverflowScrollingEnabled(bool);
 
+    bool wheelEventGesturesBecomeNonBlocking() const { return m_wheelEventGesturesBecomeNonBlocking; }
+    WEBCORE_EXPORT void setWheelEventGesturesBecomeNonBlocking(bool);
+
     void dumpProperties(WTF::TextStream&, ScrollingStateTreeAsTextBehavior) const override;
 
 private:
@@ -141,6 +144,7 @@
     bool m_fixedElementsLayoutRelativeToFrame { false };
     bool m_visualViewportIsSmallerThanLayoutViewport { false };
     bool m_asyncFrameOrOverflowScrollingEnabled { false };
+    bool m_wheelEventGesturesBecomeNonBlocking { false };
 };
 
 } // namespace WebCore

Modified: trunk/Source/WebCore/page/scrolling/ScrollingStateNode.h (270155 => 270156)


--- trunk/Source/WebCore/page/scrolling/ScrollingStateNode.h	2020-11-22 03:03:46 UTC (rev 270155)
+++ trunk/Source/WebCore/page/scrolling/ScrollingStateNode.h	2020-11-22 03:54:00 UTC (rev 270156)
@@ -258,17 +258,18 @@
         FixedElementsLayoutRelativeToFrame          = 1LLU << 34,
         VisualViewportIsSmallerThanLayoutViewport   = 1LLU << 35,
         AsyncFrameOrOverflowScrollingEnabled        = 1LLU << 36,
-        LayoutViewport                              = 1LLU << 37,
-        MinLayoutViewportOrigin                     = 1LLU << 38,
-        MaxLayoutViewportOrigin                     = 1LLU << 39,
-        OverrideVisualViewportSize                  = 1LLU << 40,
+        WheelEventGesturesBecomeNonBlocking         = 1LLU << 37,
+        LayoutViewport                              = 1LLU << 38,
+        MinLayoutViewportOrigin                     = 1LLU << 39,
+        MaxLayoutViewportOrigin                     = 1LLU << 40,
+        OverrideVisualViewportSize                  = 1LLU << 41,
         // ScrollingStatePositionedNode
-        RelatedOverflowScrollingNodes               = 1LLU << 41,
-        LayoutConstraintData                        = 1LLU << 42,
+        RelatedOverflowScrollingNodes               = 1LLU << 42,
+        LayoutConstraintData                        = 1LLU << 43,
         // ScrollingStateFixedNode, ScrollingStateStickyNode
-        ViewportConstraints                         = 1LLU << 43,
+        ViewportConstraints                         = 1LLU << 44,
         // ScrollingStateOverflowScrollProxyNode
-        OverflowScrollingNode                       = 1LLU << 44,
+        OverflowScrollingNode                       = 1LLU << 45,
     };
     
     bool hasChangedProperties() const { return !m_changedProperties.isEmpty(); }

Modified: trunk/Source/WebCore/page/scrolling/ScrollingTree.cpp (270155 => 270156)


--- trunk/Source/WebCore/page/scrolling/ScrollingTree.cpp	2020-11-22 03:03:46 UTC (rev 270155)
+++ trunk/Source/WebCore/page/scrolling/ScrollingTree.cpp	2020-11-22 03:54:00 UTC (rev 270156)
@@ -265,6 +265,7 @@
             || rootNode->hasChangedProperty(ScrollingStateNode::Property::EventTrackingRegion)
             || rootNode->hasChangedProperty(ScrollingStateNode::Property::ScrolledContentsLayer)
             || rootNode->hasChangedProperty(ScrollingStateNode::Property::AsyncFrameOrOverflowScrollingEnabled)
+            || rootNode->hasChangedProperty(ScrollingStateNode::Property::WheelEventGesturesBecomeNonBlocking)
             || rootNode->hasChangedProperty(ScrollingStateNode::Property::IsMonitoringWheelEvents))) {
         LockHolder lock(m_treeStateMutex);
 
@@ -277,6 +278,9 @@
         if (rootStateNodeChanged || rootNode->hasChangedProperty(ScrollingStateNode::Property::AsyncFrameOrOverflowScrollingEnabled))
             m_asyncFrameOrOverflowScrollingEnabled = scrollingStateTree->rootStateNode()->asyncFrameOrOverflowScrollingEnabled();
 
+        if (rootStateNodeChanged || rootNode->hasChangedProperty(ScrollingStateNode::Property::WheelEventGesturesBecomeNonBlocking))
+            m_wheelEventGesturesBecomeNonBlocking = scrollingStateTree->rootStateNode()->wheelEventGesturesBecomeNonBlocking();
+
         if (rootStateNodeChanged || rootNode->hasChangedProperty(ScrollingStateNode::Property::IsMonitoringWheelEvents))
             m_isMonitoringWheelEvents = scrollingStateTree->rootStateNode()->isMonitoringWheelEvents();
     }
@@ -466,11 +470,6 @@
     m_latchingController.clearLatchedNode();
 }
 
-void ScrollingTree::setAsyncFrameOrOverflowScrollingEnabled(bool enabled)
-{
-    m_asyncFrameOrOverflowScrollingEnabled = enabled;
-}
-
 FloatPoint ScrollingTree::mainFrameScrollPosition() const
 {
     ASSERT(m_treeStateMutex.isLocked());

Modified: trunk/Source/WebCore/page/scrolling/ScrollingTree.h (270155 => 270156)


--- trunk/Source/WebCore/page/scrolling/ScrollingTree.h	2020-11-22 03:03:46 UTC (rev 270155)
+++ trunk/Source/WebCore/page/scrolling/ScrollingTree.h	2020-11-22 03:54:00 UTC (rev 270156)
@@ -89,8 +89,11 @@
 
     // This implies that we'll do hit-testing in the scrolling tree.
     bool asyncFrameOrOverflowScrollingEnabled() const { return m_asyncFrameOrOverflowScrollingEnabled; }
-    void setAsyncFrameOrOverflowScrollingEnabled(bool);
+    void setAsyncFrameOrOverflowScrollingEnabled(bool value) { m_asyncFrameOrOverflowScrollingEnabled = value; }
 
+    bool wheelEventGesturesBecomeNonBlocking() const { return m_wheelEventGesturesBecomeNonBlocking; }
+    void setWheelEventGesturesBecomeNonBlocking(bool value) { m_wheelEventGesturesBecomeNonBlocking = value; }
+
     WEBCORE_EXPORT OptionSet<WheelEventProcessingSteps> determineWheelEventProcessing(const PlatformWheelEvent&);
     WEBCORE_EXPORT virtual WheelEventHandlingResult handleWheelEvent(const PlatformWheelEvent&, OptionSet<WheelEventProcessingSteps> = { });
 
@@ -317,6 +320,7 @@
     bool m_isMonitoringWheelEvents { false };
     bool m_scrollingPerformanceLoggingEnabled { false };
     bool m_asyncFrameOrOverflowScrollingEnabled { false };
+    bool m_wheelEventGesturesBecomeNonBlocking { false };
     bool m_needsApplyLayerPositionsAfterCommit { false };
     bool m_inCommitTreeState { false };
 };

Modified: trunk/Source/WebKit/ChangeLog (270155 => 270156)


--- trunk/Source/WebKit/ChangeLog	2020-11-22 03:03:46 UTC (rev 270155)
+++ trunk/Source/WebKit/ChangeLog	2020-11-22 03:54:00 UTC (rev 270156)
@@ -1,5 +1,18 @@
 2020-11-21  Simon Fraser  <[email protected]>
 
+        Propagate the 'wheelEventGesturesBecomeNonBlocking' setting to the ScrollingTree
+        https://bugs.webkit.org/show_bug.cgi?id=219241
+
+        Reviewed by Tim Horton.
+
+        Propagate the 'wheelEventGesturesBecomeNonBlocking' setting to the ScrollingTree
+        via the ScrollingStateFrameScrollingNode, as we do for other settings.
+
+        * Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
+        (ArgumentCoder<ScrollingStateFrameScrollingNode>::encode):
+
+2020-11-21  Simon Fraser  <[email protected]>
+
         Add an Experimental Features for wheel event gestures becoming non-blocking
         https://bugs.webkit.org/show_bug.cgi?id=219236
 

Modified: trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp (270155 => 270156)


--- trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp	2020-11-22 03:03:46 UTC (rev 270155)
+++ trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp	2020-11-22 03:54:00 UTC (rev 270156)
@@ -142,6 +142,7 @@
         WebCore::ScrollingStateNode::Property::FixedElementsLayoutRelativeToFrame,
         WebCore::ScrollingStateNode::Property::VisualViewportIsSmallerThanLayoutViewport,
         WebCore::ScrollingStateNode::Property::AsyncFrameOrOverflowScrollingEnabled,
+        WebCore::ScrollingStateNode::Property::WheelEventGesturesBecomeNonBlocking,
         WebCore::ScrollingStateNode::Property::LayoutViewport,
         WebCore::ScrollingStateNode::Property::MinLayoutViewportOrigin,
         WebCore::ScrollingStateNode::Property::MaxLayoutViewportOrigin,
@@ -241,6 +242,7 @@
     SCROLLING_NODE_ENCODE(ScrollingStateNode::Property::FixedElementsLayoutRelativeToFrame, fixedElementsLayoutRelativeToFrame)
     SCROLLING_NODE_ENCODE(ScrollingStateNode::Property::VisualViewportIsSmallerThanLayoutViewport, visualViewportIsSmallerThanLayoutViewport)
     // AsyncFrameOrOverflowScrollingEnabled is not relevant for UI-side compositing.
+    SCROLLING_NODE_ENCODE(ScrollingStateNode::Property::WheelEventGesturesBecomeNonBlocking, wheelEventGesturesBecomeNonBlocking)
     SCROLLING_NODE_ENCODE(ScrollingStateNode::Property::LayoutViewport, layoutViewport)
     SCROLLING_NODE_ENCODE(ScrollingStateNode::Property::MinLayoutViewportOrigin, minLayoutViewportOrigin)
     SCROLLING_NODE_ENCODE(ScrollingStateNode::Property::MaxLayoutViewportOrigin, maxLayoutViewportOrigin)
@@ -357,6 +359,8 @@
     SCROLLING_NODE_DECODE(ScrollingStateNode::Property::TopContentInset, float, setTopContentInset);
     SCROLLING_NODE_DECODE(ScrollingStateNode::Property::FixedElementsLayoutRelativeToFrame, bool, setFixedElementsLayoutRelativeToFrame);
     SCROLLING_NODE_DECODE(ScrollingStateNode::Property::VisualViewportIsSmallerThanLayoutViewport, bool, setVisualViewportIsSmallerThanLayoutViewport);
+    // AsyncFrameOrOverflowScrollingEnabled is not encoded.
+    SCROLLING_NODE_DECODE(ScrollingStateNode::Property::WheelEventGesturesBecomeNonBlocking, bool, setWheelEventGesturesBecomeNonBlocking)
     SCROLLING_NODE_DECODE(ScrollingStateNode::Property::LayoutViewport, FloatRect, setLayoutViewport)
     SCROLLING_NODE_DECODE(ScrollingStateNode::Property::MinLayoutViewportOrigin, FloatPoint, setMinLayoutViewportOrigin)
     SCROLLING_NODE_DECODE(ScrollingStateNode::Property::MaxLayoutViewportOrigin, FloatPoint, setMaxLayoutViewportOrigin)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to