Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 161dbc0f0eb5324c45e62eeee11d67c4cbd163c9
      
https://github.com/WebKit/WebKit/commit/161dbc0f0eb5324c45e62eeee11d67c4cbd163c9
  Author: Wenson Hsieh <[email protected]>
  Date:   2023-12-09 (Sat, 09 Dec 2023)

  Changed paths:
    M Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm

  Log Message:
  -----------
  [UIAsyncTextInput] Release assertion after selecting "Translate" when async 
text input is enabled
https://bugs.webkit.org/show_bug.cgi?id=266157
rdar://119434259

Reviewed by Megan Gardner.

After the UIKit changes in rdar://119283621, the default commands corresponding 
to these 3 actions:

```
_define:     define:
_translate:  translate:
_lookup:     lookup:
```

...now follow an inverted model for dispatching fallback actions, where the 
primary action selector
is the legacy private action, and the fallback selector is the new selector on 
`UIAsyncTextInput`.
This means that UIKit ends up calling into private selectors on the content 
view instead of their
non-underscore-prefixed counterparts even when `UIKit/async_text_input` is 
enabled, causing us to
hit release assertions under these three methods.

To avoid this, we adjust the default behavior of 
`-targetForActionForWebView:withSender:` to always
return `nil` for these three private selectors, in order to force UIKit to fall 
back to calling into
the new action selectors.

Changes covered by the layout test 
`editing/selection/ios/look-up-selected-text.html`, when async
text input is enabled.

* Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView targetForActionForWebView:withSender:]):

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


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

Reply via email to