Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 551f6e680f88d6144cac7dd9b98a41ea25987db9
      
https://github.com/WebKit/WebKit/commit/551f6e680f88d6144cac7dd9b98a41ea25987db9
  Author: Dominic Mazzoni <dm_mazz...@apple.com>
  Date:   2024-01-29 (Mon, 29 Jan 2024)

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

  Log Message:
  -----------
  AX: should be able to compute AXPosition using the isolated tree
https://bugs.webkit.org/show_bug.cgi?id=267957
rdar://problem/121472048

Reviewed by Andres Gonzalez.

The relative frame that we're caching in the isolated tree is already
in the correct screen coordinates, all that's necessary is to cache
the screen relative position of the root, and then add them together.

We can update the cached root position when AXGeometryManager
updates object regions.

There isn't an easy way to write a layout test for this, as there
doesn't seem to be a way to move the window's origin.

In order to manually test this, I temporarily disabled AXRelativeFrame,
forcing VoiceOver to use AXPosition for every element, then I checked
that the bounds are correct when navigating and when moving and resizing
the window.

The main performance win I observe is when VoiceOver tries to focus on the
root web area when the page is busy. Without this patch, VoiceOver can
get blocked on the main thread, but with this patch it's no longer blocked.

* Source/WebCore/accessibility/AXGeometryManager.cpp:
(WebCore::AXGeometryManager::willUpdateObjectRegions):
* Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp:
(WebCore::AXIsolatedObject::screenRelativePosition const):
* Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp:
(WebCore::AXIsolatedTree::updateNodeProperties):
(WebCore::AXIsolatedTree::updateRootScreenRelativePosition):
* Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h:

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


_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to