Title: [195826] trunk/Source/WebKit2
Revision
195826
Author
[email protected]
Date
2016-01-29 11:07:50 -0800 (Fri, 29 Jan 2016)

Log Message

Disable text interaction with pencil.
https://bugs.webkit.org/show_bug.cgi?id=153655
rdar://problem/24337778

Reviewed by Tim Horton.

* Platform/spi/ios/UIKitSPI.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _createAndConfigureDoubleTapGestureRecognizer]):
(-[WKContentView _singleTapCommited:]):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (195825 => 195826)


--- trunk/Source/WebKit2/ChangeLog	2016-01-29 18:59:55 UTC (rev 195825)
+++ trunk/Source/WebKit2/ChangeLog	2016-01-29 19:07:50 UTC (rev 195826)
@@ -1,3 +1,16 @@
+2016-01-29  Enrica Casucci  <[email protected]>
+
+        Disable text interaction with pencil.
+        https://bugs.webkit.org/show_bug.cgi?id=153655
+        rdar://problem/24337778
+
+        Reviewed by Tim Horton.
+
+        * Platform/spi/ios/UIKitSPI.h:
+        * UIProcess/ios/WKContentViewInteraction.mm:
+        (-[WKContentView _createAndConfigureDoubleTapGestureRecognizer]):
+        (-[WKContentView _singleTapCommited:]):
+
 2016-01-29  Mario Sanchez Prada  <[email protected]>
 
         [GTK] WebProcess crashes when quickly attempting many DnD operations

Modified: trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h (195825 => 195826)


--- trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h	2016-01-29 18:59:55 UTC (rev 195825)
+++ trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h	2016-01-29 19:07:50 UTC (rev 195826)
@@ -24,6 +24,7 @@
  */
 
 #import <UIKit/UIKit.h>
+#import <UIKit/UITouch.h>
 
 #if USE(APPLE_INTERNAL_SDK)
 
@@ -311,6 +312,7 @@
 
 @interface UITapGestureRecognizer ()
 @property (nonatomic, readonly) CGPoint location;
+@property (nonatomic, readonly) NSArray  *touches;
 @end
 
 @class WebEvent;

Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm (195825 => 195826)


--- trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm	2016-01-29 18:59:55 UTC (rev 195825)
+++ trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm	2016-01-29 19:07:50 UTC (rev 195826)
@@ -434,6 +434,7 @@
 {
     _doubleTapGestureRecognizer = adoptNS([[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(_doubleTapRecognized:)]);
     [_doubleTapGestureRecognizer setNumberOfTapsRequired:2];
+    [_doubleTapGestureRecognizer setAllowedTouchTypes:@[@(UITouchTypeDirect)]];
     [_doubleTapGestureRecognizer setDelegate:self];
     [self addGestureRecognizer:_doubleTapGestureRecognizer.get()];
     [_singleTapGestureRecognizer requireOtherGestureToFail:_doubleTapGestureRecognizer.get()];
@@ -1332,7 +1333,8 @@
     // We don't want to clear the selection if it is in editable content.
     // The selection could have been set by autofocusing on page load and not
     // reflected in the UI process since the user was not interacting with the page.
-    if (!_page->editorState().isContentEditable)
+    UITouch *touch = [gestureRecognizer.touches lastObject];
+    if (!_page->editorState().isContentEditable && touch.type == UITouchTypeDirect)
         [_webSelectionAssistant clearSelection];
 
     _lastInteractionLocation = gestureRecognizer.location;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to