Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f0592d1e077beba8a2ca0e891f2d0ebc139ff41e
      
https://github.com/WebKit/WebKit/commit/f0592d1e077beba8a2ca0e891f2d0ebc139ff41e
  Author: Tyler Wilcock <tyle...@apple.com>
  Date:   2025-04-04 (Fri, 04 Apr 2025)

  Changed paths:
    M Source/WebCore/SaferCPPExpectations/UncountedCallArgsCheckerExpectations
    M Source/WebCore/accessibility/AXCoreObject.cpp
    M Source/WebCore/accessibility/AXCoreObject.h
    M Source/WebCore/accessibility/AccessibilityObject.cpp
    M Source/WebCore/accessibility/AccessibilityObject.h
    M Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp
    M Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h
    M Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm

  Log Message:
  -----------
  AX: Remove unnecessary detachment check from AccessibilityObject::insertChild
https://bugs.webkit.org/show_bug.cgi?id=290805
rdar://148284256

Reviewed by Chris Fleizach.

In this commit:

https://github.com/WebKit/WebKit/commit/f031d0084a1585510bf5a6009a26fad4b4541255

This detachment check was added to workaround an issue where an 
AccessibilityMockObject (no other AccessibilityObject subclass
can return true for this function, though AXIsolatedObject can). This was fine 
when it was added, as getting the unignored
children for an object used to be cheap. However, now that we include ignored 
objects in the tree, this is very much
not cheap, and there is no layout test proving why it's necessary. If this 
problem does actually exist, we should fix
the root cause, rather than have an expensive workaround in one of our hottest 
functions.

The branch deleted here eliminates 17k main-thread samples (of 48k total) while 
holding VO-Right on http://html.spec.whatwg.org.

This commit also eliminates an isDetachedFromParent() early-exit from 
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:],
thus allowing it to be removed from AXIsolatedObject and made non-virtual (it's 
still used on iOS). This was added in this commit
to fix a crash when getting the value from a detached slider:

https://github.com/WebKit/WebKit/commit/ffdd4e28536b70c03e7ae0da4095a1c0e8d25b20

We can fix this crash in a more performant way by null-checking parentObject() 
in AXCoreObject::value(), rather than
adding virtual function overhead to every single accessibilityAttributeValue 
call.

* Source/WebCore/accessibility/AXCoreObject.cpp:
(WebCore::AXCoreObject::value):
* Source/WebCore/accessibility/AXCoreObject.h:
* Source/WebCore/accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::insertChild):
* Source/WebCore/accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::isDetachedFromParent):
* Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp:
(WebCore::AXIsolatedObject::isDetachedFromParent): Deleted.
* Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h:
* Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):

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