Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 46b3fcfd6171a66e90ca9cb410f9a3f3f5926426
      
https://github.com/WebKit/WebKit/commit/46b3fcfd6171a66e90ca9cb410f9a3f3f5926426
  Author: Tyler Wilcock <[email protected]>
  Date:   2026-07-21 (Tue, 21 Jul 2026)

  Changed paths:
    A LayoutTests/accessibility/mac/primary-screen-height-iframe-expected.txt
    A LayoutTests/accessibility/mac/primary-screen-height-iframe.html
    M Source/WebCore/accessibility/AXObjectCache.cpp
    M Source/WebCore/accessibility/AXObjectCache.h
    M Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp

  Log Message:
  -----------
  AX: VoiceOver cursor vertically mirrored for frames whose isolated tree is 
built by the AXObjectCache constructor timer
https://bugs.webkit.org/show_bug.cgi?id=319899
rdar://182818999

Reviewed by Dominic Mazzoni and Chris Fleizach.

AXPrimaryScreenHeight was reported as 0 for any frame whose isolated tree was
built by the AXObjectCache constructor's build timer, causing VoiceOver to 
render
the cursor and element bounds vertically mirrored for every element in that 
frame.

Primary-screen-rect initialization -- and the initial object-region paint that
caches per-object rects -- lived only in 
AXObjectCache::getOrCreateIsolatedTree().
317449@main added a second build path: the AXObjectCache constructor arms a 
timer
that runs buildIsolatedTree() -> AXIsolatedTree::create() directly, bypassing
getOrCreateIsolatedTree() and thus both setup steps. After a navigation (and for
every reloaded or inserted iframe, which gets a fresh AXObjectCache) the tree 
was
built with an uninitialized primary screen rect, so
AXIsolatedObject::primaryScreenRect() returned an empty rect and
AXPrimaryScreenHeight came back as 0.

Move both setup steps into AXObjectCache::initializeIsolatedTreeGeometry() and
invoke it from AXIsolatedTree::create() and createEmpty(), which every build 
path
funnels through, so the initialization can no longer be skipped.

* LayoutTests/accessibility/mac/primary-screen-height-iframe-expected.txt: 
Added.
* LayoutTests/accessibility/mac/primary-screen-height-iframe.html: Added.
* Source/WebCore/accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::getOrCreateIsolatedTree):
(WebCore::AXObjectCache::initializeIsolatedTreeGeometry):
* Source/WebCore/accessibility/AXObjectCache.h:
* Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp:
(WebCore::AXIsolatedTree::createEmpty):
(WebCore::AXIsolatedTree::create):

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



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

Reply via email to