[webkit-changes] [WebKit/WebKit] 915714: AX: Remove unnecessary AXProperty::BlockquoteLevel

Tyler Wilcock noreply at github.com
Tue Mar 25 13:12:28 PDT 2025


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

  Changed paths:
    M Source/WebCore/accessibility/AXCoreObject.cpp
    M Source/WebCore/accessibility/AXCoreObject.h
    M Source/WebCore/accessibility/AXLogger.cpp
    M Source/WebCore/accessibility/AccessibilityObject.cpp
    M Source/WebCore/accessibility/AccessibilityObject.h
    M Source/WebCore/accessibility/cocoa/AXCoreObjectCocoa.mm
    M Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp
    M Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h
    M Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h

  Log Message:
  -----------
  AX: Remove unnecessary AXProperty::BlockquoteLevel
https://bugs.webkit.org/show_bug.cgi?id=290353
rdar://147791741

Reviewed by Chris Fleizach.

We can compute this on-demand off the main-thread rather than eagerly caching it for every single object. This saves
memory, and eliminates one ancestry traversal per-object created. It also makes it impossible for us to ever return
stale data, which theoretically could've happened with the property (e.g. an element is re-parented, resulting in
a different blockquote level).

This commit also adds a FIXME around how we cache several different properties that are basically just wrappers over
HTMLInputType::m_inputType. It would be better just to have that as a property, and implement these properties / functions
on top of that.

* Source/WebCore/accessibility/AXCoreObject.cpp:
(WebCore::AXCoreObject::blockquoteLevel const):
* Source/WebCore/accessibility/AXCoreObject.h:
* Source/WebCore/accessibility/AXLogger.cpp:
(WebCore::operator<<):
* Source/WebCore/accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::blockquoteLevel const): Deleted.
* Source/WebCore/accessibility/AccessibilityObject.h:
* Source/WebCore/accessibility/cocoa/AXCoreObjectCocoa.mm:
(WebCore::AXCoreObject::createAttributedString const):
(WebCore::attributedStringSetBlockquoteLevel): Deleted.
* Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp:
(WebCore::AXIsolatedObject::initializeProperties):
* Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h:
* Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h:

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