Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 523acc306f2bb48caf9cf15371329caae1d36346
      
https://github.com/WebKit/WebKit/commit/523acc306f2bb48caf9cf15371329caae1d36346
  Author: Tyler Wilcock <[email protected]>
  Date:   2022-09-26 (Mon, 26 Sep 2022)

  Changed paths:
    M LayoutTests/accessibility-isolated-tree/TestExpectations
    M Source/WebCore/accessibility/AccessibilityObject.h
    M Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp

  Log Message:
  -----------
  AX: AXIsolatedTree::updateChildren doesn't propagate updates downwards when 
AccessibilityObject::m_subtreeDirty is true
https://bugs.webkit.org/show_bug.cgi?id=245694
rdar://100245048

Reviewed by Chris Fleizach.

When AXIsolatedTree::updateChildren updates the children of the nearest 
in-isolated-tree
ancestor to the parameter object, it compares the new children of that object 
to the "old"
ones, i.e. the children for that object in the nodemap. If we found that the 
object's new children
included an object that already existed in the old nodemap children, we do 
nothing (besides
deliberately not queuing it for deletion).

Based on the update pattern of some sites, doing nothing in this scenario is 
not right, since this
existing object could have m_subtreeDirty set, meaning we need to propagate 
descendant updates downwards.
This is exactly what the live tree does in AccessibilityObject::insertChild.

With this patch, we detect m_subtreeDirty in this scenario and propagate that 
update downwards with
AXIsolatedTree::collectNodeChangesForSubtree.

Fixes accessibility/text-alternative-calculation-from-listbox.html which is 
dependent on m_subtreeDirty
updates being handled properly.

* LayoutTests/accessibility-isolated-tree/TestExpectations:
* Source/WebCore/accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::hasDirtySubtree const): Added.
* Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp:
(WebCore::AXIsolatedTree::updateChildren):

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


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

Reply via email to