Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 02f429fc0b31989831c2cb0f9a886a329521d763
      
https://github.com/WebKit/WebKit/commit/02f429fc0b31989831c2cb0f9a886a329521d763
  Author: Dominic Mazzoni <[email protected]>
  Date:   2026-07-08 (Wed, 08 Jul 2026)

  Changed paths:
    A LayoutTests/accessibility/mac/local-frame-focused-text-input-expected.txt
    A LayoutTests/accessibility/mac/local-frame-focused-text-input.html
    A LayoutTests/accessibility/resources/local-frame-text-input.html
    M Source/WebCore/accessibility/AXObjectCache.cpp
    M Source/WebCore/accessibility/AXObjectCache.h
    M Source/WebCore/accessibility/AccessibilityScrollView.h
    M Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp
    M Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h

  Log Message:
  -----------
  AX: With ENABLE_LOCAL_FRAME, focused node API is not traversing iframe 
boundary
https://bugs.webkit.org/show_bug.cgi?id=318620
rdar://181414022

Reviewed by Joshua Hoffman.

Based on a patch originally started by Tyler.

Each frame has its own AXObjectCache and isolated tree, and only the
focused frame's own cache handles its focus change, so an ancestor
tree (including the main frame's, which VoiceOver queries) was never
pointed at a focused descendant local frame. Point each ancestor local
frame's isolated-tree focused object at the AXLocalFrame leading
toward the focused subframe (focusedObjectForLocalFrame /
localFrameLeadingToFocusedFrame / updateAncestorFramesFocusedObject),
and have AXIsolatedObject::focusedUIElementInAnyLocalFrame() descend
that chain to the real focused element.

Test: accessibility/mac/local-frame-focused-text-input.html

* LayoutTests/accessibility/mac/local-frame-focused-text-input-expected.txt: 
Added.
* LayoutTests/accessibility/mac/local-frame-focused-text-input.html: Added.
* LayoutTests/accessibility/resources/local-frame-text-input.html: Added.
* Source/WebCore/accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::focusedObjectForLocalFrame):
(WebCore::AXObjectCache::localFrameLeadingToFocusedFrame):
(WebCore::AXObjectCache::updateAncestorFramesFocusedObject):
(WebCore::AXObjectCache::handleFocusedUIElementChanged):
* Source/WebCore/accessibility/AXObjectCache.h:
* Source/WebCore/accessibility/AccessibilityScrollView.h:
* Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp:
(WebCore::AXIsolatedObject::focusedUIElementInAnyLocalFrame const):
* Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h:

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



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

Reply via email to