Title: [288220] trunk/Source/WebCore
- Revision
- 288220
- Author
- [email protected]
- Date
- 2022-01-19 11:41:50 -0800 (Wed, 19 Jan 2022)
Log Message
AX: Remove unnecessary isolated tree update for AXSelectedTextChanged node
https://bugs.webkit.org/show_bug.cgi?id=235343
Reviewed by Chris Fleizach.
When we get an AXSelectedTextChanged notification, we update the isolated tree with
the node that has gained selection. Sometimes this node is not yet part of the AX tree,
meaning its AXAncestorFlags are not initialized. This results in hitting this ASSERT in AXIsolatedObject::initializeAttributeData:
// For all objects besides the root, the ancestry flags should've been set by now.
ASSERT(isRoot || object.ancestorFlagsAreInitialized());
Updating the isolated tree with the selection node was added here to fix accessibility/mac/search-text/search-text.html:
https://bugs.webkit.org/show_bug.cgi?id=208434
But the test passes in ITM with and without updating the isolated tree with this node.
Also, for text selection related operations, isolated tree objects currently defer to the main thread
(e.g. AXIsolatedObject::selectedText, AXIsolatedObject::selectedText).
This patch removes this update since it doesn't seem to be necessary.
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::postTextStateChangeNotification):
(WebCore::AXObjectCache::updateIsolatedTree):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (288219 => 288220)
--- trunk/Source/WebCore/ChangeLog 2022-01-19 19:37:40 UTC (rev 288219)
+++ trunk/Source/WebCore/ChangeLog 2022-01-19 19:41:50 UTC (rev 288220)
@@ -1,3 +1,31 @@
+2022-01-19 Tyler Wilcock <[email protected]>
+
+ AX: Remove unnecessary isolated tree update for AXSelectedTextChanged node
+ https://bugs.webkit.org/show_bug.cgi?id=235343
+
+ Reviewed by Chris Fleizach.
+
+ When we get an AXSelectedTextChanged notification, we update the isolated tree with
+ the node that has gained selection. Sometimes this node is not yet part of the AX tree,
+ meaning its AXAncestorFlags are not initialized. This results in hitting this ASSERT in AXIsolatedObject::initializeAttributeData:
+
+ // For all objects besides the root, the ancestry flags should've been set by now.
+ ASSERT(isRoot || object.ancestorFlagsAreInitialized());
+
+ Updating the isolated tree with the selection node was added here to fix accessibility/mac/search-text/search-text.html:
+
+ https://bugs.webkit.org/show_bug.cgi?id=208434
+
+ But the test passes in ITM with and without updating the isolated tree with this node.
+ Also, for text selection related operations, isolated tree objects currently defer to the main thread
+ (e.g. AXIsolatedObject::selectedText, AXIsolatedObject::selectedText).
+
+ This patch removes this update since it doesn't seem to be necessary.
+
+ * accessibility/AXObjectCache.cpp:
+ (WebCore::AXObjectCache::postTextStateChangeNotification):
+ (WebCore::AXObjectCache::updateIsolatedTree):
+
2022-01-19 Alex Christensen <[email protected]>
[ResourceTiming] nextHopProtocol is exposed regardless of Timing-Allow-Origin
Modified: trunk/Source/WebCore/accessibility/AXObjectCache.cpp (288219 => 288220)
--- trunk/Source/WebCore/accessibility/AXObjectCache.cpp 2022-01-19 19:37:40 UTC (rev 288219)
+++ trunk/Source/WebCore/accessibility/AXObjectCache.cpp 2022-01-19 19:41:50 UTC (rev 288220)
@@ -1497,10 +1497,6 @@
object = rootWebArea();
if (object) {
-#if ENABLE(ACCESSIBILITY_ISOLATED_TREE)
- updateIsolatedTree(*object, AXSelectedTextChanged);
-#endif
-
const AXTextStateChangeIntent& newIntent = (intent.type == AXTextStateChangeTypeUnknown || (m_isSynchronizingSelection && m_textSelectionIntent.type != AXTextStateChangeTypeUnknown)) ? m_textSelectionIntent : intent;
postTextStateChangePlatformNotification(object, newIntent, selection);
}
@@ -3315,7 +3311,6 @@
break;
case AXActiveDescendantChanged:
case AXSelectedChildrenChanged:
- case AXSelectedTextChanged:
case AXValueChanged:
tree->updateNode(object);
break;
@@ -3390,7 +3385,6 @@
break;
case AXActiveDescendantChanged:
case AXSelectedChildrenChanged:
- case AXSelectedTextChanged:
case AXValueChanged: {
bool needsUpdate = appendIfNotContainsMatching(filteredNotifications, notification, [¬ification] (const std::pair<RefPtr<AXCoreObject>, AXNotification>& note) {
return note.second == notification.second && note.first.get() == notification.first.get();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes