Changeset 245134 in webkit
- Timestamp:
- May 9, 2019 7:16:44 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r245126 r245134 1 2019-05-09 Antoine Quint <graouts@apple.com> 2 3 pointerevents/ios/touch-action-none-in-overflow-scrolling-touch.html is a timeout 4 https://bugs.webkit.org/show_bug.cgi?id=197738 5 <rdar://problem/50588613> 6 7 Reviewed by Antti Koivisto. 8 9 To pass, this test must also disable the legacy "-webkit-overflow-scrolling: touch" behavior. 10 11 * pointerevents/ios/touch-action-none-in-overflow-scrolling-touch.html: 12 1 13 2019-05-09 Antti Koivisto <antti@apple.com> 2 14 -
trunk/LayoutTests/pointerevents/ios/touch-action-none-in-overflow-scrolling-touch.html
r243347 r245134 1 <!DOCTYPE html> <!-- webkit-test-runner [ internal:AsyncOverflowScrollingEnabled=true ] -->1 <!DOCTYPE html> <!-- webkit-test-runner [ internal:AsyncOverflowScrollingEnabled=true internal:LegacyOverflowScrollingTouchEnabled=false ] --> 2 2 <html> 3 3 <head> -
trunk/Source/WebKit/ChangeLog
r245112 r245134 1 2019-05-09 Antoine Quint <graouts@apple.com> 2 3 pointerevents/ios/touch-action-none-in-overflow-scrolling-touch.html is a timeout 4 https://bugs.webkit.org/show_bug.cgi?id=197738 5 <rdar://problem/50588613> 6 7 Reviewed by Antti Koivisto. 8 9 We clear the touch actions for a given touch identifier when the matching touch is released in -[WKContentViewInteraction _handleTouchActionsForTouchEvent:]. 10 This happens before -[WKScrollingNodeScrollViewDelegate scrollViewWillEndDragging:withVelocity:targetContentOffset:] is called and thus, which we correctly 11 respected the touch actions during the panning gesture, we would not be able to respect them during the deceleration animation. This caused the test to fail 12 because it would check that no scrolling happened after the panning gesture completed, ie. during the deceleration animation. 13 14 To work around this, we now store the touch actions for a given UIScrollView interaction in the ScrollingTreeScrollingNodeDelegateIOS object when the interaction 15 starts. 16 17 * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.h: 18 (WebKit::ScrollingTreeScrollingNodeDelegateIOS::activeTouchActions const): 19 (WebKit::ScrollingTreeScrollingNodeDelegateIOS::clearActiveTouchActions): 20 * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm: 21 (-[WKScrollingNodeScrollViewDelegate scrollViewWillEndDragging:withVelocity:targetContentOffset:]): 22 (-[WKScrollingNodeScrollViewDelegate _scrollView:adjustedOffsetForOffset:translation:startPoint:locationInView:horizontalVelocity:verticalVelocity:]): 23 (WebKit::ScrollingTreeScrollingNodeDelegateIOS::computeActiveTouchActionsForGestureRecognizer): 24 (WebKit::ScrollingTreeScrollingNodeDelegateIOS::activeTouchActionsForGestureRecognizer const): Deleted. 25 1 26 2019-05-08 Antoine Quint <graouts@apple.com> 2 27 -
trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.h
r245112 r245134 67 67 68 68 #if ENABLE(POINTER_EVENTS) 69 OptionSet<TouchAction> activeTouchActionsForGestureRecognizer(UIGestureRecognizer*) const; 69 OptionSet<TouchAction> activeTouchActions() const { return m_activeTouchActions; } 70 void computeActiveTouchActionsForGestureRecognizer(UIGestureRecognizer*); 71 void clearActiveTouchActions() { m_activeTouchActions = { }; } 70 72 void cancelPointersForGestureRecognizer(UIGestureRecognizer*); 71 73 #endif … … 75 77 RetainPtr<CALayer> m_scrolledContentsLayer; 76 78 RetainPtr<WKScrollingNodeScrollViewDelegate> m_scrollViewDelegate; 79 #if ENABLE(POINTER_EVENTS) 80 OptionSet<TouchAction> m_activeTouchActions { }; 81 #endif 77 82 bool m_updatingFromStateNode { false }; 78 83 }; -
trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm
r245112 r245134 80 80 #if ENABLE(POINTER_EVENTS) 81 81 if (![scrollView isZooming]) { 82 auto touchActions = _scrollingTreeNodeDelegate->activeTouchActionsForGestureRecognizer(scrollView.panGestureRecognizer); 82 auto touchActions = _scrollingTreeNodeDelegate->activeTouchActions(); 83 _scrollingTreeNodeDelegate->clearActiveTouchActions(); 84 83 85 if (touchActions && !touchActions.containsAny({ WebCore::TouchAction::Auto, WebCore::TouchAction::Manipulation })) { 84 86 bool canPanX = true; … … 148 150 { 149 151 auto* panGestureRecognizer = scrollView.panGestureRecognizer; 150 auto touchActions = _scrollingTreeNodeDelegate->activeTouchActionsForGestureRecognizer(panGestureRecognizer); 152 _scrollingTreeNodeDelegate->computeActiveTouchActionsForGestureRecognizer(panGestureRecognizer); 153 auto touchActions = _scrollingTreeNodeDelegate->activeTouchActions(); 154 151 155 if (!touchActions) { 152 156 [self cancelPointersForGestureRecognizer:panGestureRecognizer]; … … 337 341 338 342 #if ENABLE(POINTER_EVENTS) 339 OptionSet<TouchAction> ScrollingTreeScrollingNodeDelegateIOS::activeTouchActionsForGestureRecognizer(UIGestureRecognizer* gestureRecognizer) const 343 void ScrollingTreeScrollingNodeDelegateIOS::computeActiveTouchActionsForGestureRecognizer(UIGestureRecognizer* gestureRecognizer) 340 344 { 341 345 auto& scrollingCoordinatorProxy = downcast<RemoteScrollingTree>(scrollingTree()).scrollingCoordinatorProxy(); 342 346 if (auto touchIdentifier = scrollingCoordinatorProxy.webPageProxy().pageClient().activeTouchIdentifierForGestureRecognizer(gestureRecognizer)) 343 return scrollingCoordinatorProxy.activeTouchActionsForTouchIdentifier(*touchIdentifier); 344 return { }; 347 m_activeTouchActions = scrollingCoordinatorProxy.activeTouchActionsForTouchIdentifier(*touchIdentifier); 345 348 } 346 349
Note: See TracChangeset
for help on using the changeset viewer.