Title: [238474] trunk/Source/WebKit
Revision
238474
Author
[email protected]
Date
2018-11-25 04:05:02 -0800 (Sun, 25 Nov 2018)

Log Message

Scrolling and drawing compete for incoming gestures
https://bugs.webkit.org/show_bug.cgi?id=191940

Reviewed by Wenson Hsieh.

* Platform/spi/ios/PencilKitSPI.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _initializeWithConfiguration:]):
* UIProcess/ios/WKDrawingView.mm:
(-[WKDrawingView initWithEmbeddedViewID:webPageProxy:]):
Make scrolling and drawing mutually exclusive if editable images
are enabled.

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (238473 => 238474)


--- trunk/Source/WebKit/ChangeLog	2018-11-25 01:45:54 UTC (rev 238473)
+++ trunk/Source/WebKit/ChangeLog	2018-11-25 12:05:02 UTC (rev 238474)
@@ -1,3 +1,18 @@
+2018-11-25  Tim Horton  <[email protected]>
+
+        Scrolling and drawing compete for incoming gestures
+        https://bugs.webkit.org/show_bug.cgi?id=191940
+
+        Reviewed by Wenson Hsieh.
+
+        * Platform/spi/ios/PencilKitSPI.h:
+        * UIProcess/API/Cocoa/WKWebView.mm:
+        (-[WKWebView _initializeWithConfiguration:]):
+        * UIProcess/ios/WKDrawingView.mm:
+        (-[WKDrawingView initWithEmbeddedViewID:webPageProxy:]):
+        Make scrolling and drawing mutually exclusive if editable images
+        are enabled.
+
 2018-11-24  Wenson Hsieh  <[email protected]>
 
         [Cocoa] Fix a few localizable string descriptions in WebEditCommandProxy.cpp and WebEditorClient.mm

Modified: trunk/Source/WebKit/Platform/spi/ios/PencilKitSPI.h (238473 => 238474)


--- trunk/Source/WebKit/Platform/spi/ios/PencilKitSPI.h	2018-11-25 01:45:54 UTC (rev 238473)
+++ trunk/Source/WebKit/Platform/spi/ios/PencilKitSPI.h	2018-11-25 12:05:02 UTC (rev 238474)
@@ -32,6 +32,9 @@
 #else
 
 @interface PKCanvasView : UIView
+
+@property (nonatomic, getter=isFingerDrawingEnabled) BOOL fingerDrawingEnabled;
+
 @end
 
 #endif

Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm (238473 => 238474)


--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm	2018-11-25 01:45:54 UTC (rev 238473)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm	2018-11-25 12:05:02 UTC (rev 238474)
@@ -666,6 +666,9 @@
     [_scrollView setInternalDelegate:self];
     [_scrollView setBouncesZoom:YES];
 
+    if ([_configuration _editableImagesEnabled])
+        [_scrollView panGestureRecognizer].allowedTouchTypes = @[ @(UITouchTypeDirect) ];
+
     _avoidsUnsafeArea = YES;
     [self _updateScrollViewInsetAdjustmentBehavior];
 

Modified: trunk/Source/WebKit/UIProcess/ios/WKDrawingView.mm (238473 => 238474)


--- trunk/Source/WebKit/UIProcess/ios/WKDrawingView.mm	2018-11-25 01:45:54 UTC (rev 238473)
+++ trunk/Source/WebKit/UIProcess/ios/WKDrawingView.mm	2018-11-25 12:05:02 UTC (rev 238474)
@@ -46,6 +46,7 @@
 
     _pencilView = adoptNS([allocPKCanvasViewInstance() initWithFrame:CGRectZero]);
 
+    [_pencilView setFingerDrawingEnabled:NO];
     [_pencilView setUserInteractionEnabled:YES];
     [_pencilView setOpaque:NO];
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to