Changeset 224201 in webkit
- Timestamp:
- Oct 30, 2017 2:24:37 PM (6 years ago)
- Location:
- trunk/Source
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r224199 r224201 1 2017-10-27 Megan Gardner <megan_gardner@apple.com> 2 3 Correctly determine affinity when inserting text via Keyboard Suggestions 4 https://bugs.webkit.org/show_bug.cgi?id=178969 5 6 Reviewed by Ryosuke Niwa. 7 8 There has been talk about renaming these enums, but in the meantime we should at least have a comment 9 clarifying what they actually mean. 10 11 No new tests only adding a comment, no tests needed. 12 13 * editing/TextAffinity.h: 14 1 15 2017-10-27 Ryosuke Niwa <rniwa@webkit.org> 2 16 -
trunk/Source/WebCore/editing/TextAffinity.h
r208646 r224201 27 27 28 28 namespace WebCore { 29 29 // UPSTREAM means before a line break DOWNSTREAM mean after a line break 30 30 enum EAffinity { UPSTREAM = 0, DOWNSTREAM = 1 }; 31 31 -
trunk/Source/WebKit/ChangeLog
r224198 r224201 1 2017-10-27 Megan Gardner <megan_gardner@apple.com> 2 3 Correctly determine affinity when inserting text via Keyboard Suggestions 4 https://bugs.webkit.org/show_bug.cgi?id=178969 5 6 Reviewed by Ryosuke Niwa. 7 8 Use the logic of VisiblePosition to correctly determine cursor affinity. We were 9 defaulting to upstream, but that in incorrect and resulted in hitting asserts that 10 we should not. This should give us the correct affinity in all cases. 11 12 * WebProcess/WebPage/ios/WebPageIOS.mm: 13 (WebKit::WebPage::syncApplyAutocorrection): 14 1 15 2017-10-30 Commit Queue <commit-queue@webkit.org> 2 16 -
trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm
r224077 r224201 1858 1858 } 1859 1859 1860 frame.selection().setSelectedRange(range.get(), UPSTREAM, true); 1860 // Correctly determine affinity, using logic currently only present in VisiblePosition 1861 EAffinity affinity = DOWNSTREAM; 1862 if (range && range->collapsed()) 1863 affinity = VisiblePosition(range->startPosition(), UPSTREAM).affinity(); 1864 1865 frame.selection().setSelectedRange(range.get(), affinity, true); 1861 1866 if (correction.length()) 1862 1867 frame.editor().insertText(correction, 0, originalText.isEmpty() ? TextEventInputKeyboard : TextEventInputAutocompletion);
Note: See TracChangeset
for help on using the changeset viewer.