Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: c9b5c99e115ef3d76bd4f5240e813e92c4a07047
https://github.com/WebKit/WebKit/commit/c9b5c99e115ef3d76bd4f5240e813e92c4a07047
Author: Joshua Hoffman <[email protected]>
Date: 2025-05-14 (Wed, 14 May 2025)
Changed paths:
A LayoutTests/accessibility/mac/text-color-explicit-changing-expected.txt
A LayoutTests/accessibility/mac/text-color-explicit-changing.html
M Source/WebCore/accessibility/AXObjectCache.cpp
M Source/WebCore/accessibility/AXObjectCache.h
M Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp
M Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h
M Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp
M Source/WebCore/accessibility/isolatedtree/mac/AXIsolatedObjectMac.mm
M Source/WebCore/style/StyleTreeResolver.cpp
M Source/WebCore/style/StyleTreeResolver.h
Log Message:
-----------
AX: AXIsolatedObject::setProperty does unsafe access to accessibility-thread
only data structure, AXIsolatedTree::m_readerThreadNodeMap, when caching
AXProperty::{Font, TextColor}
https://bugs.webkit.org/show_bug.cgi?id=292823
rdar://151077899
Reviewed by Tyler Wilcock.
294634@main made it possible for AXIsoaltedObject::parentObject() to be called
on the main thread,
since it started making calls in setProperty in order to determine the parent
object's style.
Instead of using the isoalted object, we can do the same diff-ing of Text Color
and Font with live
objects. We need to do this in two places: when updating the property and
during initialization.
To ensure we aren't updating the Font or Text Color property multiple times, we
only update once
per subtree that had a Font/Color change, utilizing the parent stack in the
style tree resolver.
At the same time, our new way of caching Font and Text Color using ancestors
allows us to stop
caching these properties on static text, and instead cache them on any Element.
This maintains
our previous optimization, and prevents possible duplication of properties.
This patch was co-authored by Tyler Wilcock.
* Source/WebCore/accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::onStyleChange):
* Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp:
(WebCore::AXIsolatedObject::setProperty):
(WebCore::defaultTextColor):
(WebCore::getColor):
(WebCore::AXIsolatedObject::cachedTextColor const):
(WebCore::getFont):
(WebCore::AXIsolatedObject::cachedFont const):
(WebCore::AXIsolatedObject::colorAttributeValue const):
(WebCore::AXIsolatedObject::fontAttributeValue const):
* Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h:
* Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp:
(WebCore::AXIsolatedTree::updateNodeProperties):
Canonical link: https://commits.webkit.org/294909@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