[webkit-changes] [WebKit/WebKit] 691305: AX: deferModalChange unnecessarily causes a childr...

Tyler Wilcock noreply at github.com
Thu Jan 9 19:28:08 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6913057b93bbc24e15172526c3f5989ced285fa6
      https://github.com/WebKit/WebKit/commit/6913057b93bbc24e15172526c3f5989ced285fa6
  Author: Tyler Wilcock <tyler_w at apple.com>
  Date:   2025-01-09 (Thu, 09 Jan 2025)

  Changed paths:
    M LayoutTests/accessibility/mac/dynamic-modal-expected.txt
    M LayoutTests/accessibility/mac/dynamic-modal.html
    M Source/WebCore/accessibility/AXObjectCache.cpp

  Log Message:
  -----------
  AX: deferModalChange unnecessarily causes a children-changed, and changing aria-hidden unnecessarily resets m_modalNodesInitialized
https://bugs.webkit.org/show_bug.cgi?id=285688
rdar://problem/142617733

Reviewed by Chris Fleizach.

AXObjectCache::deferModalChange started issuing a children-changed event in this commit:

https://github.com/WebKit/WebKit/commit/9b24060ac33142c1ba4a717e9661e04b5fa59bf4

Which fixed 7 tests in ITM. However, I don't think this behavior is correct. There is nothing about becoming a potential
modal node that affects any objects children. If the computed modal is changed, we will submit the appropriate children-changed
events, but in this spot we are just incurring unnecessary work.

This commit also removes unnecessary work done in AXObjectCache::handleAttributeChange where we would reset m_modalNodesInitialized
to false when aria-hidden changes when a modal is active. Resetting m_modalNodesInitialized to false causes findModalNodes()
to run, but this function doesn't consider aria-hidden in any way, so this behavior causes unnecessary work.

* LayoutTests/accessibility/mac/dynamic-modal-expected.txt:
* LayoutTests/accessibility/mac/dynamic-modal.html:
Simplify test.
* Source/WebCore/accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::deferModalChange):
(WebCore::AXObjectCache::handleAttributeChange):
(WebCore::AXObjectCache::performDeferredCacheUpdate):

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



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


More information about the webkit-changes mailing list