Have insertDictatedTextAsync() take an InsertTextOptions
authordbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Mar 2020 22:45:25 +0000 (22:45 +0000)
committerdbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Mar 2020 22:45:25 +0000 (22:45 +0000)
commit6f64a9106915cb3931c150017fe05cbc4e23f3c3
tree17855ca37b0407cb0bf975ea1cbb23fcb0495f52
parent3151221012fd0a30eec2472763f0706391d2fae3
Have insertDictatedTextAsync() take an InsertTextOptions
https://bugs.webkit.org/show_bug.cgi?id=209308
<rdar://problem/60652838>

Reviewed by Darin Adler.

This will provide future extensibility, which I plan to make use of in a subsequent patch,
in addition to making the interface for insertDictatedTextAsync() more like insertTextAsync().

* UIProcess/Cocoa/WebPageProxyCocoa.mm:
(WebKit::WebPageProxy::insertDictatedTextAsync): Pass the options through. The caller is now
responsible for setting the registerUndoGroup insertion option.
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::insertText): Stack-allocate a InsertTextOptions setting its registerUndoGroup
field and pass this object through.
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView insertText:alternatives:style:]): Pass the default constructed InsertTextOptions,
which defaults registerUndoGroup to false to keep the current behavior.
* WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
(WebKit::WebPage::insertDictatedTextAsync): Write in terms of InsertTextOptions.registerUndoGroup.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258796 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm
Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm
Source/WebKit/UIProcess/WebPageProxy.h
Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm
Source/WebKit/WebProcess/WebPage/WebPage.h
Source/WebKit/WebProcess/WebPage/WebPage.messages.in