Diff
Modified: tags/Safari-604.1.30/Source/WebCore/ChangeLog (219353 => 219354)
--- tags/Safari-604.1.30/Source/WebCore/ChangeLog 2017-07-11 19:25:53 UTC (rev 219353)
+++ tags/Safari-604.1.30/Source/WebCore/ChangeLog 2017-07-11 19:31:26 UTC (rev 219354)
@@ -1,3 +1,21 @@
+2017-07-11 Jason Marcell <[email protected]>
+
+ Cherry-pick r219340. rdar://problem/33030639
+
+ 2017-07-11 Wenson Hsieh <[email protected]>
+
+ Address post-review feedback after http://trac.webkit.org/r219310
+ https://bugs.webkit.org/show_bug.cgi?id=174300
+ <rdar://problem/33030639>
+
+ Reviewed by Simon Fraser.
+
+ Removes pan-gesture-related plumbing introduced in r219310 that is no longer necessary.
+
+ * page/scrolling/ScrollingTree.h:
+ (WebCore::ScrollingTree::scrollingTreeNodeWillStartPanGesture):
+ (WebCore::ScrollingTree::scrollingTreeNodeDidEndPanGesture): Deleted.
+
2017-07-11 Alex Christensen <[email protected]>
SharedBuffer::size should return a size_t
Modified: tags/Safari-604.1.30/Source/WebCore/page/scrolling/ScrollingTree.h (219353 => 219354)
--- tags/Safari-604.1.30/Source/WebCore/page/scrolling/ScrollingTree.h 2017-07-11 19:25:53 UTC (rev 219353)
+++ tags/Safari-604.1.30/Source/WebCore/page/scrolling/ScrollingTree.h 2017-07-11 19:31:26 UTC (rev 219354)
@@ -101,7 +101,6 @@
#if PLATFORM(IOS)
virtual FloatRect fixedPositionRect() = 0;
virtual void scrollingTreeNodeWillStartPanGesture() { }
- virtual void scrollingTreeNodeDidEndPanGesture() { }
virtual void scrollingTreeNodeWillStartScroll() { }
virtual void scrollingTreeNodeDidEndScroll() { }
#endif
Modified: tags/Safari-604.1.30/Source/WebKit2/ChangeLog (219353 => 219354)
--- tags/Safari-604.1.30/Source/WebKit2/ChangeLog 2017-07-11 19:25:53 UTC (rev 219353)
+++ tags/Safari-604.1.30/Source/WebKit2/ChangeLog 2017-07-11 19:31:26 UTC (rev 219354)
@@ -1,3 +1,53 @@
+2017-07-11 Jason Marcell <[email protected]>
+
+ Cherry-pick r219340. rdar://problem/33030639
+
+ 2017-07-11 Wenson Hsieh <[email protected]>
+
+ Address post-review feedback after http://trac.webkit.org/r219310
+ https://bugs.webkit.org/show_bug.cgi?id=174300
+ <rdar://problem/33030639>
+
+ Reviewed by Simon Fraser.
+
+ Removes plumbing introduced in r219310 for telling WKContentView when the user has finished panning or zooming.
+ This was previously used to reset allowing asynchronous touch event after preventing the web touch events
+ gesture recognizer from firing.
+
+ However, a far simpler (and much less fragile) solution is to just set _canSendTouchEventsAsynchronously to NO
+ at the beginning of the gesture, before the first `touchstart` event is dispatched. This way, we always ensure
+ that _canSendTouchEventsAsynchronously is NO when beginning to process a touch event. This approach is correct
+ because the only place where we query _canSendTouchEventsAsynchronously is in -_webTouchEventsRecognized:, where
+ (when we are beginning a new gesture) we are guaranteed that -gestureRecognizer:shouldIgnoreWebTouchWithEvent:
+ has already been called and _canSendTouchEventsAsynchronously is NO.
+
+ Confirmed that the LayoutTests added in r219310 still pass.
+
+ * UIProcess/API/Cocoa/WKWebView.mm:
+ (-[WKWebView scrollViewDidEndDragging:willDecelerate:]):
+ (-[WKWebView scrollViewDidEndZooming:withView:atScale:]):
+ * UIProcess/PageClient.h:
+ * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
+ * UIProcess/Scrolling/RemoteScrollingTree.cpp:
+ (WebKit::RemoteScrollingTree::scrollingTreeNodeDidEndPanGesture): Deleted.
+ * UIProcess/Scrolling/RemoteScrollingTree.h:
+ * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
+ * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
+ (-[WKOverflowScrollViewDelegate scrollViewDidEndDragging:willDecelerate:]):
+ (WebKit::ScrollingTreeOverflowScrollingNodeIOS::overflowScrollViewDidEndPanGesture): Deleted.
+ * UIProcess/WebPageProxy.h:
+ * UIProcess/ios/PageClientImplIOS.h:
+ * UIProcess/ios/PageClientImplIOS.mm:
+ (WebKit::PageClientImpl::overflowScrollViewDidEndPanGesture): Deleted.
+ * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
+ (WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeDidEndPanGesture): Deleted.
+ * UIProcess/ios/WKContentViewInteraction.h:
+ * UIProcess/ios/WKContentViewInteraction.mm:
+ (-[WKContentView gestureRecognizer:shouldIgnoreWebTouchWithEvent:]):
+ (-[WKContentView scrollViewDidEndPanOrPinchGesture]): Deleted.
+ * UIProcess/ios/WebPageProxyIOS.mm:
+ (WebKit::WebPageProxy::overflowScrollViewDidEndPanGesture): Deleted.
+
2017-07-11 Brent Fulgham <[email protected]>
Unreviewed clean-up after r219323
Modified: tags/Safari-604.1.30/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (219353 => 219354)
--- tags/Safari-604.1.30/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm 2017-07-11 19:25:53 UTC (rev 219353)
+++ tags/Safari-604.1.30/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm 2017-07-11 19:31:26 UTC (rev 219354)
@@ -2150,9 +2150,6 @@
// If we're decelerating, scroll offset will be updated when scrollViewDidFinishDecelerating: is called.
if (!decelerate)
[self _didFinishScrolling];
-
- if (scrollView.panGestureRecognizer.state == UIGestureRecognizerStateEnded)
- [_contentView scrollViewDidEndPanOrPinchGesture];
}
- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView
@@ -2187,9 +2184,6 @@
ASSERT(scrollView == _scrollView);
[self _scheduleVisibleContentRectUpdateAfterScrollInView:scrollView];
[_contentView didZoomToScale:scale];
-
- if (scrollView.pinchGestureRecognizer.state == UIGestureRecognizerStateEnded)
- [_contentView scrollViewDidEndPanOrPinchGesture];
}
- (void)scrollViewDidEndScrollingAnimation:(UIScrollView *)scrollView
Modified: tags/Safari-604.1.30/Source/WebKit2/UIProcess/PageClient.h (219353 => 219354)
--- tags/Safari-604.1.30/Source/WebKit2/UIProcess/PageClient.h 2017-07-11 19:25:53 UTC (rev 219353)
+++ tags/Safari-604.1.30/Source/WebKit2/UIProcess/PageClient.h 2017-07-11 19:31:26 UTC (rev 219354)
@@ -308,7 +308,6 @@
virtual double minimumZoomScale() const = 0;
virtual WebCore::FloatRect documentRect() const = 0;
virtual void overflowScrollViewWillStartPanGesture() = 0;
- virtual void overflowScrollViewDidEndPanGesture() = 0;
virtual void overflowScrollViewDidScroll() = 0;
virtual void overflowScrollWillStartScroll() = 0;
virtual void overflowScrollDidEndScroll() = 0;
Modified: tags/Safari-604.1.30/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h (219353 => 219354)
--- tags/Safari-604.1.30/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h 2017-07-11 19:25:53 UTC (rev 219353)
+++ tags/Safari-604.1.30/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h 2017-07-11 19:31:26 UTC (rev 219354)
@@ -86,7 +86,6 @@
#if PLATFORM(IOS)
WebCore::FloatRect customFixedPositionRect() const;
void scrollingTreeNodeWillStartPanGesture();
- void scrollingTreeNodeDidEndPanGesture();
void scrollingTreeNodeWillStartScroll();
void scrollingTreeNodeDidEndScroll();
#if ENABLE(CSS_SCROLL_SNAP)
Modified: tags/Safari-604.1.30/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingTree.cpp (219353 => 219354)
--- tags/Safari-604.1.30/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingTree.cpp 2017-07-11 19:25:53 UTC (rev 219353)
+++ tags/Safari-604.1.30/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingTree.cpp 2017-07-11 19:31:26 UTC (rev 219354)
@@ -88,11 +88,6 @@
m_scrollingCoordinatorProxy.scrollingTreeNodeWillStartPanGesture();
}
-void RemoteScrollingTree::scrollingTreeNodeDidEndPanGesture()
-{
- m_scrollingCoordinatorProxy.scrollingTreeNodeDidEndPanGesture();
-}
-
void RemoteScrollingTree::scrollingTreeNodeWillStartScroll()
{
m_scrollingCoordinatorProxy.scrollingTreeNodeWillStartScroll();
Modified: tags/Safari-604.1.30/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingTree.h (219353 => 219354)
--- tags/Safari-604.1.30/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingTree.h 2017-07-11 19:25:53 UTC (rev 219353)
+++ tags/Safari-604.1.30/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingTree.h 2017-07-11 19:31:26 UTC (rev 219354)
@@ -61,7 +61,6 @@
#if PLATFORM(IOS)
WebCore::FloatRect fixedPositionRect() override;
void scrollingTreeNodeWillStartPanGesture() override;
- void scrollingTreeNodeDidEndPanGesture() override;
void scrollingTreeNodeWillStartScroll() override;
void scrollingTreeNodeDidEndScroll() override;
#endif
Modified: tags/Safari-604.1.30/Source/WebKit2/UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h (219353 => 219354)
--- tags/Safari-604.1.30/Source/WebKit2/UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h 2017-07-11 19:25:53 UTC (rev 219353)
+++ tags/Safari-604.1.30/Source/WebKit2/UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h 2017-07-11 19:31:26 UTC (rev 219354)
@@ -44,7 +44,6 @@
void overflowScrollWillStart();
void overflowScrollDidEnd();
void overflowScrollViewWillStartPanGesture();
- void overflowScrollViewDidEndPanGesture();
void scrollViewDidScroll(const WebCore::FloatPoint&, bool inUserInteration);
void currentSnapPointIndicesDidChange(unsigned horizontal, unsigned vertical);
Modified: tags/Safari-604.1.30/Source/WebKit2/UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm (219353 => 219354)
--- tags/Safari-604.1.30/Source/WebKit2/UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm 2017-07-11 19:25:53 UTC (rev 219353)
+++ tags/Safari-604.1.30/Source/WebKit2/UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm 2017-07-11 19:31:26 UTC (rev 219354)
@@ -117,9 +117,6 @@
_scrollingTreeNode->scrollViewDidScroll(scrollView.contentOffset, _inUserInteraction);
_scrollingTreeNode->overflowScrollDidEnd();
}
-
- if (scrollView.panGestureRecognizer.state == UIGestureRecognizerStateEnded)
- _scrollingTreeNode->overflowScrollViewDidEndPanGesture();
}
- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView
@@ -297,11 +294,6 @@
scrollingTree().scrollingTreeNodeWillStartPanGesture();
}
-void ScrollingTreeOverflowScrollingNodeIOS::overflowScrollViewDidEndPanGesture()
-{
- scrollingTree().scrollingTreeNodeDidEndPanGesture();
-}
-
void ScrollingTreeOverflowScrollingNodeIOS::scrollViewDidScroll(const FloatPoint& scrollPosition, bool inUserInteration)
{
if (m_updatingFromStateNode)
Modified: tags/Safari-604.1.30/Source/WebKit2/UIProcess/WebPageProxy.h (219353 => 219354)
--- tags/Safari-604.1.30/Source/WebKit2/UIProcess/WebPageProxy.h 2017-07-11 19:25:53 UTC (rev 219353)
+++ tags/Safari-604.1.30/Source/WebKit2/UIProcess/WebPageProxy.h 2017-07-11 19:31:26 UTC (rev 219354)
@@ -495,7 +495,6 @@
WebCore::FloatRect computeCustomFixedPositionRect(const WebCore::FloatRect& unobscuredContentRect, const WebCore::FloatRect& unobscuredContentRectRespectingInputViewBounds, const WebCore::FloatRect& currentCustomFixedPositionRect, double displayedContentScale, WebCore::FrameView::LayoutViewportConstraint = WebCore::FrameView::LayoutViewportConstraint::Unconstrained, bool visualViewportEnabled = false) const;
void overflowScrollViewWillStartPanGesture();
- void overflowScrollViewDidEndPanGesture();
void overflowScrollViewDidScroll();
void overflowScrollWillStartScroll();
void overflowScrollDidEndScroll();
Modified: tags/Safari-604.1.30/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h (219353 => 219354)
--- tags/Safari-604.1.30/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h 2017-07-11 19:25:53 UTC (rev 219353)
+++ tags/Safari-604.1.30/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h 2017-07-11 19:31:26 UTC (rev 219354)
@@ -151,7 +151,6 @@
void disableInspectorNodeSearch() override;
void overflowScrollViewWillStartPanGesture() override;
- void overflowScrollViewDidEndPanGesture() override;
void overflowScrollViewDidScroll() override;
void overflowScrollWillStartScroll() override;
void overflowScrollDidEndScroll() override;
Modified: tags/Safari-604.1.30/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm (219353 => 219354)
--- tags/Safari-604.1.30/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm 2017-07-11 19:25:53 UTC (rev 219353)
+++ tags/Safari-604.1.30/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm 2017-07-11 19:31:26 UTC (rev 219354)
@@ -671,11 +671,6 @@
[m_contentView scrollViewWillStartPanOrPinchGesture];
}
-void PageClientImpl::overflowScrollViewDidEndPanGesture()
-{
- [m_contentView scrollViewDidEndPanOrPinchGesture];
-}
-
void PageClientImpl::overflowScrollViewDidScroll()
{
[m_contentView _didScroll];
Modified: tags/Safari-604.1.30/Source/WebKit2/UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm (219353 => 219354)
--- tags/Safari-604.1.30/Source/WebKit2/UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm 2017-07-11 19:25:53 UTC (rev 219353)
+++ tags/Safari-604.1.30/Source/WebKit2/UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm 2017-07-11 19:31:26 UTC (rev 219354)
@@ -104,11 +104,6 @@
m_webPageProxy.overflowScrollViewWillStartPanGesture();
}
-void RemoteScrollingCoordinatorProxy::scrollingTreeNodeDidEndPanGesture()
-{
- m_webPageProxy.overflowScrollViewDidEndPanGesture();
-}
-
void RemoteScrollingCoordinatorProxy::scrollingTreeNodeWillStartScroll()
{
m_webPageProxy.overflowScrollWillStartScroll();
Modified: tags/Safari-604.1.30/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h (219353 => 219354)
--- tags/Safari-604.1.30/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h 2017-07-11 19:25:53 UTC (rev 219353)
+++ tags/Safari-604.1.30/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h 2017-07-11 19:31:26 UTC (rev 219354)
@@ -279,7 +279,6 @@
- (void)cleanupInteraction;
- (void)scrollViewWillStartPanOrPinchGesture;
-- (void)scrollViewDidEndPanOrPinchGesture;
- (BOOL)canBecomeFirstResponderForWebView;
- (BOOL)becomeFirstResponderForWebView;
Modified: tags/Safari-604.1.30/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm (219353 => 219354)
--- tags/Safari-604.1.30/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2017-07-11 19:25:53 UTC (rev 219353)
+++ tags/Safari-604.1.30/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2017-07-11 19:31:26 UTC (rev 219354)
@@ -1845,11 +1845,6 @@
_canSendTouchEventsAsynchronously = YES;
}
-- (void)scrollViewDidEndPanOrPinchGesture
-{
- _canSendTouchEventsAsynchronously = NO;
-}
-
- (void)_didEndScrollingOrZooming
{
if (!_needsDeferredEndScrollingSelectionUpdate) {
@@ -4063,6 +4058,8 @@
- (BOOL)gestureRecognizer:(UIWebTouchEventsGestureRecognizer *)gestureRecognizer shouldIgnoreWebTouchWithEvent:(UIEvent *)event
{
+ _canSendTouchEventsAsynchronously = NO;
+
NSSet<UITouch *> *touches = [event touchesForGestureRecognizer:gestureRecognizer];
for (UITouch *touch in touches) {
if ([touch.view isKindOfClass:[UIScrollView class]] && [(UIScrollView *)touch.view _isInterruptingDeceleration])
Modified: tags/Safari-604.1.30/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm (219353 => 219354)
--- tags/Safari-604.1.30/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm 2017-07-11 19:25:53 UTC (rev 219353)
+++ tags/Safari-604.1.30/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm 2017-07-11 19:31:26 UTC (rev 219354)
@@ -272,11 +272,6 @@
m_pageClient.overflowScrollViewWillStartPanGesture();
}
-void WebPageProxy::overflowScrollViewDidEndPanGesture()
-{
- m_pageClient.overflowScrollViewDidEndPanGesture();
-}
-
void WebPageProxy::overflowScrollViewDidScroll()
{
m_pageClient.overflowScrollViewDidScroll();