Changeset 247280 in webkit


Ignore:
Timestamp:
Jul 9, 2019 2:45:05 PM (5 years ago)
Author:
Megan Gardner
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):

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r247277 r247280  
     12019-07-09  Megan Gardner  <megan_gardner@apple.com>
     2
     3        Don't strip out spaces for personalized Autocorrections
     4        https://bugs.webkit.org/show_bug.cgi?id=199476
     5        <rdar://problem/50782015>
     6
     7        Reviewed by Dean Jackson.
     8
     9        When inserting 'autocorrections' that are really predictive
     10        text suggestions based on personal data, we would remove the space
     11        before the suggestion, resulting in incorrect input.
     12        To fix, do not remove a space when the autocorrected text and the text it is
     13        replacing do not have any length.
     14
     15        * WebProcess/WebPage/ios/WebPageIOS.mm:
     16        (WebKit::WebPage::applyAutocorrectionInternal):
     17
    1182019-07-09  Truitt Savell  <tsavell@apple.com>
    219
  • trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm

    r247223 r247280  
    23692369    if (correction.length())
    23702370        frame.editor().insertText(correction, 0, originalText.isEmpty() ? TextEventInputKeyboard : TextEventInputAutocompletion);
    2371     else
     2371    else if (originalText.length())
    23722372        frame.editor().deleteWithDirection(DirectionBackward, CharacterGranularity, false, true);
    23732373    return true;
Note: See TracChangeset for help on using the changeset viewer.