Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 4124277aa682033e7083401d948d2b2c49dcd290
      
https://github.com/WebKit/WebKit/commit/4124277aa682033e7083401d948d2b2c49dcd290
  Author: Tyler Wilcock <tyle...@apple.com>
  Date:   2025-09-02 (Tue, 02 Sep 2025)

  Changed paths:
    M Source/WebCore/accessibility/AXLogger.cpp
    M Source/WebCore/accessibility/AccessibilityObject.h
    M Source/WebCore/accessibility/AccessibilityRenderObject.cpp
    M Source/WebCore/accessibility/AccessibilityRenderObject.h
    M Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp
    M Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp
    M Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h

  Log Message:
  -----------
  AX: Empty rect is returned for unpainted text, even though we could provide a 
roughly accurate one
https://bugs.webkit.org/show_bug.cgi?id=298107
rdar://159458569

Reviewed by Joshua Hoffman.

AccessibilityObject::frameRect, which is what we used to cache 
AXProperty::InitialFrameRect, returned an emtpy rect
for anything that wasn't a RenderBox. Critically, this excludes RenderText.

Fix this by changing the method name to localRect (since frameRect is very 
specific to RenderBoxes), and handling
RenderTexts inside this new method. AXProperty::InitialFrameRect is renamed to 
AXProperty::InitialLocalRect.

Not returning an empty rect for unpainted text can be critical, since some ATs 
(like VoiceOver) will ignore elements
with an empty rect, even if we would've shortly painted the text after the AT 
got a reference to it.

* Source/WebCore/accessibility/AXLogger.cpp:
(WebCore::operator<<):
* Source/WebCore/accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::localRect const):
(WebCore::AccessibilityObject::frameRect const): Deleted.
* Source/WebCore/accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::textRuns):
(WebCore::AccessibilityRenderObject::localRect const):
(WebCore::AccessibilityRenderObject::frameRect const): Deleted.
* Source/WebCore/accessibility/AccessibilityRenderObject.h:
* Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp:
(WebCore::AXIsolatedObject::relativeFrame const):
* Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp:
(WebCore::AXIsolatedTree::updateFrame):
(WebCore::createIsolatedObjectData):
* Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h:

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to