Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2be2f2d783081daf22256d444a61df63f215f86c
      
https://github.com/WebKit/WebKit/commit/2be2f2d783081daf22256d444a61df63f215f86c
  Author: Joshua Hoffman <jhoffma...@apple.com>
  Date:   2024-11-14 (Thu, 14 Nov 2024)

  Changed paths:
    M 
LayoutTests/accessibility/ax-thread-text-apis/text-marker-paragraph-nav-expected.txt
    M 
LayoutTests/accessibility/ax-thread-text-apis/text-marker-paragraph-nav.html
    M Source/WebCore/accessibility/AXTextMarker.cpp
    M Source/WebCore/accessibility/AXTextMarker.h
    M Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm

  Log Message:
  -----------
  AX: Implement NextParagraphEnd and PreviousParagraphStart off the main thread
https://bugs.webkit.org/show_bug.cgi?id=283112
rdar://139880052

Reviewed by Tyler Wilcock.

This PR finishes moving paragraph navigation off the main thread by 
implementing the nextParagraphEnd
and previousParagraphStart APIs off of the main thread.

Several changes were made since 286004@main (AX: Implement TextUnit::Paragraph 
off the main thread),
including:
* Using the runIndex instead of the line index, so we can index relative to the 
current runs, not the
containing block.
* Adding logic to AXTextMarker::previousParagraphStart and 
AXTextMarker::nextParagraphEnd to mimic the
live tree behavior, notably, advancing when there are line breaks.
* Updating AXTextMarker::ParagraphRange to call findMarker directly, similar to 
the live tree.
* Refining the logic within findMarker to handle more edge cases. This includes 
removing the cumulative
offset, which is no longer used.

The text-marker-paragraph-nav.html test was also updated to test these APIs.

* 
LayoutTests/accessibility/ax-thread-text-apis/text-marker-paragraph-nav-expected.txt:
* LayoutTests/accessibility/ax-thread-text-apis/text-marker-paragraph-nav.html:
* Source/WebCore/accessibility/AXTextMarker.cpp:
(WebCore::AXTextMarker::findMarker const):
(WebCore::AXTextMarker::previousParagraphStart const):
(WebCore::AXTextMarker::nextParagraphEnd const):
(WebCore::AXTextMarker::paragraphRange const):
* Source/WebCore/accessibility/AXTextMarker.h:
(WebCore::AXTextMarker::previousParagraphStart const): Deleted.
(WebCore::AXTextMarker::nextParagraphEnd const): Deleted.
* Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper textMarkerForTextMarker:atUnit:]):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to