Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b37f820dae2abeffca68dc3c9ec6831d8b16f370
      
https://github.com/WebKit/WebKit/commit/b37f820dae2abeffca68dc3c9ec6831d8b16f370
  Author: Andres Gonzalez <[email protected]>
  Date:   2023-05-31 (Wed, 31 May 2023)

  Changed paths:
    A 
LayoutTests/accessibility/text-marker/text-marker-range-with-unordered-markers-expected.txt
    A 
LayoutTests/accessibility/text-marker/text-marker-range-with-unordered-markers.html
    M Source/WebCore/accessibility/AXTextMarker.cpp
    M Source/WebCore/accessibility/AXTextMarker.h
    M Source/WebCore/accessibility/cocoa/AXTextMarkerCocoa.mm

  Log Message:
  -----------
  AX: AXTextMarkerRangeForTextMarkersAttribute needs to support unordered 
TextMarkers.
https://bugs.webkit.org/show_bug.cgi?id=257410
<rdar://problem/109815930>

Reviewed by Chris Fleizach.

- Added a partialOrder function for AXTextMrkers and use it to swap the start 
and end TextMarkers passed to the AXTextMarkerRange constructor when the client 
passes unordered markers.
- Modified the AXTextMarker operators to convert to VisiblePosition and 
CharacterOffset to initialize the Node * member variable if needed.

* 
LayoutTests/accessibility/text-marker/text-marker-range-with-unordered-markers-expected.txt:
 Added.
* 
LayoutTests/accessibility/text-marker/text-marker-range-with-unordered-markers.html:
 Added.
* Source/WebCore/accessibility/AXTextMarker.cpp:
(WebCore::AXTextMarker::setNodeIfNeeded const):
(WebCore::AXTextMarker::operator VisiblePosition const):
(WebCore::AXTextMarker::operator CharacterOffset const):
(WebCore::AXTextMarkerRange::AXTextMarkerRange):
(WebCore::partialOrder):
(WebCore::AXTextMarker::setNode):
Renamed setNodeIfNeeded.
* Source/WebCore/accessibility/AXTextMarker.h:
* Source/WebCore/accessibility/cocoa/AXTextMarkerCocoa.mm:
(WebCore::AXTextMarker::AXTextMarker):

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


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to