| Summary: | Node changes created by AXIsolatedTree::updateNode are overwritten when performed during AXIsolatedTree::collectNodeChangesForSubtree | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Tyler Wilcock <tyler_w> | ||||||||||||||||
| Component: | Accessibility | Assignee: | Tyler Wilcock <tyler_w> | ||||||||||||||||
| Status: | RESOLVED FIXED | ||||||||||||||||||
| Severity: | Normal | CC: | aboxhall, andresg_22, apinheiro, cfleizach, dmazzoni, ews-watchlist, jcraig, jdiggs, samuel_white, webkit-bug-importer | ||||||||||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||||||||||
| Version: | WebKit Nightly Build | ||||||||||||||||||
| Hardware: | All | ||||||||||||||||||
| OS: | All | ||||||||||||||||||
| Attachments: |
|
||||||||||||||||||
|
Description
Tyler Wilcock
2022-04-15 11:56:02 PDT
Created attachment 457715 [details]
Patch
(In reply to Tyler Wilcock from comment #2) > Created attachment 457715 [details] > Patch This change seems right for the most part. However, some of the cleanup made me realize a bug in the existing code that was the reason the parameter attachWrapper was added. In void AXIsolatedTree::updateNode(AXCoreObject& axObject) { ... auto change = nodeChangeForObject(axObject, parentID, true); ... we have to pass false instead. The reason is that you cannot attach a wrapper on the main thread when that wrapper is already being used on the AX thread. Created attachment 457738 [details]
Patch
(In reply to Tyler Wilcock from comment #5) > Created attachment 457738 [details] > Patch --- a/Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h +++ a/Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h + enum class AttachWrapperImmediately : bool { No, Yes }; I think it would be more accurate: + enum class AttachWrapper : bool { OnMainThread, OnAXThread }; Created attachment 457750 [details]
Patch
(In reply to Tyler Wilcock from comment #7) > Created attachment 457750 [details] > Patch I see a potential problem with splitting the queuingg of removals and appends: - queueChangesAndRemovals(changes, oldChildrenIDs); + resolveAndQueueChanges(); + queueRemovals(oldChildrenIDs); The appends and the removals may be applied in two separate calls of applyPendingChanges, since now we are releasing the lock in between the queuing. Would that have some unintended side effect? Created attachment 457752 [details]
Patch
Created attachment 457753 [details]
Patch
Created attachment 457754 [details]
Patch
Created attachment 457770 [details]
Patch
Committed r292967 (249732@main): <https://commits.webkit.org/249732@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 457770 [details]. |