[webkit-changes] [WebKit/WebKit] 056b2f: AX: empty strings shouldn't be cached in isolated ...
Commit Queue
noreply at github.com
Mon Jun 3 13:16:33 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 056b2fd838edea9438b460d717b8c8ca8f8d07a2
https://github.com/WebKit/WebKit/commit/056b2fd838edea9438b460d717b8c8ca8f8d07a2
Author: Dominic Mazzoni <dm_mazzoni at apple.com>
Date: 2024-06-03 (Mon, 03 Jun 2024)
Changed paths:
M Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp
M Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h
Log Message:
-----------
AX: empty strings shouldn't be cached in isolated tree
https://bugs.webkit.org/show_bug.cgi?id=274392
rdar://problem/128397189
Reviewed by Tyler Wilcock.
AXIsolatedObject::setProperty checks to see if a property value is
equal to the default to avoid setting it. This logic has a small bug
when it comes to strings, because the null string and empty string are
not considered equal, but we don't need to store either in the
property map. By calling isEmpty() instead of comparing to
emptyString(), we can ensure no empty strings are stored in the
property map.
The impact of this change on memory usage is negligible by itself, but
it will help future optimizations by making the overall property map
significantly smaller.
* Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp:
(WebCore::AXIsolatedObject::setProperty):
(WebCore::AXIsolatedObject::stringAttributeValueNullIfMissing const):
* Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h:
Canonical link: https://commits.webkit.org/279669@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