Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f0e7421cd9a94d12034b9fd496953f2bab292463
      
https://github.com/WebKit/WebKit/commit/f0e7421cd9a94d12034b9fd496953f2bab292463
  Author: Tyler Wilcock <[email protected]>
  Date:   2024-12-12 (Thu, 12 Dec 2024)

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

  Log Message:
  -----------
  AX: AXIsolatedObject::remoteFrameOffset() does an unnecessary ancestry 
traversal
https://bugs.webkit.org/show_bug.cgi?id=284589
rdar://141402485

Reviewed by Chris Fleizach.

With this commit, we now cache AXPropertyName::RemoteFrameOffset in the 
AXIsolatedTree root node rather than in any object
that is AccessibilityRole::WebArea. This means that 
AXIsolatedObject::remoteFrameOffset() no longer has to do an ancestry
traversal to find a webarea, and instead can just access it from 
tree()->rootNode(), turning an O(n) operation into an
O(1) one.

This is especially important because remoteFrameOffset() is called from 
relativeFrame(), a frequently requested property
by ATs, and also is a function that can be called in a loop as part of 
AXIsolatedObject::relativeFrameFromChildren().

* Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp:
(WebCore::AXIsolatedObject::initializeProperties):
(WebCore::AXIsolatedObject::remoteFrameOffset const):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to