AX: Isolated tree objects don't update their AXPropertyName::ElementRect or AXPropert...
commit62787dab933a983699dc6a393e24aceb4e4df2fe
authortyler_w@apple.com <tyler_w@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 29 Jan 2022 16:43:19 +0000 (29 16:43 +0000)
committertyler_w@apple.com <tyler_w@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 29 Jan 2022 16:43:19 +0000 (29 16:43 +0000)
tree1af03d0aff4553ee5b36a82f539c524b67cc2285
parentd3ddddbbb6dbbfaf8954c4a884b526f5391b2080
AX: Isolated tree objects don't update their AXPropertyName::ElementRect or AXPropertyName::BoundingBoxRect in response to dynamic page changes
https://bugs.webkit.org/show_bug.cgi?id=235833

Reviewed by Chris Fleizach.

Source/WebCore:

Because isolated tree objects don't update their
AXPropertyName::ElementRect or AXPropertyName::BoundingBoxRect
anytime after AXIsolatedObject::initializeAttributeData,
any dynamic page change that causes the element to move or change
size will result in the isolated AX object holding out-of-date values
for these properties.

This patch remedies this deferring to the live, main-thread AX object
when serving elementRect and boundingBoxRect.

Test: accessibility/dynamic-changes-update-position.html

* accessibility/isolatedtree/AXIsolatedObject.cpp:
(WebCore::AXIsolatedObject::initializeAttributeData):
Stop caching the now removed properties AXPropertyName::ElementRect and AXPropertyName::BoundingBoxRect.
(WebCore::AXIsolatedObject::boundingBoxRect const):
(WebCore::AXIsolatedObject::elementRect const):
Retrieve these values from the main-thread instead of the now removed
AXPropertyName::ElementRect and AXPropertyName::BoundingBoxRect.
* accessibility/isolatedtree/AXIsolatedObject.h:
* accessibility/isolatedtree/AXIsolatedTree.h:
Remove AXPropertyName::ElementRect and AXPropertyName::BoundingBoxRect.

LayoutTests:

Add test reproducing this issue.

* accessibility/dynamic-changes-update-position-expected.txt: Added.
* accessibility/dynamic-changes-update-position.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@288791 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/accessibility/dynamic-changes-update-position-expected.txt [new file with mode: 0644]
LayoutTests/accessibility/dynamic-changes-update-position.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp
Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h
Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h