Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 486ac0f1922b10f270d0845ee244a86fb1d4ca9e
      
https://github.com/WebKit/WebKit/commit/486ac0f1922b10f270d0845ee244a86fb1d4ca9e
  Author: Tyler Wilcock <[email protected]>
  Date:   2026-01-15 (Thu, 15 Jan 2026)

  Changed paths:
    M LayoutTests/accessibility-isolated-tree/TestExpectations
    A LayoutTests/accessibility/mac/search-text-with-image-hang-expected.txt
    A LayoutTests/accessibility/mac/search-text-with-image-hang.html
    M Source/WebCore/accessibility/AXCoreObject.h
    M Source/WebCore/accessibility/AccessibilityObject.cpp

  Log Message:
  -----------
  AX: Voice Control: "Select WebKit" on webkit.org causes the web process to 
hang.
https://bugs.webkit.org/show_bug.cgi?id=305383
rdar://168061323

Reviewed by Joshua Hoffman.

Prior to this commit, it was possible that AccessibilityObject::findTextRanges 
could loop infinitely when
rangeOfStringClosestToRangeInDirection returned the same range it was given.

This commit makes that function more resilient such that if we get back the 
same range, we slide the range forwards or
backwards and try again to make progress.

Test: accessibility/mac/search-text-with-image-hang.html

* LayoutTests/accessibility-isolated-tree/TestExpectations:
New test fails due to some pre-existing bug in how we handle 
AccessibilityUIElement::searchTextWithCriteria off the main-thread.
* LayoutTests/accessibility/mac/search-text-with-image-hang-expected.txt: Added.
* LayoutTests/accessibility/mac/search-text-with-image-hang.html: Added.
* Source/WebCore/accessibility/AXCoreObject.h:
(WebCore::AccessibilitySearchTextCriteria::debugDescription const):
* Source/WebCore/accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::rangeOfStringClosestToRangeInDirection const):
(WebCore::AccessibilityObject::findTextRange const):
(WebCore::AccessibilityObject::findTextRanges const):

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



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

Reply via email to