Title: [251382] trunk/Source
Revision
251382
Author
timothy_hor...@apple.com
Date
2019-10-21 14:16:21 -0700 (Mon, 21 Oct 2019)

Log Message

macCatalyst: Swipe navigation gestures do not work
https://bugs.webkit.org/show_bug.cgi?id=203205
<rdar://problem/54617473>

Reviewed by Wenson Hsieh.

Source/WebKit:

* UIProcess/ios/ViewGestureControllerIOS.mm:
(-[WKSwipeTransitionController gestureRecognizerForInteractiveTransition:WithTarget:action:]):
Use a different gesture recognizer for swipe in macCatalyst that behaves
more like the macOS implementation, based on scrolling instead of the
gesture coming from a screen edge.

Source/WTF:

* wtf/Platform.h:
Add a new HAVE.

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (251381 => 251382)


--- trunk/Source/WTF/ChangeLog	2019-10-21 21:07:38 UTC (rev 251381)
+++ trunk/Source/WTF/ChangeLog	2019-10-21 21:16:21 UTC (rev 251382)
@@ -1,3 +1,14 @@
+2019-10-21  Tim Horton  <timothy_hor...@apple.com>
+
+        macCatalyst: Swipe navigation gestures do not work
+        https://bugs.webkit.org/show_bug.cgi?id=203205
+        <rdar://problem/54617473>
+
+        Reviewed by Wenson Hsieh.
+
+        * wtf/Platform.h:
+        Add a new HAVE.
+
 2019-10-20  Mark Lam  <mark....@apple.com>
 
         Remove all uses of untagCodePtr in debugging code.

Modified: trunk/Source/WTF/wtf/Platform.h (251381 => 251382)


--- trunk/Source/WTF/wtf/Platform.h	2019-10-21 21:07:38 UTC (rev 251381)
+++ trunk/Source/WTF/wtf/Platform.h	2019-10-21 21:16:21 UTC (rev 251382)
@@ -1561,6 +1561,7 @@
 #if PLATFORM(MACCATALYST)
 #define ENABLE_PLATFORM_DRIVEN_TEXT_CHECKING 1
 #define HAVE_HOVER_GESTURE_RECOGNIZER 1
+#define HAVE_UI_PARALLAX_TRANSITION_GESTURE_RECOGNIZER 1
 #endif
 
 #if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500) || PLATFORM(IOS_FAMILY)

Modified: trunk/Source/WebKit/ChangeLog (251381 => 251382)


--- trunk/Source/WebKit/ChangeLog	2019-10-21 21:07:38 UTC (rev 251381)
+++ trunk/Source/WebKit/ChangeLog	2019-10-21 21:16:21 UTC (rev 251382)
@@ -1,3 +1,17 @@
+2019-10-21  Tim Horton  <timothy_hor...@apple.com>
+
+        macCatalyst: Swipe navigation gestures do not work
+        https://bugs.webkit.org/show_bug.cgi?id=203205
+        <rdar://problem/54617473>
+
+        Reviewed by Wenson Hsieh.
+
+        * UIProcess/ios/ViewGestureControllerIOS.mm:
+        (-[WKSwipeTransitionController gestureRecognizerForInteractiveTransition:WithTarget:action:]):
+        Use a different gesture recognizer for swipe in macCatalyst that behaves
+        more like the macOS implementation, based on scrolling instead of the
+        gesture coming from a screen edge.
+
 2019-10-21  Daniel Bates  <daba...@apple.com>
 
         Add some PencilKit extension points

Modified: trunk/Source/WebKit/UIProcess/ios/ViewGestureControllerIOS.mm (251381 => 251382)


--- trunk/Source/WebKit/UIProcess/ios/ViewGestureControllerIOS.mm	2019-10-21 21:07:38 UTC (rev 251381)
+++ trunk/Source/WebKit/UIProcess/ios/ViewGestureControllerIOS.mm	2019-10-21 21:16:21 UTC (rev 251382)
@@ -121,8 +121,13 @@
 
 - (UIPanGestureRecognizer *)gestureRecognizerForInteractiveTransition:(_UINavigationInteractiveTransitionBase *)transition WithTarget:(id)target action:(SEL)action
 {
+#if HAVE(UI_PARALLAX_TRANSITION_GESTURE_RECOGNIZER)
+ALLOW_NEW_API_WITHOUT_GUARDS_BEGIN
+    _UIParallaxTransitionPanGestureRecognizer *recognizer = [[_UIParallaxTransitionPanGestureRecognizer alloc] initWithTarget:target action:action];
+ALLOW_NEW_API_WITHOUT_GUARDS_END
+#else
     UIScreenEdgePanGestureRecognizer *recognizer = [[UIScreenEdgePanGestureRecognizer alloc] initWithTarget:target action:action];
-
+#endif
     bool isLTR = [UIView userInterfaceLayoutDirectionForSemanticContentAttribute:[_gestureRecognizerView.get() semanticContentAttribute]] == UIUserInterfaceLayoutDirectionLeftToRight;
 
     switch ([self directionForTransition:transition]) {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to