[webkit-changes] [WebKit/WebKit] fc04b0: AX: AXTextMarker::findMarker doesn't move to the r...

Tyler Wilcock noreply at github.com
Sat Jan 25 20:19:47 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: fc04b09d028ce6cb51c6b16e98b994fa81567307
      https://github.com/WebKit/WebKit/commit/fc04b09d028ce6cb51c6b16e98b994fa81567307
  Author: Tyler Wilcock <tyler_w at apple.com>
  Date:   2025-01-25 (Sat, 25 Jan 2025)

  Changed paths:
    M Source/WebCore/accessibility/AXTextMarker.cpp
    M Source/WebCore/accessibility/AXTextRun.h

  Log Message:
  -----------
  AX: AXTextMarker::findMarker doesn't move to the right offset when encountering a non-ASCII character
https://bugs.webkit.org/show_bug.cgi?id=286522
rdar://143609336

Reviewed by Chris Fleizach.

With this commit, we use CachedTextBreakIterator::{preceding, following} to determine how many offsets to move when
encountering non-ASCII characters, preventing AXTextMarker::findMarker from moving to an offset in the middle of a
non-ASCII character (e.g. an emoji).

This partially fixes accessibility/text-marker/text-marker-previous-next.html in ENABLE(AX_THREAD_TEXT_APIS) mode,
which includes an emoji testcase.

* Source/WebCore/accessibility/AXTextMarker.cpp:
(WebCore::AXTextMarker::findMarker const):
* Source/WebCore/accessibility/AXTextRun.h:
(WebCore::AXTextRuns::AXTextRuns):

Canonical link: https://commits.webkit.org/289402@main



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list