Add a mechanism to notify the UIProcess when an editing command is done executing.
authorenrica@apple.com <enrica@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 Jul 2014 23:26:19 +0000 (23:26 +0000)
committerenrica@apple.com <enrica@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 Jul 2014 23:26:19 +0000 (23:26 +0000)
https://bugs.webkit.org/show_bug.cgi?id=134807

Reviewed by Tim Horton.

Some editing commands have an effect on some parts of the system that
run inside the UIProcess. A good example are the cursor movement commands
that require an update of the autocorrection/autosuggestion machinery.
This patch adds a way to reliably know when the command has been executed
in the WebProcess. A previous attempt at solving this problem was added in
r170858 and was partially reverted in r170948.
The change also removes the selectionWillChange notification added in r170858.

* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::editorStateChanged):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::selectionWillChange): Deleted.
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView executeEditCommandWithCallback:]):
(-[WKContentView _moveUp:withHistory:]):
(-[WKContentView _moveDown:withHistory:]):
(-[WKContentView _moveLeft:withHistory:]):
(-[WKContentView _moveRight:withHistory:]):
(-[WKContentView _moveToStartOfWord:withHistory:]):
(-[WKContentView _moveToStartOfParagraph:withHistory:]):
(-[WKContentView _moveToStartOfLine:withHistory:]):
(-[WKContentView _moveToStartOfDocument:withHistory:]):
(-[WKContentView _moveToEndOfWord:withHistory:]):
(-[WKContentView _moveToEndOfParagraph:withHistory:]):
(-[WKContentView _moveToEndOfLine:withHistory:]):
(-[WKContentView _moveToEndOfDocument:withHistory:]):
(-[WKContentView _selectionWillChange]): Deleted.
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::executeEditCommand):
(WebKit::WebPageProxy::notifySelectionWillChange): Deleted.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::executeEditCommandWithCallback):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170981 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 files changed:
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/PageClient.h
Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/UIProcess/ios/PageClientImplIOS.h
Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm
Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h
Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm
Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm
Source/WebKit2/WebProcess/WebPage/WebPage.h
Source/WebKit2/WebProcess/WebPage/WebPage.messages.in
Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm

index 87abbb8d1c1e1065a80c07832c6b6782e74be3cd..774ffbbab9d867ed42cfa6334ed19d48ff945cf2 100644 (file)
@@ -1,3 +1,49 @@
+2014-07-10  Enrica Casucci  <enrica@apple.com>
+
+        Add a mechanism to notify the UIProcess when an editing command is done executing.
+        https://bugs.webkit.org/show_bug.cgi?id=134807
+
+        Reviewed by Tim Horton.
+
+        Some editing commands have an effect on some parts of the system that
+        run inside the UIProcess. A good example are the cursor movement commands
+        that require an update of the autocorrection/autosuggestion machinery.
+        This patch adds a way to reliably know when the command has been executed
+        in the WebProcess. A previous attempt at solving this problem was added in
+        r170858 and was partially reverted in r170948.
+        The change also removes the selectionWillChange notification added in r170858.
+
+        * UIProcess/PageClient.h:
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::editorStateChanged):
+        * UIProcess/WebPageProxy.h:
+        * UIProcess/ios/PageClientImplIOS.h:
+        * UIProcess/ios/PageClientImplIOS.mm:
+        (WebKit::PageClientImpl::selectionWillChange): Deleted.
+        * UIProcess/ios/WKContentViewInteraction.h:
+        * UIProcess/ios/WKContentViewInteraction.mm:
+        (-[WKContentView executeEditCommandWithCallback:]):
+        (-[WKContentView _moveUp:withHistory:]):
+        (-[WKContentView _moveDown:withHistory:]):
+        (-[WKContentView _moveLeft:withHistory:]):
+        (-[WKContentView _moveRight:withHistory:]):
+        (-[WKContentView _moveToStartOfWord:withHistory:]):
+        (-[WKContentView _moveToStartOfParagraph:withHistory:]):
+        (-[WKContentView _moveToStartOfLine:withHistory:]):
+        (-[WKContentView _moveToStartOfDocument:withHistory:]):
+        (-[WKContentView _moveToEndOfWord:withHistory:]):
+        (-[WKContentView _moveToEndOfParagraph:withHistory:]):
+        (-[WKContentView _moveToEndOfLine:withHistory:]):
+        (-[WKContentView _moveToEndOfDocument:withHistory:]):
+        (-[WKContentView _selectionWillChange]): Deleted.
+        * UIProcess/ios/WebPageProxyIOS.mm:
+        (WebKit::WebPageProxy::executeEditCommand):
+        (WebKit::WebPageProxy::notifySelectionWillChange): Deleted.
+        * WebProcess/WebPage/WebPage.h:
+        * WebProcess/WebPage/WebPage.messages.in:
+        * WebProcess/WebPage/ios/WebPageIOS.mm:
+        (WebKit::WebPage::executeEditCommandWithCallback):
+
 2014-07-10  Joseph Pecoraro  <pecoraro@apple.com>
 
         [Mac] NSWindow warning: adding an unknown subview opening detached Inspector
 2014-07-10  Joseph Pecoraro  <pecoraro@apple.com>
 
         [Mac] NSWindow warning: adding an unknown subview opening detached Inspector
index 39eeb1306f42bb54741469d5d7bb0c958d0764fc..b08f69088c937adec0bb42ed9b9c44cec070debe 100644 (file)
@@ -259,7 +259,6 @@ public:
 
     virtual void startAssistingNode(const AssistedNodeInformation&, bool userIsInteracting, bool blurPreviousNode, API::Object* userData) = 0;
     virtual void stopAssistingNode() = 0;
 
     virtual void startAssistingNode(const AssistedNodeInformation&, bool userIsInteracting, bool blurPreviousNode, API::Object* userData) = 0;
     virtual void stopAssistingNode() = 0;
-    virtual void selectionWillChange() = 0;
     virtual void selectionDidChange() = 0;
     virtual bool interpretKeyEvent(const NativeWebKeyboardEvent&, bool isCharEvent) = 0;
     virtual void positionInformationDidChange(const InteractionInformationAtPosition&) = 0;
     virtual void selectionDidChange() = 0;
     virtual bool interpretKeyEvent(const NativeWebKeyboardEvent&, bool isCharEvent) = 0;
     virtual void positionInformationDidChange(const InteractionInformationAtPosition&) = 0;
index 3d98714bcf09fcf30da1519d9e3ba3d64454f219..b848695f77fac14c3285996fceabdf3c07258917 100644 (file)
@@ -3436,9 +3436,6 @@ void WebPageProxy::editorStateChanged(const EditorState& editorState)
     m_temporarilyClosedComposition = editorState.shouldIgnoreCompositionSelectionChange && (m_temporarilyClosedComposition || m_editorState.hasComposition) && !editorState.hasComposition;
 #endif
 
     m_temporarilyClosedComposition = editorState.shouldIgnoreCompositionSelectionChange && (m_temporarilyClosedComposition || m_editorState.hasComposition) && !editorState.hasComposition;
 #endif
 
-#if PLATFORM(IOS)
-    notifySelectionWillChange();
-#endif
     m_editorState = editorState;
 
 #if PLATFORM(COCOA)
     m_editorState = editorState;
 
 #if PLATFORM(COCOA)
index 42177c1baf612d0e1547eaf6a8baf774986a037a..15f0c712aa1e459f0dce18a4e9faf4e5c0195505 100644 (file)
@@ -377,6 +377,7 @@ public:
     void executeEditCommand(const String& commandName);
     void validateCommand(const String& commandName, std::function<void (const String&, bool, int32_t, CallbackBase::Error)>);
 #if PLATFORM(IOS)
     void executeEditCommand(const String& commandName);
     void validateCommand(const String& commandName, std::function<void (const String&, bool, int32_t, CallbackBase::Error)>);
 #if PLATFORM(IOS)
+    void executeEditCommand(const String& commandName, std::function<void (CallbackBase::Error)>);
     double displayedContentScale() const { return m_lastVisibleContentRectUpdate.scale(); }
     const WebCore::FloatRect& exposedContentRect() const { return m_lastVisibleContentRectUpdate.exposedRect(); }
     const WebCore::FloatRect& unobscuredContentRect() const { return m_lastVisibleContentRectUpdate.unobscuredRect(); }
     double displayedContentScale() const { return m_lastVisibleContentRectUpdate.scale(); }
     const WebCore::FloatRect& exposedContentRect() const { return m_lastVisibleContentRectUpdate.exposedRect(); }
     const WebCore::FloatRect& unobscuredContentRect() const { return m_lastVisibleContentRectUpdate.unobscuredRect(); }
@@ -1222,7 +1223,6 @@ private:
     void enableInspectorNodeSearch();
     void disableInspectorNodeSearch();
 #endif
     void enableInspectorNodeSearch();
     void disableInspectorNodeSearch();
 #endif
-    void notifySelectionWillChange();
     void notifyRevealedSelection();
 #endif // PLATFORM(IOS)
 
     void notifyRevealedSelection();
 #endif // PLATFORM(IOS)
 
index 3a3199684f2c1ba92e9d895e0dd2b35a5b6c1111..cacff2c1a7632c0e7d874e6be127439817462f6b 100644 (file)
@@ -119,7 +119,6 @@ private:
 
     virtual void startAssistingNode(const AssistedNodeInformation&, bool userIsInteracting, bool blurPreviousNode, API::Object* userData) override;
     virtual void stopAssistingNode() override;
 
     virtual void startAssistingNode(const AssistedNodeInformation&, bool userIsInteracting, bool blurPreviousNode, API::Object* userData) override;
     virtual void stopAssistingNode() override;
-    virtual void selectionWillChange() override;
     virtual void selectionDidChange() override;
     virtual bool interpretKeyEvent(const NativeWebKeyboardEvent&, bool isCharEvent) override;
     virtual void positionInformationDidChange(const InteractionInformationAtPosition&) override;
     virtual void selectionDidChange() override;
     virtual bool interpretKeyEvent(const NativeWebKeyboardEvent&, bool isCharEvent) override;
     virtual void positionInformationDidChange(const InteractionInformationAtPosition&) override;
index 64fe0c87acd855986e8826eb9f4c1968fb817bc2..e89752b9a0a0fc77d804d1edebdb253292b17765 100644 (file)
@@ -350,11 +350,6 @@ void PageClientImpl::setDragImage(const IntPoint&, PassRefPtr<ShareableBitmap>,
     notImplemented();
 }
 
     notImplemented();
 }
 
-void PageClientImpl::selectionWillChange()
-{
-    [m_contentView _selectionWillChange];
-}
-
 void PageClientImpl::selectionDidChange()
 {
     [m_contentView _selectionChanged];
 void PageClientImpl::selectionDidChange()
 {
     [m_contentView _selectionChanged];
index b7ebf76cb04aef59fef91a1f6e0e18abba0eed5c..f491ea0b498dc93bf42e901289f6c2fdbf7afc79 100644 (file)
@@ -164,7 +164,6 @@ struct WKAutoCorrectionData {
 
 - (void)_startAssistingNode:(const WebKit::AssistedNodeInformation&)information userIsInteracting:(BOOL)userIsInteracting blurPreviousNode:(BOOL)blurPreviousNode userObject:(NSObject <NSSecureCoding> *)userObject;
 - (void)_stopAssistingNode;
 
 - (void)_startAssistingNode:(const WebKit::AssistedNodeInformation&)information userIsInteracting:(BOOL)userIsInteracting blurPreviousNode:(BOOL)blurPreviousNode userObject:(NSObject <NSSecureCoding> *)userObject;
 - (void)_stopAssistingNode;
-- (void)_selectionWillChange;
 - (void)_selectionChanged;
 - (void)_updateChangedSelection;
 - (BOOL)_interpretKeyEvent:(WebIOSEvent *)theEvent isCharEvent:(BOOL)isCharEvent;
 - (void)_selectionChanged;
 - (void)_updateChangedSelection;
 - (BOOL)_interpretKeyEvent:(WebIOSEvent *)theEvent isCharEvent:(BOOL)isCharEvent;
index 84c4cd1e6008ffd9220c3740c92036b267a92ec5..1786c00ededd84cd9bbb4e411887cfe8e1556d76 100644 (file)
@@ -2225,75 +2225,83 @@ static UITextAutocapitalizationType toUITextAutocapitalize(WebAutocapitalizeType
     return NO;
 }
 
     return NO;
 }
 
+- (void)executeEditCommandWithCallback:(NSString *)commandName
+{
+    [self beginSelectionChange];
+    _page->executeEditCommand(commandName, [self](CallbackBase::Error) {
+        [self endSelectionChange];
+    });
+}
+
 - (UITextInputArrowKeyHistory *)_moveUp:(BOOL)extending withHistory:(UITextInputArrowKeyHistory *)history
 {
 - (UITextInputArrowKeyHistory *)_moveUp:(BOOL)extending withHistory:(UITextInputArrowKeyHistory *)history
 {
-    _page->executeEditCommand(ASCIILiteral("moveUp"));
+    [self executeEditCommandWithCallback:@"moveUp"];
     return nil;
 }
 
 - (UITextInputArrowKeyHistory *)_moveDown:(BOOL)extending withHistory:(UITextInputArrowKeyHistory *)history
 {
     return nil;
 }
 
 - (UITextInputArrowKeyHistory *)_moveDown:(BOOL)extending withHistory:(UITextInputArrowKeyHistory *)history
 {
-    _page->executeEditCommand(ASCIILiteral("moveDown"));
+    [self executeEditCommandWithCallback:@"moveDown"];
     return nil;
 }
 
 - (UITextInputArrowKeyHistory *)_moveLeft:(BOOL) extending withHistory:(UITextInputArrowKeyHistory *)history
 {
     return nil;
 }
 
 - (UITextInputArrowKeyHistory *)_moveLeft:(BOOL) extending withHistory:(UITextInputArrowKeyHistory *)history
 {
-    _page->executeEditCommand(ASCIILiteral("moveLeft"));
+    [self executeEditCommandWithCallback:@"moveLeft"];
     return nil;
 }
 
 - (UITextInputArrowKeyHistory *)_moveRight:(BOOL) extending withHistory:(UITextInputArrowKeyHistory *)history
 {
     return nil;
 }
 
 - (UITextInputArrowKeyHistory *)_moveRight:(BOOL) extending withHistory:(UITextInputArrowKeyHistory *)history
 {
-    _page->executeEditCommand(ASCIILiteral("moveRight"));
+    [self executeEditCommandWithCallback:@"moveRight"];
     return nil;
 }
 
 - (UITextInputArrowKeyHistory *)_moveToStartOfWord:(BOOL)extending withHistory:(UITextInputArrowKeyHistory *)history
 {
     return nil;
 }
 
 - (UITextInputArrowKeyHistory *)_moveToStartOfWord:(BOOL)extending withHistory:(UITextInputArrowKeyHistory *)history
 {
-    _page->executeEditCommand(ASCIILiteral("moveWordBackward"));
+    [self executeEditCommandWithCallback:@"moveWordBackward"];
     return nil;
 }
 
 - (UITextInputArrowKeyHistory *)_moveToStartOfParagraph:(BOOL) extending withHistory:(UITextInputArrowKeyHistory *)history
 {
     return nil;
 }
 
 - (UITextInputArrowKeyHistory *)_moveToStartOfParagraph:(BOOL) extending withHistory:(UITextInputArrowKeyHistory *)history
 {
-    _page->executeEditCommand(ASCIILiteral("moveToStartOfParagraph"));
+    [self executeEditCommandWithCallback:@"moveToStartOfParagraph"];
     return nil;
 }
 
 - (UITextInputArrowKeyHistory *)_moveToStartOfLine:(BOOL) extending withHistory:(UITextInputArrowKeyHistory *)history
 {
     return nil;
 }
 
 - (UITextInputArrowKeyHistory *)_moveToStartOfLine:(BOOL) extending withHistory:(UITextInputArrowKeyHistory *)history
 {
-    _page->executeEditCommand(ASCIILiteral("moveToStartOfLine"));
+    [self executeEditCommandWithCallback:@"moveToStartOfLine"];
     return nil;
 }
 
 - (UITextInputArrowKeyHistory *)_moveToStartOfDocument:(BOOL) extending withHistory:(UITextInputArrowKeyHistory *)history
 {
     return nil;
 }
 
 - (UITextInputArrowKeyHistory *)_moveToStartOfDocument:(BOOL) extending withHistory:(UITextInputArrowKeyHistory *)history
 {
-    _page->executeEditCommand(ASCIILiteral("moveToBeginningOfDocument"));
+    [self executeEditCommandWithCallback:@"moveToBeginningOfDocument"];
     return nil;
 }
 
 - (UITextInputArrowKeyHistory *)_moveToEndOfWord:(BOOL)extending withHistory:(UITextInputArrowKeyHistory *)history
 {
     return nil;
 }
 
 - (UITextInputArrowKeyHistory *)_moveToEndOfWord:(BOOL)extending withHistory:(UITextInputArrowKeyHistory *)history
 {
-    _page->executeEditCommand(ASCIILiteral("moveWordForward"));
+    [self executeEditCommandWithCallback:@"moveWordForward"];
     return nil;
 }
 
 - (UITextInputArrowKeyHistory *)_moveToEndOfParagraph:(BOOL) extending withHistory:(UITextInputArrowKeyHistory *)history
 {
     return nil;
 }
 
 - (UITextInputArrowKeyHistory *)_moveToEndOfParagraph:(BOOL) extending withHistory:(UITextInputArrowKeyHistory *)history
 {
-    _page->executeEditCommand(ASCIILiteral("moveToEndOfParagraph"));
+    [self executeEditCommandWithCallback:@"moveToEndOfParagraph"];
     return nil;
 }
 
 - (UITextInputArrowKeyHistory *)_moveToEndOfLine:(BOOL) extending withHistory:(UITextInputArrowKeyHistory *)history
 {
     return nil;
 }
 
 - (UITextInputArrowKeyHistory *)_moveToEndOfLine:(BOOL) extending withHistory:(UITextInputArrowKeyHistory *)history
 {
-    _page->executeEditCommand(ASCIILiteral("moveToEndOfLine"));
+    [self executeEditCommandWithCallback:@"moveToEndOfLine"];
     return nil;
 }
 
 - (UITextInputArrowKeyHistory *)_moveToEndOfDocument:(BOOL) extending withHistory:(UITextInputArrowKeyHistory *)history
 {
     return nil;
 }
 
 - (UITextInputArrowKeyHistory *)_moveToEndOfDocument:(BOOL) extending withHistory:(UITextInputArrowKeyHistory *)history
 {
-    _page->executeEditCommand(ASCIILiteral("moveToEndOfDocument"));
+    [self executeEditCommandWithCallback:@"moveToEndOfDocument"];
     return nil;
 }
 
     return nil;
 }
 
@@ -2504,10 +2512,6 @@ static UITextAutocapitalizationType toUITextAutocapitalize(WebAutocapitalizeType
     [_webSelectionAssistant resignedFirstResponder];
 }
 
     [_webSelectionAssistant resignedFirstResponder];
 }
 
-- (void)_selectionWillChange
-{
-}
-
 - (void)_selectionChanged
 {
     _selectionNeedsUpdate = YES;
 - (void)_selectionChanged
 {
     _selectionNeedsUpdate = YES;
index c0b0c51cb31aa735c0f4f2b4bcac2cbf8f7c5940..930394f392e1fa15fd955f8fe66de16b26d2c036 100644 (file)
@@ -359,6 +359,17 @@ void WebPageProxy::applyAutocorrection(const String& correction, const String& o
     m_process->send(Messages::WebPage::ApplyAutocorrection(correction, originalText, callbackID), m_pageID);
 }
 
     m_process->send(Messages::WebPage::ApplyAutocorrection(correction, originalText, callbackID), m_pageID);
 }
 
+void WebPageProxy::executeEditCommand(const String& commandName, std::function<void (CallbackBase::Error)> callbackFunction)
+{
+    if (!isValid()) {
+        callbackFunction(CallbackBase::Error::Unknown);
+        return;
+    }
+    
+    uint64_t callbackID = m_callbacks.put(WTF::move(callbackFunction), std::make_unique<ProcessThrottler::BackgroundActivityToken>(m_process->throttler()));
+    m_process->send(Messages::WebPage::ExecuteEditCommandWithCallback(commandName, callbackID), m_pageID);
+}
+
 bool WebPageProxy::applyAutocorrection(const String& correction, const String& originalText)
 {
     bool autocorrectionApplied = false;
 bool WebPageProxy::applyAutocorrection(const String& correction, const String& originalText)
 {
     bool autocorrectionApplied = false;
@@ -466,11 +477,6 @@ void WebPageProxy::applicationDidBecomeActive()
     m_process->send(Messages::WebPage::ApplicationDidBecomeActive(), m_pageID);
 }
 
     m_process->send(Messages::WebPage::ApplicationDidBecomeActive(), m_pageID);
 }
 
-void WebPageProxy::notifySelectionWillChange()
-{
-    m_pageClient.selectionWillChange();
-}
-
 void WebPageProxy::notifyRevealedSelection()
 {
     m_pageClient.selectionDidChange();
 void WebPageProxy::notifyRevealedSelection()
 {
     m_pageClient.selectionDidChange();
index 7f323ede519121866a2b002051e898954cd58c77..82864dc7563089f744291438661ee9698f53b2d1 100644 (file)
@@ -507,6 +507,7 @@ public:
 
     void dispatchAsynchronousTouchEvents(const Vector<WebTouchEvent, 1>& queue);
     void contentSizeCategoryDidChange(const String&);
 
     void dispatchAsynchronousTouchEvents(const Vector<WebTouchEvent, 1>& queue);
     void contentSizeCategoryDidChange(const String&);
+    void executeEditCommandWithCallback(const String&, uint64_t callbackID);
 #if ENABLE(INSPECTOR)
     void showInspectorHighlight(const WebCore::Highlight&);
     void hideInspectorHighlight();
 #if ENABLE(INSPECTOR)
     void showInspectorHighlight(const WebCore::Highlight&);
     void hideInspectorHighlight();
index d80797554801b0659e6ab2e807f237ba42376e1f..fc6c09f83d9992edfdc4a9eb545a30160cbedbab 100644 (file)
@@ -85,6 +85,7 @@ messages -> WebPage LegacyReceiver {
     ApplicationWillEnterForeground()
     ApplicationDidBecomeActive()
     ContentSizeCategoryDidChange(String contentSizeCategory)
     ApplicationWillEnterForeground()
     ApplicationDidBecomeActive()
     ContentSizeCategoryDidChange(String contentSizeCategory)
+    ExecuteEditCommandWithCallback(String name, uint64_t callbackID)
 #endif
 
 #if ENABLE(REMOTE_INSPECTOR)
 #endif
 
 #if ENABLE(REMOTE_INSPECTOR)
index f3b77bc7eb6cb012e2814b53c1d4ab22cc3b0556..772881dfc90c84b130667fcc25bee21eca073d14 100644 (file)
@@ -1666,6 +1666,12 @@ void WebPage::applyAutocorrection(const String& correction, const String& origin
     send(Messages::WebPageProxy::StringCallback(correctionApplied ? correction : String(), callbackID));
 }
 
     send(Messages::WebPageProxy::StringCallback(correctionApplied ? correction : String(), callbackID));
 }
 
+void WebPage::executeEditCommandWithCallback(const String& commandName, uint64_t callbackID)
+{
+    executeEditCommand(commandName);
+    send(Messages::WebPageProxy::VoidCallback(callbackID));
+}
+
 void WebPage::syncApplyAutocorrection(const String& correction, const String& originalText, bool& correctionApplied)
 {
     RefPtr<Range> range;
 void WebPage::syncApplyAutocorrection(const String& correction, const String& originalText, bool& correctionApplied)
 {
     RefPtr<Range> range;