[webkit-changes] [WebKit/WebKit] 03e3e1: [Unified Text Replacement] Multiple replacements c...
Richard Robinson
noreply at github.com
Fri Apr 26 21:27:49 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 03e3e16d57c4f22d56a1b84617b80a9b15617b5d
https://github.com/WebKit/WebKit/commit/03e3e16d57c4f22d56a1b84617b80a9b15617b5d
Author: Richard Robinson <richard_robinson2 at apple.com>
Date: 2024-04-26 (Fri, 26 Apr 2024)
Changed paths:
M Source/WebKit/WebProcess/WebPage/Cocoa/UnifiedTextReplacementController.mm
M Source/WebKit/WebProcess/WebPage/UnifiedTextReplacementController.h
Log Message:
-----------
[Unified Text Replacement] Multiple replacements can sometimes result in incorrect text
https://bugs.webkit.org/show_bug.cgi?id=273351
rdar://127013042
Reviewed by Aditya Keerthi.
In the `textReplacementSessionDidReceiveReplacements`, the replacement location offset is stored
and updated for each replacement, so that the range that is replaced is always up-to-date. However,
if the function is called multiple times, subsequent calls will lose this additional offset
information.
Fix by storing the offset as a member variable on the controller.
Also clean up the `UnifiedTextReplacementController` header a bit.
* Source/WebKit/WebProcess/WebPage/Cocoa/UnifiedTextReplacementController.mm:
(WebKit::UnifiedTextReplacementController::textReplacementSessionDidReceiveReplacements):
(WebKit::UnifiedTextReplacementController::didEndTextReplacementSession):
(WebKit::UnifiedTextReplacementController::findReplacementMarkerByUUID const):
(WebKit::UnifiedTextReplacementController::findReplacementMarkerContainingRange const):
(WebKit::UnifiedTextReplacementController::findReplacementMarkerByUUID): Deleted.
(WebKit::UnifiedTextReplacementController::findReplacementMarkerContainingRange): Deleted.
* Source/WebKit/WebProcess/WebPage/UnifiedTextReplacementController.h:
Canonical link: https://commits.webkit.org/278073@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