| Summary: | AX: When updating the isolated tree with a remove and add of the same object, the wrapper is not re-attached | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| 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-02-07 16:53:22 PST
Created attachment 451175 [details]
Patch
(In reply to Tyler Wilcock from comment #2) > Created attachment 451175 [details] > Patch - if (!item.isolatedObject->wrapper()) { - // The new object hasn't been attached a wrapper yet, so attach it. + // If the new object hasn't been attached to a wrapper yet, or if it was detached from + // the wrapper when processing removals above, we must attach / re-attach it. + if (!item.isolatedObject->wrapper() || detachedObjectIDs.contains(axID)) item.isolatedObject->attachPlatformWrapper(wrapper.get()); Good catch! I think though that it would be a better solution to check for whether the wrapper has an isolatedObject, and if not, attach the isolated object to the wrapper, instead of creating this new collection and looking up the AXID. Created attachment 451204 [details]
Patch
Created attachment 451206 [details]
Patch
Committed r289368 (246956@main): <https://commits.webkit.org/246956@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 451206 [details]. |