[webkit-changes] [WebKit/WebKit] e8ab96: AX: AXCoreObject::detach should not set the object...

AndresGonzalezApple noreply at github.com
Fri Oct 7 06:28:33 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e8ab960fb10d2b0a1ce58b8af8f326a1bf924682
      https://github.com/WebKit/WebKit/commit/e8ab960fb10d2b0a1ce58b8af8f326a1bf924682
  Author: Andres Gonzalez <andresg_22 at apple.com>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

  Changed paths:
    M Source/WebCore/accessibility/AXLogger.cpp
    M Source/WebCore/accessibility/AXLogger.h
    M Source/WebCore/accessibility/AXObjectCache.cpp
    M Source/WebCore/accessibility/AccessibilityObject.h
    M Source/WebCore/accessibility/AccessibilityObjectInterface.h
    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/mac/WebAccessibilityObjectWrapperBase.mm

  Log Message:
  -----------
  AX: AXCoreObject::detach should not set the object ID to null.
https://bugs.webkit.org/show_bug.cgi?id=246107
<rdar://problem/100824159>

Reviewed by Chris Fleizach.

Updates to the isolated tree depend on the object ID of the live objects that are changing. If the change in question involves removal of a live object, the live object gets detached and thus its object ID was set to null. Therefore it is not possible to do the proper update in the isolated tree.

This change also includes some code cleanup. In particular, moving the object ID member variable and its setter/getter to the base class.

* Source/WebCore/accessibility/AXLogger.cpp:
(WebCore::AXLogger::log):
Added another log override to log an AXCoreObject passed by reference.
* Source/WebCore/accessibility/AXLogger.h:
* Source/WebCore/accessibility/AccessibilityObject.h:
* Source/WebCore/accessibility/AccessibilityObjectInterface.h:
(WebCore::AXCoreObject::setObjectID):
(WebCore::AXCoreObject::objectID const):
These two methods are now implemented in the base class and are not virtual any longer, since their implementation was duplikcated in the derived classes.
(WebCore::AXCoreObject::AXCoreObject):
Addd constructor used by AXIsolatedObject.
(WebCore::AXCoreObject::detach):
No longer set the object ID to null.
* Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp:
(WebCore::AXIsolatedObject::AXIsolatedObject):
(WebCore::AXIsolatedObject::associatedAXObject const):
(WebCore::AXIsolatedObject::isDetachedFromParent):
* Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h:
* Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
(-[WebAccessibilityObjectWrapperBase detachIsolatedObject:]):
Removed no longer valid assert.

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




More information about the webkit-changes mailing list