Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 42b3ecc4724deceda84578093f57f6fd842abf6e
      
https://github.com/WebKit/WebKit/commit/42b3ecc4724deceda84578093f57f6fd842abf6e
  Author: Tyler Wilcock <[email protected]>
  Date:   2026-06-12 (Fri, 12 Jun 2026)

  Changed paths:
    M LayoutTests/accessibility-isolated-tree/TestExpectations
    M Source/WebCore/accessibility/AXObjectCache.cpp
    M Source/WebCore/accessibility/AXTextMarker.cpp
    M Source/WebCore/accessibility/AXTextMarker.h
    M Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm
    M Source/WebCore/accessibility/mac/AXObjectCacheMac.mm

  Log Message:
  -----------
  AX: AXTextOperations skip text input fields when isolated tree is enabled
https://bugs.webkit.org/show_bug.cgi?id=316961
rdar://179428392

Reviewed by Chris Fleizach.

With isolated tree mode enabled, AXTextOperations (e.g. replace) skip
text inputs. The cause is in AXObjectCache::textMarkerDataForVisiblePosition.
When shouldCreateAXThreadCompatibleMarkers() is true, it builds a TextMarkerData
with the `ignored` field set from object-&gt;isIgnored(). An 
&lt;input&gt;&apos;s inner
user-agent-shadow text is an AX-ignored object, so its marker was flagged 
ignored=true.
When that marker range was later converted back to a SimpleRange on the main 
thread,
characterOffsetForTextMarkerData / objectForTextMarkerData return null for an
ignored marker, so the range was dropped and never operated on.

The main reason this bug occurred is because TextMarkerData&apos;s `ignored`
field did not actually map to the canonical notion of accessibility-is-ignored.
Based on how the live tree actually sets and uses it, the intent is to
denote whether the marker is within a secure field. The bug is fixed
by hardcoding `ignored` to false for anything that&apos;s not a secure field.

To keep the name from inviting the same mistake again, this commit renames
the field from `ignored` to `isRedacted`.

This progresses test 
accessibility/mac/text-operation/text-operation-replace-across-multiple-fields.html
in isolated tree mode.

* LayoutTests/accessibility-isolated-tree/TestExpectations:
* Source/WebCore/accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::characterOffsetForTextMarkerData):
(WebCore::AXObjectCache::textMarkerDataForCharacterOffset):
(WebCore::AXObjectCache::textMarkerDataForNextCharacterOffset):
(WebCore::AXObjectCache::textMarkerDataForPreviousCharacterOffset):
(WebCore::AXObjectCache::objectForTextMarkerData):
(WebCore::AXObjectCache::textMarkerDataForVisiblePosition):
* Source/WebCore/accessibility/AXTextMarker.cpp:
(WebCore::TextMarkerData::TextMarkerData):
(WebCore::AXTextMarker::operator CharacterOffset const):
(WebCore::AXTextMarker::description const):
* Source/WebCore/accessibility/AXTextMarker.h:
(WebCore::TextMarkerData::TextMarkerData):
(WebCore::AXTextMarker::isRedacted const):
(WebCore::AXTextMarker::isIgnored const): Deleted.
* Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(+[WebAccessibilityTextMarker textMarkerWithCharacterOffset:cache:]):
(-[WebAccessibilityTextMarker isIgnored]):
* Source/WebCore/accessibility/mac/AXObjectCacheMac.mm:
(WebCore::textMarkerForCharacterOffset):

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



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

Reply via email to