Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: c98a2ded1d0097353fd604d07bf242a1e1d087e2
https://github.com/WebKit/WebKit/commit/c98a2ded1d0097353fd604d07bf242a1e1d087e2
Author: Andres Gonzalez <[email protected]>
Date: 2022-11-02 (Wed, 02 Nov 2022)
Changed paths:
M LayoutTests/accessibility-isolated-tree/TestExpectations
M LayoutTests/accessibility/svg-remote-element.html
M LayoutTests/platform/glib/accessibility/svg-remote-element-expected.txt
M LayoutTests/platform/mac/accessibility/svg-remote-element-expected.txt
M Source/WebCore/accessibility/AXObjectCache.cpp
M Source/WebCore/accessibility/AXObjectCache.h
M Source/WebCore/accessibility/AccessibilityRenderObject.cpp
M Source/WebCore/accessibility/AccessibilitySVGElement.cpp
M Source/WebCore/accessibility/AccessibilitySVGElement.h
M Source/WebCore/accessibility/AccessibilitySVGRoot.cpp
M Source/WebCore/accessibility/AccessibilitySVGRoot.h
M Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp
M Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp
Log Message:
-----------
AX ITM: Fix for LayoutTests/accessibility/svg-remote-element.html in isolated
tree mode.
https://bugs.webkit.org/show_bug.cgi?id=247316
<rdar://problem/101804648>
<rdar://problem/101804648>
Reviewed by Chris Fleizach.
Embedded SVG documents are not connected to the container's top document.
Therefore, all AX SVG objects are created and cached by a separate instance of
AXObjectCache different from the container's AXObjectCache. This causes that
the AX SVG objects do not appear in the isolated tree built for the top
document.
This patch fixes this problem by passing the appropriate AXObjectCache instance
to the constructor of AXSVGRoot and AXSVGElement, and overriding the
axObjectCahce() method in these subclasses.
Some minor code cleanup and debug logging.
* LayoutTests/accessibility-isolated-tree/TestExpectations:
* LayoutTests/accessibility/svg-remote-element.html:
* LayoutTests/platform/glib/accessibility/svg-remote-element-expected.txt:
* LayoutTests/platform/mac/accessibility/svg-remote-element-expected.txt:
* Source/WebCore/accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::createObjectFromRenderer):
(WebCore::AXObjectCache::getOrCreate):
(WebCore::createFromRenderer): Renamed createObjectFromRenderer.
(WebCore::AXObjectCache::getOrCreateIsolatedTree const):
(WebCore::AXObjectCache::handleAttributeChange):
(WebCore::AXObjectCache::updateRelationsIfNeeded):
* Source/WebCore/accessibility/AXObjectCache.h:
* Source/WebCore/accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
(WebCore::AccessibilityRenderObject::remoteSVGRootElement const):
(WebCore::AccessibilityRenderObject::updateRoleAfterChildrenCreation):
* Source/WebCore/accessibility/AccessibilitySVGElement.cpp:
(WebCore::AccessibilitySVGElement::AccessibilitySVGElement):
(WebCore::AccessibilitySVGElement::create):
* Source/WebCore/accessibility/AccessibilitySVGElement.h:
* Source/WebCore/accessibility/AccessibilitySVGRoot.cpp:
(WebCore::AccessibilitySVGRoot::AccessibilitySVGRoot):
(WebCore::AccessibilitySVGRoot::create):
* Source/WebCore/accessibility/AccessibilitySVGRoot.h:
* Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp:
(WebCore::AXIsolatedObject::children):
* Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp:
(WebCore::AXIsolatedTree::collectNodeChangesForSubtree):
Canonical link: https://commits.webkit.org/256261@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes