Test that scroller with overscroll-behavior-x doesn't allow swipe gestures to trigger navigation.
<rdar://problem/88518462>
Created attachment 453149 [details] wip
Created attachment 454525 [details] Patch
Comment on attachment 454525 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=454525&action=review > Source/WebCore/ChangeLog:3 > + Add test for swipe navigation with overscroll-behavior The title should be about the code change, not about adding the test. > Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.cpp:439 > + ScrollPropagationInfo propagation; > + if (horizontalOverscrollBehaviorPreventsPropagation() || verticalOverscrollBehaviorPreventsPropagation()) { > + if (horizontalOverscrollBehaviorPreventsPropagation() && !delta.height() && delta.width()) { > + propagation.shouldBlockScrollPropagation = true; > + propagation.isHandled = false; > + return propagation; > + } > + > + if ((horizontalOverscrollBehaviorPreventsPropagation() && verticalOverscrollBehaviorPreventsPropagation()) > + || (horizontalOverscrollBehaviorPreventsPropagation() && !delta.height()) > + || (verticalOverscrollBehaviorPreventsPropagation() && !delta.width())) { > + propagation.shouldBlockScrollPropagation = true; > + propagation.isHandled = true; > + } > + } > + return propagation; This is a little hard to follow. Maybe an early return if neither access prevents propagation? > Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.h:44 > + bool shouldBlockScrollPropagation = false; > + bool isHandled = false; Normally we use C++ initializer style: bool shouldBlockScrollPropagation { false }; > LayoutTests/scrollingcoordinator/mac/latching/horizontal-overflow-back-swipe-overscroll-behavior.html:56 > + eventSender.monitorWheelEvents(); > + eventSender.mouseMoveTo(x, y); > + eventSender.mouseScrollByWithWheelAndMomentumPhases(1, 0, "began", "none"); > + eventSender.mouseScrollByWithWheelAndMomentumPhases(10, 0, "changed", "none"); > + eventSender.mouseScrollByWithWheelAndMomentumPhases(10, 0, "changed", "none"); > + await UIHelper.animationFrame(); > + eventSender.mouseScrollByWithWheelAndMomentumPhases(10, 0, "changed", "none"); > + eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, "ended", "none"); > + return UIHelper.waitForScrollCompletion(); I prefer the await UIHelper.mouseWheelSequence(wheelEventSquence); technique; see if that works without the intermediate UIHelper.animationFrame().
Created attachment 455022 [details] Patch
Committed r291497 (248609@main): <https://commits.webkit.org/248609@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 455022 [details].