[webkit-changes] [WebKit/WebKit] 969b96: AX: When Safari is full-screen, AXIsolatedObject::...
Tyler Wilcock
noreply at github.com
Thu Dec 12 11:10:50 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 969b96235a07857715dceeb7178431623cfc5b29
https://github.com/WebKit/WebKit/commit/969b96235a07857715dceeb7178431623cfc5b29
Author: Tyler Wilcock <tyler_w at apple.com>
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
More information about the webkit-changes
mailing list