[webkit-changes] [WebKit/WebKit] 80fc22: REGRESSION (283725 at main): [Writing Tools] Rewritte...

Aditya Keerthi noreply at github.com
Tue Sep 17 23:36:56 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 80fc229f71fe732e4b2111da7284085bee175b98
      https://github.com/WebKit/WebKit/commit/80fc229f71fe732e4b2111da7284085bee175b98
  Author: Aditya Keerthi <akeerthi at apple.com>
  Date:   2024-09-17 (Tue, 17 Sep 2024)

  Changed paths:
    M Source/WebCore/page/writing-tools/WritingToolsController.mm

  Log Message:
  -----------
  REGRESSION (283725 at main): [Writing Tools] Rewritten text is selected during replacement animation
https://bugs.webkit.org/show_bug.cgi?id=279868
rdar://136199712

Reviewed by Richard Robinson.

Writing Tools rewrites are performed using `ReplaceSelectionCommand` with the
`SelectReplacement` option. However, the user should only see the updated
selection once all animations are complete. To support this, intermediate
selections are cleared after replacement, and only the final content is selected
in `WritingToolsController::intelligenceTextAnimationsDidComplete`.

283725 at main applied the replacement command after the call to clear the
selection, resulting in the selection being set too early, before the call to
`WritingToolsController::intelligenceTextAnimationsDidComplete`.

Fix by re-ordering the command application to occur before clearing the selection.

* Source/WebCore/page/writing-tools/WritingToolsController.mm:
(WebCore::WritingToolsController::compositionSessionDidReceiveTextWithReplacementRangeAsync):

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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list