RESOLVED FIXED157190
AX: CharacterOffset not working correctly with composed characters and collapsed white spaces
https://bugs.webkit.org/show_bug.cgi?id=157190
Summary AX: CharacterOffset not working correctly with composed characters and collap...
Nan Wang
Reported 2016-04-29 11:01:08 PDT
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>
Attachments
Initial patch (16.64 KB, patch)
2016-04-29 11:13 PDT, Nan Wang
no flags
patch (19.82 KB, patch)
2016-04-29 11:59 PDT, Nan Wang
no flags
Nan Wang
Comment 1 2016-04-29 11:13:35 PDT
Created attachment 277720 [details] Initial patch
chris fleizach
Comment 2 2016-04-29 11:40:13 PDT
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
Nan Wang
Comment 3 2016-04-29 11:59:44 PDT
Created attachment 277725 [details] patch Applied review comments
WebKit Commit Bot
Comment 4 2016-04-29 13:04:36 PDT
Comment on attachment 277725 [details] patch Clearing flags on attachment: 277725 Committed r200258: <http://trac.webkit.org/changeset/200258>
WebKit Commit Bot
Comment 5 2016-04-29 13:04:41 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.