Skip to content

Commit

Permalink
[Unified Text Replacement] Replacements should show their relevant in…
Browse files Browse the repository at this point in the history
…formation when selected

https://bugs.webkit.org/show_bug.cgi?id=271410
rdar://123530652

Reviewed by Aditya Keerthi.

* Source/WebCore/dom/DocumentMarker.h:
* Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _initializeWithConfiguration:]):
* Source/WebKit/UIProcess/API/Cocoa/WKWebViewInternal.h:
* Source/WebKit/UIProcess/Cocoa/PageClientImplCocoa.h:
* Source/WebKit/UIProcess/Cocoa/PageClientImplCocoa.mm:
(WebKit::PageClientImplCocoa::textReplacementSessionShowInformationForReplacementWithUUIDRelativeToRect):
(WebKit::PageClientImplCocoa::textReplacementSessionUpdateStateForReplacementWithUUID):
* Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm:
(WebKit::WebPageProxy::textReplacementSessionShowInformationForReplacementWithUUIDRelativeToRect):
(WebKit::WebPageProxy::textReplacementSessionUpdateStateForReplacementWithUUID):
* Source/WebKit/UIProcess/PageClient.h:
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/WebPageProxy.messages.in:
* Source/WebKit/WebProcess/WebPage/Cocoa/UnifiedTextReplacementController.mm:
(WebKit::findReplacementMarkerContainingRange):
(WebKit::UnifiedTextReplacementController::textReplacementSessionDidReceiveReplacements):
(WebKit::UnifiedTextReplacementController::textReplacementSessionDidUpdateStateForReplacement):
(WebKit::UnifiedTextReplacementController::updateStateForSelectedReplacementIfNeeded):
* Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
(WebKit::WebPage::textReplacementSessionShowInformationForReplacementWithUUIDRelativeToRect):
(WebKit::WebPage::textReplacementSessionUpdateStateForReplacementWithUUID):
* Source/WebKit/WebProcess/WebPage/UnifiedTextReplacementController.h:
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didChangeSelection):
* Source/WebKit/WebProcess/WebPage/WebPage.h:

Canonical link: https://commits.webkit.org/276569@main
  • Loading branch information
rr-codes committed Mar 22, 2024
1 parent b8a264c commit 6b5423c
Show file tree
Hide file tree
Showing 17 changed files with 192 additions and 13 deletions.
1 change: 1 addition & 0 deletions Source/WebCore/dom/DocumentMarker.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ class DocumentMarker : public CanMakeWeakPtr<DocumentMarker> {

String originalText;
WTF::UUID uuid;
WTF::UUID sessionUUID;
State state { State::Pending };
};
#endif
Expand Down
6 changes: 3 additions & 3 deletions Source/WebCore/dom/SimpleRange.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ template<> bool contains<ComposedTree>(const SimpleRange& range, const std::opti
return point && contains<ComposedTree>(range, *point);
}

bool containsForTesting(TreeType type, const SimpleRange& range, const BoundaryPoint& point)
bool contains(TreeType type, const SimpleRange& range, const BoundaryPoint& point)
{
switch (type) {
case Tree:
Expand Down Expand Up @@ -199,7 +199,7 @@ template<TreeType treeType> bool contains(const SimpleRange& outerRange, const S
template bool contains<Tree>(const SimpleRange&, const SimpleRange&);
template bool contains<ComposedTree>(const SimpleRange&, const SimpleRange&);

bool containsForTesting(TreeType type, const SimpleRange& outerRange, const SimpleRange& innerRange)
bool contains(TreeType type, const SimpleRange& outerRange, const SimpleRange& innerRange)
{
switch (type) {
case Tree:
Expand Down Expand Up @@ -264,7 +264,7 @@ template<TreeType treeType> bool contains(const SimpleRange& range, const Node&
template bool contains<Tree>(const SimpleRange&, const Node&);
template bool contains<ComposedTree>(const SimpleRange&, const Node&);

bool containsForTesting(TreeType type, const SimpleRange& range, const Node& node)
bool contains(TreeType type, const SimpleRange& range, const Node& node)
{
switch (type) {
case Tree:
Expand Down
6 changes: 3 additions & 3 deletions Source/WebCore/dom/SimpleRange.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ template<TreeType = Tree> bool contains(const SimpleRange&, const Node&);

template<> WEBCORE_EXPORT bool contains<ComposedTree>(const SimpleRange&, const std::optional<BoundaryPoint>&);

WEBCORE_EXPORT bool containsForTesting(TreeType, const SimpleRange& outerRange, const SimpleRange& innerRange);
WEBCORE_EXPORT bool containsForTesting(TreeType, const SimpleRange&, const Node&);
WEBCORE_EXPORT bool containsForTesting(TreeType, const SimpleRange&, const BoundaryPoint&);
WEBCORE_EXPORT bool contains(TreeType, const SimpleRange& outerRange, const SimpleRange& innerRange);
WEBCORE_EXPORT bool contains(TreeType, const SimpleRange&, const Node&);
WEBCORE_EXPORT bool contains(TreeType, const SimpleRange&, const BoundaryPoint&);

template<TreeType = Tree> bool intersects(const SimpleRange&, const SimpleRange&);
template<TreeType = Tree> bool intersects(const SimpleRange&, const Node&);
Expand Down
6 changes: 3 additions & 3 deletions Source/WebCore/testing/Internals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7179,17 +7179,17 @@ String Internals::treeOrderBoundaryPoints(Node& containerA, unsigned offsetA, No

bool Internals::rangeContainsNode(const AbstractRange& range, Node& node, TreeType type)
{
return containsForTesting(convertType(type), makeSimpleRange(range), node);
return contains(convertType(type), makeSimpleRange(range), node);
}

bool Internals::rangeContainsBoundaryPoint(const AbstractRange& range, Node& container, unsigned offset, TreeType type)
{
return containsForTesting(convertType(type), makeSimpleRange(range), { container, offset });
return contains(convertType(type), makeSimpleRange(range), { container, offset });
}

bool Internals::rangeContainsRange(const AbstractRange& outerRange, const AbstractRange& innerRange, TreeType type)
{
return containsForTesting(convertType(type), makeSimpleRange(outerRange), makeSimpleRange(innerRange));
return contains(convertType(type), makeSimpleRange(outerRange), makeSimpleRange(innerRange));
}

bool Internals::rangeIntersectsNode(const AbstractRange& range, Node& node, TreeType type)
Expand Down
12 changes: 12 additions & 0 deletions Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,10 @@
#define THROW_IF_SUSPENDED if (UNLIKELY(_page && _page->isSuspended())) \
[NSException raise:NSInternalInconsistencyException format:@"The WKWebView is suspended"]

#if USE(APPLE_INTERNAL_SDK)
#import <WebKitAdditions/WKWebViewAdditionsBefore.mm>
#endif

RetainPtr<NSError> nsErrorFromExceptionDetails(const WebCore::ExceptionDetails& details)
{
auto userInfo = adoptNS([[NSMutableDictionary alloc] init]);
Expand Down Expand Up @@ -437,6 +441,10 @@ - (void)_initializeWithConfiguration:(WKWebViewConfiguration *)configuration
_timeOfLastVisibleContentRectUpdate = timeNow;
_timeOfFirstVisibleContentRectUpdateWithPendingCommit = timeNow;
#endif

#if ENABLE(UNIFIED_TEXT_REPLACEMENT)
_unifiedTextReplacementSessions = [NSMapTable strongToWeakObjectsMapTable];
#endif
}

- (void)_setupPageConfiguration:(Ref<API::PageConfiguration>&)pageConfiguration
Expand Down Expand Up @@ -1978,6 +1986,10 @@ - (void)setMinimumViewportInset:(CocoaEdgeInsets)minimumViewportInset maximumVie
_maximumViewportInset = maximumViewportInset;
}

#if USE(APPLE_INTERNAL_SDK)
#import <WebKitAdditions/WKWebViewAdditionsAfter.mm>
#endif

@end

#pragma mark -
Expand Down
19 changes: 19 additions & 0 deletions Source/WebKit/UIProcess/API/Cocoa/WKWebViewInternal.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ enum class WheelScrollGestureState : uint8_t;

namespace WebKit {
enum class ContinueUnsafeLoad : bool;
enum class WebTextReplacementDataState : uint8_t;
class IconLoadingDelegate;
class NavigationState;
class ResourceLoadDelegate;
Expand Down Expand Up @@ -119,6 +120,14 @@ class ViewGestureController;
@class WKTextFinderClient;
#endif

#if USE(APPLE_INTERNAL_SDK)
#import <WebKitAdditions/UnifiedTextReplacementAdditions.h>
#endif

#if ENABLE(UNIFIED_TEXT_REPLACEMENT)
@class WKWebTextReplacementSession;
#endif

@protocol _WKTextManipulationDelegate;
@protocol _WKInputDelegate;
@protocol _WKAppHighlightDelegate;
Expand Down Expand Up @@ -227,6 +236,10 @@ struct PerWebProcessState {
CocoaEdgeInsets _minimumViewportInset;
CocoaEdgeInsets _maximumViewportInset;

#if ENABLE(UNIFIED_TEXT_REPLACEMENT)
RetainPtr<NSMapTable<NSUUID *, WKWebTextReplacementSession *>> _unifiedTextReplacementSessions;
#endif

#if PLATFORM(MAC)
std::unique_ptr<WebKit::WebViewImpl> _impl;
RetainPtr<WKTextFinderClient> _textFinderClient;
Expand Down Expand Up @@ -361,6 +374,12 @@ struct PerWebProcessState {
- (void)_storeAppHighlight:(const WebCore::AppHighlight&)info;
#endif

#if ENABLE(UNIFIED_TEXT_REPLACEMENT)
- (void)_textReplacementSession:(NSUUID *)sessionUUID showInformationForReplacementWithUUID:(NSUUID *)replacementUUID relativeToRect:(CGRect)rect;

- (void)_textReplacementSession:(NSUUID *)sessionUUID updateState:(WebKit::WebTextReplacementDataState)state forReplacementWithUUID:(NSUUID *)replacementUUID;
#endif

- (void)_internalDoAfterNextPresentationUpdate:(void (^)(void))updateBlock withoutWaitingForPainting:(BOOL)withoutWaitingForPainting withoutWaitingForAnimatedResize:(BOOL)withoutWaitingForAnimatedResize;

- (void)_doAfterNextVisibleContentRectAndPresentationUpdate:(void (^)(void))updateBlock;
Expand Down
6 changes: 6 additions & 0 deletions Source/WebKit/UIProcess/Cocoa/PageClientImplCocoa.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,12 @@ class PageClientImplCocoa : public PageClient {

WindowKind windowKind() final;

#if ENABLE(UNIFIED_TEXT_REPLACEMENT)
void textReplacementSessionShowInformationForReplacementWithUUIDRelativeToRect(const WTF::UUID& sessionUUID, const WTF::UUID& replacementUUID, WebCore::IntRect selectionBoundsInRootView) final;

void textReplacementSessionUpdateStateForReplacementWithUUID(const WTF::UUID& sessionUUID, WebTextReplacementDataState, const WTF::UUID& replacementUUID) final;
#endif

protected:
RetainPtr<WKWebView> webView() const { return m_webView.get(); }

Expand Down
12 changes: 12 additions & 0 deletions Source/WebKit/UIProcess/Cocoa/PageClientImplCocoa.mm
Original file line number Diff line number Diff line change
Expand Up @@ -272,4 +272,16 @@
return WindowKind::Normal;
}

#if ENABLE(UNIFIED_TEXT_REPLACEMENT)
void PageClientImplCocoa::textReplacementSessionShowInformationForReplacementWithUUIDRelativeToRect(const WTF::UUID& sessionUUID, const WTF::UUID& replacementUUID, WebCore::IntRect selectionBoundsInRootView)
{
[m_webView _textReplacementSession:sessionUUID showInformationForReplacementWithUUID:replacementUUID relativeToRect:selectionBoundsInRootView];
}

void PageClientImplCocoa::textReplacementSessionUpdateStateForReplacementWithUUID(const WTF::UUID& sessionUUID, WebTextReplacementDataState state, const WTF::UUID& replacementUUID)
{
[m_webView _textReplacementSession:sessionUUID updateState:state forReplacementWithUUID:replacementUUID];
}
#endif

}
10 changes: 10 additions & 0 deletions Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm
Original file line number Diff line number Diff line change
Expand Up @@ -1176,6 +1176,16 @@ static bool exceedsRenderTreeSizeSizeThreshold(uint64_t thresholdSize, uint64_t
send(Messages::WebPage::TextReplacementSessionDidReceiveEditAction(uuid, action));
}

void WebPageProxy::textReplacementSessionShowInformationForReplacementWithUUIDRelativeToRect(const WTF::UUID& sessionUUID, const WTF::UUID& replacementUUID, WebCore::IntRect selectionBoundsInRootView)
{
protectedPageClient()->textReplacementSessionShowInformationForReplacementWithUUIDRelativeToRect(sessionUUID, replacementUUID, selectionBoundsInRootView);
}

void WebPageProxy::textReplacementSessionUpdateStateForReplacementWithUUID(const WTF::UUID& sessionUUID, WebTextReplacementData::State state, const WTF::UUID& replacementUUID)
{
protectedPageClient()->textReplacementSessionUpdateStateForReplacementWithUUID(sessionUUID, state, replacementUUID);
}

#endif

} // namespace WebKit
Expand Down
7 changes: 7 additions & 0 deletions Source/WebKit/UIProcess/PageClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ namespace WebKit {

enum class UndoOrRedo : bool;
enum class TapHandlingResult : uint8_t;
enum class WebTextReplacementDataState : uint8_t;

class ContextMenuContextData;
class DrawingAreaProxy;
Expand Down Expand Up @@ -702,6 +703,12 @@ class PageClient : public CanMakeWeakPtr<PageClient> {
virtual void handleContextMenuSwapCharacters(WebCore::IntRect selectionBoundsInRootView) = 0;
#endif

#if ENABLE(UNIFIED_TEXT_REPLACEMENT)
virtual void textReplacementSessionShowInformationForReplacementWithUUIDRelativeToRect(const WTF::UUID& sessionUUID, const WTF::UUID& replacementUUID, WebCore::IntRect selectionBoundsInRootView) = 0;

virtual void textReplacementSessionUpdateStateForReplacementWithUUID(const WTF::UUID& sessionUUID, WebTextReplacementDataState, const WTF::UUID& replacementUUID) = 0;
#endif

#if ENABLE(DATA_DETECTION)
virtual void handleClickForDataDetectionResult(const WebCore::DataDetectorElementInfo&, const WebCore::IntPoint&) { }
#endif
Expand Down
4 changes: 4 additions & 0 deletions Source/WebKit/UIProcess/WebPageProxy.h
Original file line number Diff line number Diff line change
Expand Up @@ -2230,6 +2230,10 @@ class WebPageProxy final : public API::ObjectImpl<API::Object::Type::Page>, publ

#if ENABLE(UNIFIED_TEXT_REPLACEMENT)
void handleContextMenuSwapCharacters(WebCore::IntRect selectionBoundsInRootView);

void textReplacementSessionShowInformationForReplacementWithUUIDRelativeToRect(const WTF::UUID& sessionUUID, const WTF::UUID& replacementUUID, WebCore::IntRect selectionBoundsInRootView);

void textReplacementSessionUpdateStateForReplacementWithUUID(const WTF::UUID& sessionUUID, WebTextReplacementDataState, const WTF::UUID& replacementUUID);
#endif

#if ENABLE(MEDIA_SESSION_COORDINATOR)
Expand Down
6 changes: 6 additions & 0 deletions Source/WebKit/UIProcess/WebPageProxy.messages.in
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,12 @@ messages -> WebPageProxy {
HandleContextMenuSwapCharacters(WebCore::IntRect selectionBoundsInRootView)
#endif

#if ENABLE(UNIFIED_TEXT_REPLACEMENT)
TextReplacementSessionShowInformationForReplacementWithUUIDRelativeToRect(WTF::UUID sessionUUID, WTF::UUID replacementUUID, WebCore::IntRect selectionBoundsInRootView)

TextReplacementSessionUpdateStateForReplacementWithUUID(WTF::UUID sessionUUID, enum:uint8_t WebKit::WebTextReplacementDataState state, WTF::UUID replacementUUID)
#endif

#if ENABLE(MEDIA_CONTROLS_CONTEXT_MENUS) && USE(UICONTEXTMENU)
ShowMediaControlsContextMenu(WebCore::FloatRect targetFrame, Vector<WebCore::MediaControlsContextMenuItem> items) -> (WebCore::MediaControlsContextMenuItem::ID selectedItemID)
#endif // ENABLE(MEDIA_CONTROLS_CONTEXT_MENUS) && USE(UICONTEXTMENU)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include <WebCore/DocumentMarkerController.h>
#include <WebCore/Editor.h>
#include <WebCore/FocusController.h>
#include <WebCore/GeometryUtilities.h>
#include <WebCore/HTMLConverter.h>
#include <WebCore/RenderedDocumentMarker.h>
#include <WebCore/SimpleRange.h>
Expand Down Expand Up @@ -104,6 +105,30 @@ static void replaceContentsInRange(WebCore::Document& document, const WebCore::S
return std::nullopt;
}

static std::optional<std::tuple<WebCore::Node&, WebCore::DocumentMarker&>> findReplacementMarkerContainingRange(WebCore::Document& document, const WebCore::SimpleRange& range)
{
RefPtr<WebCore::Node> targetNode;
WeakPtr<WebCore::DocumentMarker> targetMarker;

document.markers().forEachOfTypes({ WebCore::DocumentMarker::Type::UnifiedTextReplacement }, [&range, &targetNode, &targetMarker] (auto& node, auto& marker) mutable {
auto data = std::get<WebCore::DocumentMarker::UnifiedTextReplacementData>(marker.data());

auto markerRange = WebCore::makeSimpleRange(node, marker);
if (!WebCore::contains(WebCore::TreeType::ComposedTree, markerRange, range))
return false;

targetNode = &node;
targetMarker = &marker;

return true;
});

if (targetNode && targetMarker)
return { { *targetNode, *targetMarker } };

return std::nullopt;
}

UnifiedTextReplacementController::UnifiedTextReplacementController(WebPage& webPage)
: m_webPage(webPage)
{
Expand Down Expand Up @@ -225,7 +250,7 @@ static void replaceContentsInRange(WebCore::Document& document, const WebCore::S
auto newRangeWithOffset = WebCore::CharacterRange { locationWithOffset, replacementData.replacement.length() };
auto newResolvedRange = resolveCharacterRange(*sessionRange, newRangeWithOffset);

auto markerData = WebCore::DocumentMarker::UnifiedTextReplacementData { replacementData.originalString.string, replacementData.uuid, WebCore::DocumentMarker::UnifiedTextReplacementData::State::Pending };
auto markerData = WebCore::DocumentMarker::UnifiedTextReplacementData { replacementData.originalString.string, replacementData.uuid, uuid, WebCore::DocumentMarker::UnifiedTextReplacementData::State::Pending };
addMarker(newResolvedRange, WebCore::DocumentMarker::Type::UnifiedTextReplacement, markerData);

additionalOffset += replacementData.replacement.length() - replacementData.originalRange.length;
Expand Down Expand Up @@ -257,7 +282,7 @@ static void replaceContentsInRange(WebCore::Document& document, const WebCore::S
return;
}

if (state != WebTextReplacementData::State::Committed && state != WebTextReplacementData::State::Reverted)
if (state != WebTextReplacementData::State::Committed && state != WebTextReplacementData::State::Reverted && state != WebTextReplacementData::State::Active)
return;

auto nodeAndMarker = findReplacementMarkerByUUID(*document, replacement.uuid);
Expand All @@ -268,7 +293,14 @@ static void replaceContentsInRange(WebCore::Document& document, const WebCore::S

auto& [node, marker] = *nodeAndMarker;

auto rangeToReplace = makeSimpleRange(node, marker);
auto rangeToReplace = WebCore::makeSimpleRange(node, marker);

if (state == WebTextReplacementData::State::Active) {
auto rect = frame->view()->contentsToRootView(WebCore::unionRect(WebCore::RenderObject::absoluteTextRects(rangeToReplace)));
m_webPage->textReplacementSessionShowInformationForReplacementWithUUIDRelativeToRect(uuid, replacement.uuid, rect);

return;
}

auto data = std::get<WebCore::DocumentMarker::UnifiedTextReplacementData>(marker.data());

Expand Down Expand Up @@ -521,7 +553,7 @@ static void replaceContentsInRange(WebCore::Document& document, const WebCore::S

replaceTextInRange(document, rangeToReplace, previousText);

auto newData = WebCore::DocumentMarker::UnifiedTextReplacementData { currentText, oldData.uuid, newState };
auto newData = WebCore::DocumentMarker::UnifiedTextReplacementData { currentText, oldData.uuid, uuid, newState };
auto newOffsetRange = WebCore::OffsetRange { offsetRange.start, offsetRange.end + previousText.length() - currentText.length() };

document.markers().addMarker(node, WebCore::DocumentMarker { WebCore::DocumentMarker::Type::UnifiedTextReplacement, newOffsetRange, WTFMove(newData) });
Expand Down Expand Up @@ -619,6 +651,54 @@ static void replaceContentsInRange(WebCore::Document& document, const WebCore::S
}
}

void UnifiedTextReplacementController::updateStateForSelectedReplacementIfNeeded()
{
// Optimization: If there are no ongoing sessions, there is no need for any of this logic to
// be executed, since there will be no relevant document markers anyways.
if (m_contextRanges.isEmpty())
return;

if (!m_webPage) {
ASSERT_NOT_REACHED();
return;
}

RefPtr corePage = m_webPage->corePage();
if (!corePage) {
ASSERT_NOT_REACHED();
return;
}

RefPtr frame = corePage->checkedFocusController()->focusedOrMainFrame();
if (!frame) {
ASSERT_NOT_REACHED();
return;
}

RefPtr document = frame->document();
if (!document) {
ASSERT_NOT_REACHED();
return;
}

auto selectionRange = document->selection().selection().firstRange();
if (!selectionRange)
return;

auto nodeAndMarker = findReplacementMarkerContainingRange(*document, *selectionRange);
if (!nodeAndMarker)
return;

auto& [node, marker] = *nodeAndMarker;
auto markerRange = WebCore::makeSimpleRange(node, marker);

auto data = std::get<WebCore::DocumentMarker::UnifiedTextReplacementData>(marker.data());
auto rect = frame->view()->contentsToRootView(WebCore::unionRect(WebCore::RenderObject::absoluteTextRects(markerRange)));

m_webPage->textReplacementSessionUpdateStateForReplacementWithUUID(data.sessionUUID, WebTextReplacementData::State::Active, data.uuid);
m_webPage->textReplacementSessionShowInformationForReplacementWithUUIDRelativeToRect(data.sessionUUID, data.uuid, rect);
}

} // namespace WebKit

#endif
10 changes: 10 additions & 0 deletions Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm
Original file line number Diff line number Diff line change
Expand Up @@ -937,6 +937,16 @@
m_unifiedTextReplacementController->textReplacementSessionDidReceiveEditAction(uuid, action);
}

void WebPage::textReplacementSessionShowInformationForReplacementWithUUIDRelativeToRect(const WTF::UUID& sessionUUID, const WTF::UUID& replacementUUID, WebCore::IntRect rect)
{
send(Messages::WebPageProxy::TextReplacementSessionShowInformationForReplacementWithUUIDRelativeToRect(sessionUUID, replacementUUID, rect));
}

void WebPage::textReplacementSessionUpdateStateForReplacementWithUUID(const WTF::UUID& sessionUUID, WebTextReplacementData::State state, const WTF::UUID& replacementUUID)
{
send(Messages::WebPageProxy::TextReplacementSessionUpdateStateForReplacementWithUUID(sessionUUID, state, replacementUUID));
}

#endif

std::optional<SimpleRange> WebPage::autocorrectionContextRange()
Expand Down
Loading

0 comments on commit 6b5423c

Please sign in to comment.