[webkit-changes] [WebKit/WebKit] e951a2: AX: Add origin field in text marker for debugging

Joshua Hoffman noreply at github.com
Tue Jan 21 22:19:54 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e951a24c3c217915c3e7bd28f931ab1e495873b6
      https://github.com/WebKit/WebKit/commit/e951a24c3c217915c3e7bd28f931ab1e495873b6
  Author: Joshua Hoffman <jhoffman23 at apple.com>
  Date:   2025-01-21 (Tue, 21 Jan 2025)

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

  Log Message:
  -----------
  AX: Add origin field in text marker for debugging
https://bugs.webkit.org/show_bug.cgi?id=286308
rdar://problem/143331453

Reviewed by Chris Fleizach.

Accessibility text markers, which are produced by WebKit, are sent back
as parameters from AT when performing text operations. But, when we crash
with these passed-in parameters, it can be hard to discern where the issue
stems from, as we don't get information about what API generated a given
text marker.

To solve this, when we make text markers, let's store an origin, which can
be printed out in crashes and in debugging information.

* Source/WebCore/accessibility/AXTextMarker.cpp:
(WebCore::AXTextMarker::lineIndex const):
(WebCore::AXTextMarker::characterRangeForLine const):
(WebCore::AXTextMarker::markerRangeForLineIndex const):
(WebCore::AXTextMarker::offsetFromRoot const):
(WebCore::AXTextMarker::findLine const):
(WebCore::AXTextMarker::findParagraph const):
(WebCore::AXTextMarker::findWordOrSentence const):
(WebCore::AXTextMarker::toTextRunMarker const):
* Source/WebCore/accessibility/AXTextMarker.h:
(WebCore::originToString):
(WebCore::TextMarkerData::TextMarkerData):
(WebCore::AXTextMarker::AXTextMarker):
(WebCore::AXTextMarker::origin const):

Canonical link: https://commits.webkit.org/289223@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