[webkit-changes] [WebKit/WebKit] fb7b82: AX: AXIsolatedTree::objectForID always takes a std...

Tyler Wilcock noreply at github.com
Thu Dec 12 21:14:18 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: fb7b82bcfed8b25f5d666498f1086052b2e619a4
      https://github.com/WebKit/WebKit/commit/fb7b82bcfed8b25f5d666498f1086052b2e619a4
  Author: Tyler Wilcock <tyler_w at apple.com>
  Date:   2024-12-12 (Thu, 12 Dec 2024)

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

  Log Message:
  -----------
  AX: AXIsolatedTree::objectForID always takes a std::optional<AXID> even though some callsites have a known non-optional AXID
https://bugs.webkit.org/show_bug.cgi?id=284593
rdar://141404151

Reviewed by Chris Fleizach.

Add a non-optional override of AXIsolatedTree::objectForID to avoid needlessly constructing a null-checking a known
non-optional AXID.

This commit also changes the return type of objectForID from `RefPtr<AXIsolatedObject` to `AXIsolatedObject*`. This
gives callers the option of turning the pointer into a RefPtr rather than forcing them into it. This has a nice
knock-on effect of removing several places where we immediately turned the constructed RefPtr into a raw pointer again.

* Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp:
(WebCore::AXIsolatedObject::cellForColumnAndRow):
(WebCore::AXIsolatedObject::accessibilityHitTest const):
(WebCore::AXIsolatedObject::objectAttributeValue const):
* Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h:
* Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp:
(WebCore::AXIsolatedTree::objectForID const):
* Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h:
(WebCore::AXIsolatedTree::objectForID const):

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