Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b783bcea8eeeb4a606e0cfee6815ab1e34451127
      
https://github.com/WebKit/WebKit/commit/b783bcea8eeeb4a606e0cfee6815ab1e34451127
  Author: Richard Robinson <richard_robins...@apple.com>
  Date:   2024-04-21 (Sun, 21 Apr 2024)

  Changed paths:
    M Source/WebKit/WebProcess/WebPage/Cocoa/UnifiedTextReplacementController.mm
    M Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm
    M Source/WebKit/WebProcess/WebPage/UnifiedTextReplacementController.h

  Log Message:
  -----------
  [Unified Text Replacement] Selection is sometimes incorrect after text 
replacement
https://bugs.webkit.org/show_bug.cgi?id=272957
rdar://125097437

Reviewed by Wenson Hsieh.

After text replacement, ensure the replaced text is selected.

To ensure the selection is always correct, keep track of the character offsets 
of the ranges
instead of relying on the live ranges automatically updating.

* Source/WebKit/WebProcess/WebPage/Cocoa/UnifiedTextReplacementController.mm:
(WebKit::UnifiedTextReplacementController::textReplacementSessionDidReceiveReplacements):
(WebKit::UnifiedTextReplacementController::textReplacementSessionDidUpdateStateForReplacement):
(WebKit::UnifiedTextReplacementController::didEndTextReplacementSession):
(WebKit::UnifiedTextReplacementController::updateStateForSelectedReplacementIfNeeded):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to