Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9c91ee91b978756f6b4557170f8b15a966d90fe6
      
https://github.com/WebKit/WebKit/commit/9c91ee91b978756f6b4557170f8b15a966d90fe6
  Author: Tyler Wilcock <[email protected]>
  Date:   2026-09-06 (Sun, 06 Sep 2026)

  Changed paths:
    A 
LayoutTests/accessibility/isolated-tree/mac/typing-in-document-with-no-ax-object-cache-expected.txt
    A 
LayoutTests/accessibility/isolated-tree/mac/typing-in-document-with-no-ax-object-cache.html
    A 
LayoutTests/accessibility/mac/typing-in-document-with-no-ax-object-cache-expected.txt
    A 
LayoutTests/accessibility/mac/typing-in-document-with-no-ax-object-cache.html
    M Source/WebCore/editing/Editing.cpp

  Log Message:
  -----------
  AX: Typing crashes in debug builds when accessibility is enabled for a 
document with no AXObjectCache
https://bugs.webkit.org/show_bug.cgi?id=323527
rdar://186768355

Reviewed by Chris Fleizach.

imported/w3c/web-platform-tests/css/selectors/user-invalid.html crashes in 
debug builds on
ASSERT(node.document().existingAXObjectCache()) in isEditableToAccessibility(), 
reached from
the EditCommandComposition constructor by way of indexForVisiblePosition.

isEditableToAccessibility() has asserted since 2015 that a document whose 
editability is
being resolved through accessibility has an AXObjectCache to resolve it with. 
That held while
accessibility was turned on as a side effect of a client reaching into a page, 
because
reaching in created the cache. 320566@main made the mode process-wide -- 
broadcast to every
web process and seeded into WebPageCreationParameters -- so it is now routinely 
on for
documents an accessibility client hasn't yet talked to yet, and thus have no 
cache.

Fix this by also checking for the presence of an existingAXObjectCache before 
using accessibility editability.

* 
LayoutTests/accessibility/isolated-tree/mac/typing-in-document-with-no-ax-object-cache-expected.txt:
 Added.
* 
LayoutTests/accessibility/isolated-tree/mac/typing-in-document-with-no-ax-object-cache.html:
 Added.
* 
LayoutTests/accessibility/mac/typing-in-document-with-no-ax-object-cache-expected.txt:
 Added.
* 
LayoutTests/accessibility/mac/typing-in-document-with-no-ax-object-cache.html: 
Added.
* Source/WebCore/editing/Editing.cpp:
(WebCore::indexForVisiblePosition):

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



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

Reply via email to