Title: [247280] trunk/Source/WebKit
- Revision
- 247280
- Author
- [email protected]
- Date
- 2019-07-09 14:45:05 -0700 (Tue, 09 Jul 2019)
Log Message
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):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (247279 => 247280)
--- trunk/Source/WebKit/ChangeLog 2019-07-09 21:30:05 UTC (rev 247279)
+++ trunk/Source/WebKit/ChangeLog 2019-07-09 21:45:05 UTC (rev 247280)
@@ -1,3 +1,20 @@
+2019-07-09 Megan Gardner <[email protected]>
+
+ 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):
+
2019-07-09 Truitt Savell <[email protected]>
Unreviewed, rolling out r247230.
Modified: trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm (247279 => 247280)
--- trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm 2019-07-09 21:30:05 UTC (rev 247279)
+++ trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm 2019-07-09 21:45:05 UTC (rev 247280)
@@ -2368,7 +2368,7 @@
frame.selection().setSelectedRange(range.get(), affinity, WebCore::FrameSelection::ShouldCloseTyping::Yes);
if (correction.length())
frame.editor().insertText(correction, 0, originalText.isEmpty() ? TextEventInputKeyboard : TextEventInputAutocompletion);
- else
+ else if (originalText.length())
frame.editor().deleteWithDirection(DirectionBackward, CharacterGranularity, false, true);
return true;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes