[iOS] [WK2] Modernize code for applying autocorrection
authorwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Feb 2019 01:45:42 +0000 (01:45 +0000)
committerwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Feb 2019 01:45:42 +0000 (01:45 +0000)
commit2f8866480248efcfa32555f2387d33e9ed87e257
tree61ad11537610d48e6f578c683ef7c1ceba5b051c
parent4fc6fc571ed1bf4c96e46ed2b55b1c2fee1abefd
[iOS] [WK2] Modernize code for applying autocorrection
https://bugs.webkit.org/show_bug.cgi?id=194397

Reviewed by Tim Horton.

* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView requestAutocorrectionRectsForString:withCompletionHandler:]):
(-[WKContentView applyAutocorrection:toString:withCompletionHandler:]):

Use BlockPtr instead of temporarily storing the completion handler.

* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:

Change a LegacySync to Delayed.

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::applyAutocorrection):
(WebKit::WebPage::syncApplyAutocorrection):
(WebKit::WebPage::applyAutocorrectionInternal):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@241180 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/ios/WKContentViewInteraction.h
Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
Source/WebKit/WebProcess/WebPage/WebPage.h
Source/WebKit/WebProcess/WebPage/WebPage.messages.in
Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm