Title: [184482] branches/safari-601.1.32-branch/Source/WebCore

Diff

Modified: branches/safari-601.1.32-branch/Source/WebCore/ChangeLog (184481 => 184482)


--- branches/safari-601.1.32-branch/Source/WebCore/ChangeLog	2015-05-18 14:23:14 UTC (rev 184481)
+++ branches/safari-601.1.32-branch/Source/WebCore/ChangeLog	2015-05-18 14:23:24 UTC (rev 184482)
@@ -1,5 +1,30 @@
 2015-05-18  Matthew Hanson  <[email protected]>
 
+        Merge r184296. rdar://problem/20100706
+
+    2015-05-13  Brent Fulgham  <[email protected]>
+
+            Scrollbars in overflow regions are not vanishing after scrolling with scroll snap points
+            https://bugs.webkit.org/show_bug.cgi?id=142521
+            <rdar://problem/20100706>
+
+            Reviewed by Darin Adler.
+
+            The scrollbars were not being dismissed because they were not being notified that the wheel
+            gesture was finished. This was happening because the wheel event 'ended' state has zero
+            deltaX and deltaY. If the region did not allow stretching, it would exit early, never passing
+            through the 'handleWheelEventPhase' code that would notify the scrollbar controller that
+            the gesture had ended.
+
+            * platform/ScrollableArea.cpp:
+            (WebCore::ScrollableArea::mouseExitedContentArea): The wrong ScrollAnimator method was being
+            called when the mouse exited the content area.
+            * platform/mac/ScrollAnimatorMac.mm:
+            (WebCore::ScrollAnimatorMac::handleWheelEvent): Do not early return when the wheel event has
+            no change in X or Y coordinate.
+
+2015-05-18  Matthew Hanson  <[email protected]>
+
         Merge r184290. rdar://problem/19790341
 
     2015-05-13  Timothy Horton  <[email protected]>

Modified: branches/safari-601.1.32-branch/Source/WebCore/platform/ScrollableArea.cpp (184481 => 184482)


--- branches/safari-601.1.32-branch/Source/WebCore/platform/ScrollableArea.cpp	2015-05-18 14:23:14 UTC (rev 184481)
+++ branches/safari-601.1.32-branch/Source/WebCore/platform/ScrollableArea.cpp	2015-05-18 14:23:24 UTC (rev 184482)
@@ -253,7 +253,7 @@
 void ScrollableArea::mouseExitedContentArea() const
 {
     if (ScrollAnimator* scrollAnimator = existingScrollAnimator())
-        scrollAnimator->mouseEnteredContentArea();
+        scrollAnimator->mouseExitedContentArea();
 }
 
 void ScrollableArea::mouseMovedInContentArea() const

Modified: branches/safari-601.1.32-branch/Source/WebCore/platform/mac/ScrollAnimatorMac.mm (184481 => 184482)


--- branches/safari-601.1.32-branch/Source/WebCore/platform/mac/ScrollAnimatorMac.mm	2015-05-18 14:23:14 UTC (rev 184481)
+++ branches/safari-601.1.32-branch/Source/WebCore/platform/mac/ScrollAnimatorMac.mm	2015-05-18 14:23:24 UTC (rev 184482)
@@ -1091,16 +1091,18 @@
     if (!wheelEvent.hasPreciseScrollingDeltas() || !rubberBandingEnabledForSystem())
         return ScrollAnimator::handleWheelEvent(wheelEvent);
 
-    // FIXME: This is somewhat roundabout hack to allow forwarding wheel events
-    // up to the parent scrollable area. It takes advantage of the fact that
-    // the base class implementation of handleWheelEvent will not accept the
-    // wheel event if there is nowhere to scroll.
-    if (fabsf(wheelEvent.deltaY()) >= fabsf(wheelEvent.deltaX())) {
-        if (!allowsVerticalStretching(wheelEvent))
-            return ScrollAnimator::handleWheelEvent(wheelEvent);
-    } else {
-        if (!allowsHorizontalStretching(wheelEvent))
-            return ScrollAnimator::handleWheelEvent(wheelEvent);
+    if (wheelEvent.deltaX() || wheelEvent.deltaY()) {
+        // FIXME: This is somewhat roundabout hack to allow forwarding wheel events
+        // up to the parent scrollable area. It takes advantage of the fact that
+        // the base class implementation of handleWheelEvent will not accept the
+        // wheel event if there is nowhere to scroll.
+        if (fabsf(wheelEvent.deltaY()) >= fabsf(wheelEvent.deltaX())) {
+            if (!allowsVerticalStretching(wheelEvent))
+                return ScrollAnimator::handleWheelEvent(wheelEvent);
+        } else {
+            if (!allowsHorizontalStretching(wheelEvent))
+                return ScrollAnimator::handleWheelEvent(wheelEvent);
+        }
     }
 
     bool didHandleEvent = m_scrollController.handleWheelEvent(wheelEvent);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to