[Extra zoom mode] Delegate scrolling from the content view to input view controllers
authorwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Feb 2018 23:13:49 +0000 (23:13 +0000)
committerwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Feb 2018 23:13:49 +0000 (23:13 +0000)
https://bugs.webkit.org/show_bug.cgi?id=182534
<rdar://problem/37276625>

Reviewed by Tim Horton.

Override -_wheelChangedWithEvent: on the content view, and give extra zoomed input view controllers a chance to
handle the event.

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

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@228246 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/ChangeLog
Source/WebKit/Platform/spi/ios/UIKitSPI.h
Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm

index f98fed3..c639215 100644 (file)
@@ -1,5 +1,20 @@
 2018-02-07  Wenson Hsieh  <wenson_hsieh@apple.com>
 
+        [Extra zoom mode] Delegate scrolling from the content view to input view controllers
+        https://bugs.webkit.org/show_bug.cgi?id=182534
+        <rdar://problem/37276625>
+
+        Reviewed by Tim Horton.
+
+        Override -_wheelChangedWithEvent: on the content view, and give extra zoomed input view controllers a chance to
+        handle the event.
+
+        * Platform/spi/ios/UIKitSPI.h:
+        * UIProcess/ios/WKContentViewInteraction.mm:
+        (-[WKContentView _wheelChangedWithEvent:]):
+
+2018-02-07  Wenson Hsieh  <wenson_hsieh@apple.com>
+
         [Extra zoom mode] Implement multiple and single select menus
         https://bugs.webkit.org/show_bug.cgi?id=182525
         <rdar://problem/35143016>
index 42e8849..25a93b4 100644 (file)
@@ -307,6 +307,7 @@ typedef enum {
 
 @interface UIResponder ()
 - (void)_handleKeyUIEvent:(UIEvent *)event;
+- (void)_wheelChangedWithEvent:(UIEvent *)event;
 @end
 
 @class CADisplay;
index beb4735..4859881 100644 (file)
@@ -4359,6 +4359,24 @@ static bool isAssistableInputType(InputType type)
 
 #endif // ENABLE(EXTRA_ZOOM_MODE)
 
+- (void)_wheelChangedWithEvent:(UIEvent *)event
+{
+#if ENABLE(EXTRA_ZOOM_MODE)
+    if ([_numberPadViewController handleWheelEvent:event])
+        return;
+
+    if ([_textInputViewController handleWheelEvent:event])
+        return;
+
+    if ([_selectMenuViewController handleWheelEvent:event])
+        return;
+
+    if ([_focusedFormControlViewController handleWheelEvent:event])
+        return;
+#endif
+    [super _wheelChangedWithEvent:event];
+}
+
 - (void)_selectionChanged
 {
     _selectionNeedsUpdate = YES;