Changeset 271072 in webkit
- Timestamp:
- Dec 23, 2020, 10:51:36 AM (4 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r271070 r271072 1 2020-12-23 Simon Fraser <simon.fraser@apple.com> 2 3 REGRESSION: Scroll snapping triggers body scroll 4 https://bugs.webkit.org/show_bug.cgi?id=220056 5 6 Reviewed by Wenson Hsieh. 7 8 * fast/scrolling/latching/scroll-snap-latching-expected.txt: Added. 9 * fast/scrolling/latching/scroll-snap-latching.html: Added. 10 * platform/mac-wk1/fast/scrolling/latching/scroll-snap-latching-expected.txt: Added. 11 1 12 2020-12-23 Simon Fraser <simon.fraser@apple.com> 2 13 -
trunk/Source/WebCore/ChangeLog
r271070 r271072 1 2020-12-23 Simon Fraser <simon.fraser@apple.com> 2 3 REGRESSION: Scroll snapping triggers body scroll 4 https://bugs.webkit.org/show_bug.cgi?id=220056 5 <rdar://problem/72595482> 6 7 Reviewed by Wenson Hsieh. 8 9 ScrollController::handleWheelEvent() needs to return true to indicate that it 10 handled the event when it has been processed for scroll snap. If we don't do this, 11 the latching code thinks that no node handled the event so the latch times out. 12 13 Test: fast/scrolling/latching/scroll-snap-latching.html 14 15 * platform/cocoa/ScrollController.h: 16 * platform/cocoa/ScrollController.mm: 17 (WebCore::ScrollController::handleWheelEvent): 18 1 19 2020-12-23 Simon Fraser <simon.fraser@apple.com> 2 20 -
trunk/Source/WebCore/platform/cocoa/ScrollController.h
r271070 r271072 140 140 141 141 #if PLATFORM(MAC) 142 // Returns true if handled. 142 143 bool handleWheelEvent(const PlatformWheelEvent&); 143 144 #endif … … 168 169 float adjustScrollDestinationForDirectionalSnapping(ScrollEventAxis, float destination, float velocity, float originalPosition); 169 170 #if PLATFORM(MAC) 171 // Returns true if handled. 170 172 bool processWheelEventForScrollSnap(const PlatformWheelEvent&); 171 173 #endif -
trunk/Source/WebCore/platform/cocoa/ScrollController.mm
r271070 r271072 122 122 #if ENABLE(CSS_SCROLL_SNAP) 123 123 if (processWheelEventForScrollSnap(wheelEvent)) 124 return false; // FIXME: Why don't we report that we handled it?124 return true; 125 125 #endif 126 126 if (wheelEvent.phase() == PlatformWheelEventPhase::MayBegin || wheelEvent.phase() == PlatformWheelEventPhase::Cancelled)
Note:
See TracChangeset
for help on using the changeset viewer.