When navigating emoji by character, CharacterOffset is using wrong offset to create Range and result in the bad behavior. Same goes for collapsed white spaces, we should use the real space sequence length to create Range. <rdar://problem/25919648>
Created attachment 277720 [details] Initial patch
Comment on attachment 277720 [details] Initial patch View in context: https://bugs.webkit.org/attachment.cgi?id=277720&action=review > Source/WebCore/ChangeLog:9 > + using the helper function in Position to get the real character count for the composed charecter sequence. charecter -> character > Source/WebCore/ChangeLog:11 > + use the actuall space length to create the CharacterOffset in order to generate valid Range object from it. actuall > Source/WebCore/accessibility/AXObjectCache.cpp:1557 > + // When there's collapsed whitespace, text iterator will only count those spaces as one single space. the text iterator > Source/WebCore/accessibility/AXObjectCache.cpp:1564 > + offsetSoFar += appendLength; offsetSoFar -> cumulativeOffset > Source/WebCore/accessibility/AXObjectCache.cpp:1981 > + Position previousVpDeepPos = previousVisiblePos.deepEquivalent(); Vp looks weird to me can you call this *visiblePosition* > Source/WebCore/accessibility/AXObjectCache.cpp:2058 > + // We don't always move one 'character' a time since there might be composed characters. at a time
Created attachment 277725 [details] patch Applied review comments
Comment on attachment 277725 [details] patch Clearing flags on attachment: 277725 Committed r200258: <http://trac.webkit.org/changeset/200258>
All reviewed patches have been landed. Closing bug.