Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d2c534bec1644b989026b4b41da29263cc7a5381
      
https://github.com/WebKit/WebKit/commit/d2c534bec1644b989026b4b41da29263cc7a5381
  Author: Tyler Wilcock <[email protected]>
  Date:   2025-02-27 (Thu, 27 Feb 2025)

  Changed paths:
    A LayoutTests/accessibility/node-only-object-aria-owns-hang-expected.txt
    A LayoutTests/accessibility/node-only-object-aria-owns-hang.html
    M Source/WebCore/accessibility/AccessibilityObject.cpp
    M Source/WebCore/accessibility/AccessibilityRenderObject.cpp

  Log Message:
  -----------
  AX: With ENABLE(INCLUDE_IGNORED_IN_CORE_AX_TREE), getting the unignored 
children of a node-only object with aria-owns loops infinitely
https://bugs.webkit.org/show_bug.cgi?id=288684
rdar://145715339

Reviewed by Chris Fleizach.

Prior to this commit, only AccessibilityRenderObject::addChildren() verified 
that it didn't insert a child aria-owned
by another object. Node-only objects, such as those with display:contents or 
display:none, would not check aria-ownership,
and thus would insert the owned child. This results in the double-exposure of 
this subtree, and causes an infinite
loop in anything that uses AXCoreObject::nextInPreOrder over affected subtrees 
(e.g. AXCoreObject::unignoredChildren).

With this commit, we move the aria-owns check from 
AccessibilityRenderObject::addChildren to AccessibilityObject::insertChild,
so we always behave correctly, since all m_children inserts go through this 
path.

* LayoutTests/accessibility/node-only-object-aria-owns-hang-expected.txt: Added.
* LayoutTests/accessibility/node-only-object-aria-owns-hang.html: Added.
* Source/WebCore/accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::insertChild):
* Source/WebCore/accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::addChildren):

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



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

Reply via email to