8c5d1c59e6
https://bugs.webkit.org/show_bug.cgi?id=157190 Reviewed by Chris Fleizach. Source/WebCore: When navigating emoji, next/previous text marker call is only moving by one character. Fixed it by using the helper function in Position to get the real character count for the composed character sequence. Also there's another issue with collapsed white spaces, TextIterator emits only one space. So we have to use the actual space length to create the CharacterOffset in order to generate valid Range object from it. New test cases in accessibility/text-marker/text-marker-previous-next.html. * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::traverseToOffsetInRange): (WebCore::AXObjectCache::textMarkerDataForNextCharacterOffset): (WebCore::AXObjectCache::textMarkerDataForPreviousCharacterOffset): (WebCore::AXObjectCache::nextNode): (WebCore::AXObjectCache::characterOffsetFromVisiblePosition): (WebCore::AXObjectCache::nextCharacterOffset): (WebCore::AXObjectCache::previousCharacterOffset): (WebCore::AXObjectCache::startCharacterOffsetOfWord): LayoutTests: * accessibility/mac/text-marker-word-nav.html: * accessibility/text-marker/text-marker-previous-next-expected.txt: * accessibility/text-marker/text-marker-previous-next.html: Canonical link: https://commits.webkit.org/175298@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@200258 268f45cc-cd09-0410-ab3c-d52691b4dbfc |
||
---|---|---|
.. | ||
character-offset-visible-position-conversion-hang-expected.txt | ||
character-offset-visible-position-conversion-hang.html | ||
text-marker-previous-next-expected.txt | ||
text-marker-previous-next.html | ||
text-marker-range-stale-node-crash-expected.txt | ||
text-marker-range-stale-node-crash.html | ||
text-marker-range-with-removed-node-crash-expected.txt | ||
text-marker-range-with-removed-node-crash.html | ||
text-marker-with-user-select-none-expected.txt | ||
text-marker-with-user-select-none.html |