Changeset 219340 in webkit
- Timestamp:
- Jul 11, 2017 10:55:21 AM (7 years ago)
- Location:
- trunk/Source
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r219338 r219340 1 2017-07-11 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 Address post-review feedback after http://trac.webkit.org/r219310 4 https://bugs.webkit.org/show_bug.cgi?id=174300 5 <rdar://problem/33030639> 6 7 Reviewed by Simon Fraser. 8 9 Removes pan-gesture-related plumbing introduced in r219310 that is no longer necessary. 10 11 * page/scrolling/ScrollingTree.h: 12 (WebCore::ScrollingTree::scrollingTreeNodeWillStartPanGesture): 13 (WebCore::ScrollingTree::scrollingTreeNodeDidEndPanGesture): Deleted. 14 1 15 2017-07-11 Alex Christensen <achristensen@webkit.org> 2 16 -
trunk/Source/WebCore/page/scrolling/ScrollingTree.h
r219310 r219340 102 102 virtual FloatRect fixedPositionRect() = 0; 103 103 virtual void scrollingTreeNodeWillStartPanGesture() { } 104 virtual void scrollingTreeNodeDidEndPanGesture() { }105 104 virtual void scrollingTreeNodeWillStartScroll() { } 106 105 virtual void scrollingTreeNodeDidEndScroll() { } -
trunk/Source/WebKit2/ChangeLog
r219337 r219340 1 2017-07-11 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 Address post-review feedback after http://trac.webkit.org/r219310 4 https://bugs.webkit.org/show_bug.cgi?id=174300 5 <rdar://problem/33030639> 6 7 Reviewed by Simon Fraser. 8 9 Removes plumbing introduced in r219310 for telling WKContentView when the user has finished panning or zooming. 10 This was previously used to reset allowing asynchronous touch event after preventing the web touch events 11 gesture recognizer from firing. 12 13 However, a far simpler (and much less fragile) solution is to just set _canSendTouchEventsAsynchronously to NO 14 at the beginning of the gesture, before the first `touchstart` event is dispatched. This way, we always ensure 15 that _canSendTouchEventsAsynchronously is NO when beginning to process a touch event. This approach is correct 16 because the only place where we query _canSendTouchEventsAsynchronously is in -_webTouchEventsRecognized:, where 17 (when we are beginning a new gesture) we are guaranteed that -gestureRecognizer:shouldIgnoreWebTouchWithEvent: 18 has already been called and _canSendTouchEventsAsynchronously is NO. 19 20 Confirmed that the LayoutTests added in r219310 still pass. 21 22 * UIProcess/API/Cocoa/WKWebView.mm: 23 (-[WKWebView scrollViewDidEndDragging:willDecelerate:]): 24 (-[WKWebView scrollViewDidEndZooming:withView:atScale:]): 25 * UIProcess/PageClient.h: 26 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h: 27 * UIProcess/Scrolling/RemoteScrollingTree.cpp: 28 (WebKit::RemoteScrollingTree::scrollingTreeNodeDidEndPanGesture): Deleted. 29 * UIProcess/Scrolling/RemoteScrollingTree.h: 30 * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h: 31 * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm: 32 (-[WKOverflowScrollViewDelegate scrollViewDidEndDragging:willDecelerate:]): 33 (WebKit::ScrollingTreeOverflowScrollingNodeIOS::overflowScrollViewDidEndPanGesture): Deleted. 34 * UIProcess/WebPageProxy.h: 35 * UIProcess/ios/PageClientImplIOS.h: 36 * UIProcess/ios/PageClientImplIOS.mm: 37 (WebKit::PageClientImpl::overflowScrollViewDidEndPanGesture): Deleted. 38 * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm: 39 (WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeDidEndPanGesture): Deleted. 40 * UIProcess/ios/WKContentViewInteraction.h: 41 * UIProcess/ios/WKContentViewInteraction.mm: 42 (-[WKContentView gestureRecognizer:shouldIgnoreWebTouchWithEvent:]): 43 (-[WKContentView scrollViewDidEndPanOrPinchGesture]): Deleted. 44 * UIProcess/ios/WebPageProxyIOS.mm: 45 (WebKit::WebPageProxy::overflowScrollViewDidEndPanGesture): Deleted. 46 1 47 2017-07-11 Brent Fulgham <bfulgham@apple.com> 2 48 -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm
r219314 r219340 2151 2151 if (!decelerate) 2152 2152 [self _didFinishScrolling]; 2153 2154 if (scrollView.panGestureRecognizer.state == UIGestureRecognizerStateEnded)2155 [_contentView scrollViewDidEndPanOrPinchGesture];2156 2153 } 2157 2154 … … 2188 2185 [self _scheduleVisibleContentRectUpdateAfterScrollInView:scrollView]; 2189 2186 [_contentView didZoomToScale:scale]; 2190 2191 if (scrollView.pinchGestureRecognizer.state == UIGestureRecognizerStateEnded)2192 [_contentView scrollViewDidEndPanOrPinchGesture];2193 2187 } 2194 2188 -
trunk/Source/WebKit2/UIProcess/PageClient.h
r219310 r219340 309 309 virtual WebCore::FloatRect documentRect() const = 0; 310 310 virtual void overflowScrollViewWillStartPanGesture() = 0; 311 virtual void overflowScrollViewDidEndPanGesture() = 0;312 311 virtual void overflowScrollViewDidScroll() = 0; 313 312 virtual void overflowScrollWillStartScroll() = 0; -
trunk/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h
r219310 r219340 87 87 WebCore::FloatRect customFixedPositionRect() const; 88 88 void scrollingTreeNodeWillStartPanGesture(); 89 void scrollingTreeNodeDidEndPanGesture();90 89 void scrollingTreeNodeWillStartScroll(); 91 90 void scrollingTreeNodeDidEndScroll(); -
trunk/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingTree.cpp
r219310 r219340 89 89 } 90 90 91 void RemoteScrollingTree::scrollingTreeNodeDidEndPanGesture()92 {93 m_scrollingCoordinatorProxy.scrollingTreeNodeDidEndPanGesture();94 }95 96 91 void RemoteScrollingTree::scrollingTreeNodeWillStartScroll() 97 92 { -
trunk/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingTree.h
r219310 r219340 62 62 WebCore::FloatRect fixedPositionRect() override; 63 63 void scrollingTreeNodeWillStartPanGesture() override; 64 void scrollingTreeNodeDidEndPanGesture() override;65 64 void scrollingTreeNodeWillStartScroll() override; 66 65 void scrollingTreeNodeDidEndScroll() override; -
trunk/Source/WebKit2/UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h
r219310 r219340 45 45 void overflowScrollDidEnd(); 46 46 void overflowScrollViewWillStartPanGesture(); 47 void overflowScrollViewDidEndPanGesture();48 47 void scrollViewDidScroll(const WebCore::FloatPoint&, bool inUserInteration); 49 48 void currentSnapPointIndicesDidChange(unsigned horizontal, unsigned vertical); -
trunk/Source/WebKit2/UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm
r219310 r219340 118 118 _scrollingTreeNode->overflowScrollDidEnd(); 119 119 } 120 121 if (scrollView.panGestureRecognizer.state == UIGestureRecognizerStateEnded)122 _scrollingTreeNode->overflowScrollViewDidEndPanGesture();123 120 } 124 121 … … 298 295 } 299 296 300 void ScrollingTreeOverflowScrollingNodeIOS::overflowScrollViewDidEndPanGesture()301 {302 scrollingTree().scrollingTreeNodeDidEndPanGesture();303 }304 305 297 void ScrollingTreeOverflowScrollingNodeIOS::scrollViewDidScroll(const FloatPoint& scrollPosition, bool inUserInteration) 306 298 { -
trunk/Source/WebKit2/UIProcess/WebPageProxy.h
r219330 r219340 496 496 497 497 void overflowScrollViewWillStartPanGesture(); 498 void overflowScrollViewDidEndPanGesture();499 498 void overflowScrollViewDidScroll(); 500 499 void overflowScrollWillStartScroll(); -
trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h
r219310 r219340 152 152 153 153 void overflowScrollViewWillStartPanGesture() override; 154 void overflowScrollViewDidEndPanGesture() override;155 154 void overflowScrollViewDidScroll() override; 156 155 void overflowScrollWillStartScroll() override; -
trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm
r219310 r219340 672 672 } 673 673 674 void PageClientImpl::overflowScrollViewDidEndPanGesture()675 {676 [m_contentView scrollViewDidEndPanOrPinchGesture];677 }678 679 674 void PageClientImpl::overflowScrollViewDidScroll() 680 675 { -
trunk/Source/WebKit2/UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm
r219310 r219340 105 105 } 106 106 107 void RemoteScrollingCoordinatorProxy::scrollingTreeNodeDidEndPanGesture()108 {109 m_webPageProxy.overflowScrollViewDidEndPanGesture();110 }111 112 107 void RemoteScrollingCoordinatorProxy::scrollingTreeNodeWillStartScroll() 113 108 { -
trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h
r219310 r219340 280 280 281 281 - (void)scrollViewWillStartPanOrPinchGesture; 282 - (void)scrollViewDidEndPanOrPinchGesture;283 282 284 283 - (BOOL)canBecomeFirstResponderForWebView; -
trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm
r219310 r219340 1844 1844 1845 1845 _canSendTouchEventsAsynchronously = YES; 1846 }1847 1848 - (void)scrollViewDidEndPanOrPinchGesture1849 {1850 _canSendTouchEventsAsynchronously = NO;1851 1846 } 1852 1847 … … 4064 4059 - (BOOL)gestureRecognizer:(UIWebTouchEventsGestureRecognizer *)gestureRecognizer shouldIgnoreWebTouchWithEvent:(UIEvent *)event 4065 4060 { 4061 _canSendTouchEventsAsynchronously = NO; 4062 4066 4063 NSSet<UITouch *> *touches = [event touchesForGestureRecognizer:gestureRecognizer]; 4067 4064 for (UITouch *touch in touches) { -
trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm
r219310 r219340 273 273 } 274 274 275 void WebPageProxy::overflowScrollViewDidEndPanGesture()276 {277 m_pageClient.overflowScrollViewDidEndPanGesture();278 }279 280 275 void WebPageProxy::overflowScrollViewDidScroll() 281 276 {
Note: See TracChangeset
for help on using the changeset viewer.