Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Share more code between iOS and macOS ViewGestureController
https://bugs.webkit.org/show_bug.cgi?id=163158 Reviewed by Simon Fraser. Share canSwipeInDirection() and the (unused on Mac) alternate back-forward list mechanism. Make ViewGestureController operate in terms of WebPageProxy, not WKWebView, because it shouldn't know anything about WKWebView. Refactor scrollEventCanBecomeSwipe a bit to be less repetitive. * UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView setAllowsBackForwardNavigationGestures:]): * UIProcess/Cocoa/ViewGestureController.cpp: (WebKit::ViewGestureController::ViewGestureController): (WebKit::ViewGestureController::setAlternateBackForwardListSourcePage): (WebKit::ViewGestureController::canSwipeInDirection): (WebKit::ViewGestureController::gestureControllerForPage): Deleted. * UIProcess/Cocoa/ViewGestureController.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::WebPageProxy): * UIProcess/WebPageProxy.h: (WebKit::WebPageProxy::createWeakPtr): * UIProcess/ios/ViewGestureControllerIOS.mm: (WebKit::ViewGestureController::beginSwipeGesture): (WebKit::ViewGestureController::setAlternateBackForwardListSourceView): Deleted. (WebKit::ViewGestureController::canSwipeInDirection): Deleted. * UIProcess/mac/ViewGestureControllerMac.mm: (WebKit::ViewGestureController::PendingSwipeTracker::PendingSwipeTracker): (WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanBecomeSwipe): (WebKit::ViewGestureController::PendingSwipeTracker::tryToStartSwipe): Canonical link: https://commits.webkit.org/180998@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@206950 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
with
84 additions
and 42 deletions.
- +33 −0 Source/WebKit2/ChangeLog
- +1 −1 Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm
- +20 −1 Source/WebKit2/UIProcess/Cocoa/ViewGestureController.cpp
- +10 −10 Source/WebKit2/UIProcess/Cocoa/ViewGestureController.h
- +1 −0 Source/WebKit2/UIProcess/WebPageProxy.cpp
- +4 −0 Source/WebKit2/UIProcess/WebPageProxy.h
- +4 −14 Source/WebKit2/UIProcess/ios/ViewGestureControllerIOS.mm
- +11 −16 Source/WebKit2/UIProcess/mac/ViewGestureControllerMac.mm
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters