Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 3bd815f263d2986243ffd88926512838a28a45a9
https://github.com/WebKit/WebKit/commit/3bd815f263d2986243ffd88926512838a28a45a9
Author: Andres Gonzalez <[email protected]>
Date: 2024-04-02 (Tue, 02 Apr 2024)
Changed paths:
M Source/WebCore/accessibility/AXObjectCache.cpp
M Source/WebCore/accessibility/AXObjectCache.h
M Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm
Log Message:
-----------
AX: Assert crash in AXIsolatedObject::attributedStringForTextMarkerRange.
https://bugs.webkit.org/show_bug.cgi?id=272026
<rdar://problem/125779941>
Reviewed by Tyler Wilcock.
When creating an AttributedString we are checking whether to add spelling info
in AXObjectCache::shouldSpellCheck that in turn calls accessibilityEnabled()
which was assumed to be called only on the main thread. This patch makes
accessibilityEnabled() thread safe so that it can be called on and off the main
thread.
The patch also changes the wrapper's attributedStringForTextMarkerRange helper
funtion to take the backing object as a parameter instead of getting it again.
* Source/WebCore/accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::accessibilityEnabled): Inlined in header.
(WebCore::AXObjectCache::enableAccessibility): Inlined in header
(WebCore::AXObjectCache::disableAccessibility): Inlined in header
(WebCore::AXObjectCache::forceDeferredSpellChecking): Inlined in header
(WebCore::AXObjectCache::setForceDeferredSpellChecking): Inlined in header
* Source/WebCore/accessibility/AXObjectCache.h:
(WebCore::AXObjectCache::accessibilityEnabled):
(WebCore::AXObjectCache::enableAccessibility):
(WebCore::AXObjectCache::disableAccessibility):
(WebCore::AXObjectCache::forceDeferredSpellChecking):
(WebCore::AXObjectCache::setForceDeferredSpellChecking):
* Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(attributedStringForTextMarkerRange):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
(-[WebAccessibilityObjectWrapper
attributedStringForTextMarkerRange:spellCheck:]): Deleted.
Canonical link: https://commits.webkit.org/276968@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