Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 92399f9f2ddd89a024d1d9549a5945cea4c1b605
      
https://github.com/WebKit/WebKit/commit/92399f9f2ddd89a024d1d9549a5945cea4c1b605
  Author: Wenson Hsieh <[email protected]>
  Date:   2023-11-07 (Tue, 07 Nov 2023)

  Changed paths:
    M Source/WebKit/Platform/spi/ios/UIKitSPI.h
    M Source/WebKit/UIProcess/ios/WKContentViewInteraction.h
    M Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
    M Source/WebKit/UIProcess/ios/WKTextInteractionWrapper.mm

  Log Message:
  -----------
  [Async text interaction] Enable selection autoscrolling, and reveal the edit 
menu after scrolling
https://bugs.webkit.org/show_bug.cgi?id=264337

Reviewed by Megan Gardner.

This patch works towards additional support for async text interaction (and 
input client), by
adding plumbing for the following:

1.  Plumbing to autoscroll to a given `point` in content view coordinates.
2.  Logic to reveal the edit menu after scrolling or zooming, only if the edit 
menu was previously
    presented. To know this, we add a new flag on the content view to keep 
track of whether the edit
    menu has been fully presented.

* Source/WebKit/Platform/spi/ios/UIKitSPI.h:

Add an SPI method declaration here, only so that we can call super in our 
existing implementation of
`-interactionAssistant`.

* Source/WebKit/UIProcess/ios/WKContentViewInteraction.h:
* Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView interactionAssistant]):
(-[WKContentView willPresentEditMenuWithAnimator:]):
(-[WKContentView willDismissEditMenuWithAnimator:]):

Keep track of `_isPresentingEditMenu`, so that we can consult it in the 
`WKTextInteractionWrapper`
below to conditionally restore edit menu visibility.

(-[WKContentView isPresentingEditMenu]):
(-[WKContentView autoscrollToPoint:]):
(-[WKContentView cancelAutoscroll]):

Implement a new method to hook into platform selection autoscrolling support 
using
`UIAsyncTextInputClient`.

* Source/WebKit/UIProcess/ios/WKTextInteractionWrapper.mm:
(SOFT_LINK_CLASS_OPTIONAL):
(-[WKTextInteractionWrapper initWithView:]):
(-[WKTextInteractionWrapper willStartScrollingOverflow]):
(-[WKTextInteractionWrapper didEndScrollingOverflow]):
(-[WKTextInteractionWrapper willStartScrollingOrZooming]):
(-[WKTextInteractionWrapper didEndScrollingOrZooming]):

Canonical link: https://commits.webkit.org/270343@main


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to