Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 969b96235a07857715dceeb7178431623cfc5b29
      
https://github.com/WebKit/WebKit/commit/969b96235a07857715dceeb7178431623cfc5b29
  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: When Safari is full-screen, AXIsolatedObject::screenRelativePosition() 
hits the main-thread unnecessarily
https://bugs.webkit.org/show_bug.cgi?id=284491
rdar://141314514

Reviewed by Chris Fleizach.

This happened because after https://bugs.webkit.org/show_bug.cgi?id=267957, 
AXIsolatedObject::screenRelativePosition()
uses the cached root screen relative position to compute the screen relative 
position for every other object. But
because we intentionally don't cache properties that are in their default-value 
state, we don't cache
AXPropertyName::ScreenRelativePosition {0, 0} for the root (which is the right 
value when Safari is full-screen).

Thus, this:

if (auto rootPoint = 
rootNode->optionalAttributeValue<FloatPoint>(AXPropertyName::ScreenRelativePosition))

Fails to evaluate to true, and we hit the main-thread.

With this commit, we use propertyValue<FloatPoint>, which returns a {0, 0} 
point if the property is not present.

This commit also de-duplicates some isWebArea() and isScrollArea() checks in 
AXIsolatedObject::initializeProperties.

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

Canonical link: https://commits.webkit.org/287754@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