Title: [265545] trunk/Source/WebCore
Revision
265545
Author
[email protected]
Date
2020-08-12 03:38:20 -0700 (Wed, 12 Aug 2020)

Log Message

REGRESSION (r259805): Not able to scroll vertically after scrolling horizontally without leaving message and coming back
https://bugs.webkit.org/show_bug.cgi?id=215374
<rdar://problem/65269837>

Reviewed by Darin Adler.

The content has a horizontally scrolling overflow. While rubberbanding it we mark a wheel event unhandled which causes Mail
to take over event handling and leaves us semi-permanently in stretched state.

* platform/cocoa/ScrollController.mm:
(WebCore::ScrollController::handleWheelEvent):

Dissallowed vertical stretch would mark the event unhandled even though we are rubberbanding in horizontal direction.

Only mark a wheel event unhandled if it actually concerns the tested direction.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (265544 => 265545)


--- trunk/Source/WebCore/ChangeLog	2020-08-12 09:08:56 UTC (rev 265544)
+++ trunk/Source/WebCore/ChangeLog	2020-08-12 10:38:20 UTC (rev 265545)
@@ -1,3 +1,21 @@
+2020-08-12  Antti Koivisto  <[email protected]>
+
+        REGRESSION (r259805): Not able to scroll vertically after scrolling horizontally without leaving message and coming back
+        https://bugs.webkit.org/show_bug.cgi?id=215374
+        <rdar://problem/65269837>
+
+        Reviewed by Darin Adler.
+
+        The content has a horizontally scrolling overflow. While rubberbanding it we mark a wheel event unhandled which causes Mail
+        to take over event handling and leaves us semi-permanently in stretched state.
+
+        * platform/cocoa/ScrollController.mm:
+        (WebCore::ScrollController::handleWheelEvent):
+
+        Dissallowed vertical stretch would mark the event unhandled even though we are rubberbanding in horizontal direction.
+
+        Only mark a wheel event unhandled if it actually concerns the tested direction.
+
 2020-08-12  Chris Lord  <[email protected]>
 
         Implement Canvas.transferControlToOffscreen and OffscreenCanvasRenderingContext2D.commit

Modified: trunk/Source/WebCore/platform/cocoa/ScrollController.mm (265544 => 265545)


--- trunk/Source/WebCore/platform/cocoa/ScrollController.mm	2020-08-12 09:08:56 UTC (rev 265544)
+++ trunk/Source/WebCore/platform/cocoa/ScrollController.mm	2020-08-12 10:38:20 UTC (rev 265545)
@@ -266,26 +266,30 @@
                 m_client.immediateScrollBy(FloatSize(deltaX, 0));
             }
         } else {
-            if (!m_client.allowsHorizontalStretching(wheelEvent)) {
-                deltaX = 0;
-                eventCoalescedDeltaX = 0;
-                handled = false;
-            } else if (deltaX && !isHorizontallyStretched && !m_client.pinnedInDirection(FloatSize(deltaX, 0))) {
-                deltaX *= scrollWheelMultiplier();
+            if (deltaX) {
+                if (!m_client.allowsHorizontalStretching(wheelEvent)) {
+                    deltaX = 0;
+                    eventCoalescedDeltaX = 0;
+                    handled = false;
+                } else if (!isHorizontallyStretched && !m_client.pinnedInDirection(FloatSize(deltaX, 0))) {
+                    deltaX *= scrollWheelMultiplier();
 
-                m_client.immediateScrollByWithoutContentEdgeConstraints(FloatSize(deltaX, 0));
-                deltaX = 0;
+                    m_client.immediateScrollByWithoutContentEdgeConstraints(FloatSize(deltaX, 0));
+                    deltaX = 0;
+                }
             }
 
-            if (!m_client.allowsVerticalStretching(wheelEvent)) {
-                deltaY = 0;
-                eventCoalescedDeltaY = 0;
-                handled = false;
-            } else if (deltaY && !isVerticallyStretched && !m_client.pinnedInDirection(FloatSize(0, deltaY))) {
-                deltaY *= scrollWheelMultiplier();
+            if (deltaY) {
+                if (!m_client.allowsVerticalStretching(wheelEvent)) {
+                    deltaY = 0;
+                    eventCoalescedDeltaY = 0;
+                    handled = false;
+                } else if (!isVerticallyStretched && !m_client.pinnedInDirection(FloatSize(0, deltaY))) {
+                    deltaY *= scrollWheelMultiplier();
 
-                m_client.immediateScrollByWithoutContentEdgeConstraints(FloatSize(0, deltaY));
-                deltaY = 0;
+                    m_client.immediateScrollByWithoutContentEdgeConstraints(FloatSize(0, deltaY));
+                    deltaY = 0;
+                }
             }
 
             IntSize stretchAmount = m_client.stretchAmount();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to