[webkit-changes] [WebKit/WebKit] b9f803: REGRESSION(290212 at main): Sometimes web content nev...

Tyler Wilcock noreply at github.com
Mon Mar 24 14:47:48 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b9f8037aea654c6dd7ca25330fe9e4522e99a872
      https://github.com/WebKit/WebKit/commit/b9f8037aea654c6dd7ca25330fe9e4522e99a872
  Author: Tyler Wilcock <tyler_w at apple.com>
  Date:   2025-03-24 (Mon, 24 Mar 2025)

  Changed paths:
    M Source/WebCore/accessibility/AXObjectCache.cpp
    M Source/WebCore/accessibility/AXObjectCache.h
    M Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm

  Log Message:
  -----------
  REGRESSION(290212 at main): Sometimes web content never becomes accessible because the isolated tree never gets built
https://bugs.webkit.org/show_bug.cgi?id=290194
rdar://147592259

Reviewed by Chris Fleizach.

In https://commits.webkit.org/290212@main, we made `-[WKAccessibilityWebPageObjectBase focusedLocalFrame]` return
nullptr if off the main-thread to avoid unsafely accessing the `WebPage` (which can only be used on the main-thread).
This was the right thing to do, but had unexpected fallout, as it meant that when `-[WKAccessibilityWebPageObjectBase accessibilityRootObjectWrapper:]`
was called with a nullptr frame, we never actually called `AXObjectCache::rootObjectForFrame`, which would kick off
creation of the isolated tree.

With this commit, -[WKAccessibilityWebPageObjectBase accessibilityRootObjectWrapper:] now will try to re-retrieve a
frame after dispatching to the main-thread if the one we had was nullptr for any reason.

* Source/WebCore/accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::buildAccessibilityTreeIfNeeded):
Drive-by fix to call getOrCreateIsolatedTree() instead of isolatedTreeRootObject(), as the former better describes
the intent of behavior we want to achieve in this function. There is no change in actual behavior here, and unrelated
to the bug described above.
* Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm:
(-[WKAccessibilityWebPageObjectBase accessibilityRootObjectWrapper:]):

Canonical link: https://commits.webkit.org/292613@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