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

  Changed paths:
    M Source/WebCore/accessibility/AccessibilityNodeObject.cpp
    M Source/WebCore/accessibility/AccessibilityObject.cpp
    M Source/WebCore/accessibility/AccessibilityRenderObject.cpp
    M Source/WebCore/accessibility/cocoa/AccessibilityObjectCocoa.mm
    M Source/WebCore/accessibility/mac/AccessibilityObjectMac.mm

  Log Message:
  -----------
  AX: Prefer the Node& version of getOrCreate over the RenderObject& version 
when possible as it's more performant
https://bugs.webkit.org/show_bug.cgi?id=298161
rdar://159528971

Reviewed by Joshua Hoffman.

Now that objects key their identity and lifetime based on `Node`s rather than 
`RenderObject`s, AXObjectCache::getOrCreate(RenderObject&)
requires several extra branches to call into the `Node&` version to check that 
first. In contexts where we have a `Node`,
use that instead of `getOrCreate`ing the renderer.

* Source/WebCore/accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::anchorElement const):
(WebCore::AccessibilityNodeObject::textForLabelElements const):
* Source/WebCore/accessibility/AccessibilityObject.cpp:
(WebCore::firstAccessibleObjectFromNode):
(WebCore::AccessibilityObject::anchorElementForNode):
(WebCore::AccessibilityObject::headingElementForNode):
(WebCore::AccessibilityObject::isTabItemSelected const):
* Source/WebCore/accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::parentObject const):
(WebCore::AccessibilityRenderObject::anchorElement const):
(WebCore::AccessibilityRenderObject::documentLinks):
(WebCore::AccessibilityRenderObject::accessibilityHitTest const):
* Source/WebCore/accessibility/cocoa/AccessibilityObjectCocoa.mm:
(WebCore::AccessibilityObject::contentForRange const):
* Source/WebCore/accessibility/mac/AccessibilityObjectMac.mm:
(WebCore::attributedStringCreate):

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