Don't strip out spaces for personalized Autocorrections
authormegan_gardner@apple.com <megan_gardner@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 Jul 2019 21:45:05 +0000 (21:45 +0000)
committermegan_gardner@apple.com <megan_gardner@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 Jul 2019 21:45:05 +0000 (21:45 +0000)
commitb7cbd0f8e6b9739714582d3e65ad4e65921a9d12
tree7b3f804abb1d4cd9de273b82b99dd52732fd9647
parentf25d0286a87aee10081647b42fd725ef0f41a54d
Don't strip out spaces for personalized Autocorrections
https://bugs.webkit.org/show_bug.cgi?id=199476
<rdar://problem/50782015>

Reviewed by Dean Jackson.

When inserting 'autocorrections' that are really predictive
text suggestions based on personal data, we would remove the space
before the suggestion, resulting in incorrect input.
To fix, do not remove a space when the autocorrected text and the text it is
replacing do not have any length.

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

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247280 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/ChangeLog
Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm