Skip to content

Commit

Permalink
[Unified Text Replacement] Selection is not revealed when a replaceme…
Browse files Browse the repository at this point in the history
…nt's state is updated

https://bugs.webkit.org/show_bug.cgi?id=274233
rdar://128042855

Reviewed by Wenson Hsieh.

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

Canonical link: https://commits.webkit.org/278844@main
  • Loading branch information
rr-codes committed May 16, 2024
1 parent 188341d commit 2de2095
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@
switch (state) {
case WebTextReplacementData::State::Active: {
document->selection().setSelection({ rangeToReplace });
document->selection().revealSelection();

auto rect = document->view()->contentsToRootView(WebCore::unionRect(WebCore::RenderObject::absoluteTextRects(rangeToReplace)));
m_webPage->textReplacementSessionShowInformationForReplacementWithUUIDRelativeToRect(uuid, replacement.uuid, rect);
Expand Down

0 comments on commit 2de2095

Please sign in to comment.