RESOLVED FIXED 241915
AX ITM: AXIsolatedTree::updateNode doesn't update if the target node is a descendant of a barren object.
https://bugs.webkit.org/show_bug.cgi?id=241915
Summary AX ITM: AXIsolatedTree::updateNode doesn't update if the target node is a des...
Andres Gonzalez
Reported 2022-06-23 07:48:39 PDT
This causes, for instance, that a button title is not updated if it is modified as follows: <button id="button"> <span id="counter">0<span> </button> document.getElementById("counter").innerText = "3";
Attachments
Patch (14.68 KB, patch)
2022-06-23 08:52 PDT, Andres Gonzalez
no flags
Patch (14.63 KB, patch)
2022-06-23 12:05 PDT, Andres Gonzalez
no flags
Patch (14.63 KB, patch)
2022-06-23 18:09 PDT, Andres Gonzalez
no flags
Radar WebKit Bug Importer
Comment 1 2022-06-23 07:48:48 PDT
Andres Gonzalez
Comment 2 2022-06-23 08:52:12 PDT
chris fleizach
Comment 3 2022-06-23 09:21:36 PDT
Comment on attachment 460444 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=460444&action=review > Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp:367 > + ASSERT(is<AccessibilityObject>(axObject)); I don't know if we need to assert here, because it will crash on the next line anyway
chris fleizach
Comment 4 2022-06-23 09:22:52 PDT
Comment on attachment 460444 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=460444&action=review > Source/WebCore/accessibility/AXObjectCache.cpp:1913 > + handleTextChanged(getOrCreate(element)); I'm worried about the getOrCreate() here. this might get fired during layout and creating ax objects can be problematic. it looks like the rest of the versions here only use get() or defer changes
Andres Gonzalez
Comment 5 2022-06-23 09:31:42 PDT
(In reply to chris fleizach from comment #4) > Comment on attachment 460444 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=460444&action=review > > > Source/WebCore/accessibility/AXObjectCache.cpp:1913 > > + handleTextChanged(getOrCreate(element)); > > I'm worried about the getOrCreate() here. this might get fired during layout > and creating ax objects can be problematic. it looks like the rest of the > versions here only use get() or defer changes That's what we had before for textChanged: -void AXObjectCache::textChanged(Node* node) { - textChanged(getOrCreate(node)); -} I could change that, but didn't want to change a long standing behavior this late.
chris fleizach
Comment 6 2022-06-23 09:44:10 PDT
Comment on attachment 460444 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=460444&action=review >>> Source/WebCore/accessibility/AXObjectCache.cpp:1913 >>> + handleTextChanged(getOrCreate(element)); >> >> I'm worried about the getOrCreate() here. this might get fired during layout and creating ax objects can be problematic. it looks like the rest of the versions here only use get() or defer changes > > That's what we had before for textChanged: > > -void AXObjectCache::textChanged(Node* node) > { > - textChanged(getOrCreate(node)); > -} > > I could change that, but didn't want to change a long standing behavior this late. if its the same behavior we can probably keep as is but could be problematic in the future
Andres Gonzalez
Comment 7 2022-06-23 12:05:33 PDT
Andres Gonzalez
Comment 8 2022-06-23 12:07:20 PDT
(In reply to chris fleizach from comment #3) > Comment on attachment 460444 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=460444&action=review > > > Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp:367 > > + ASSERT(is<AccessibilityObject>(axObject)); > > I don't know if we need to assert here, because it will crash on the next > line anyway Removed assert.
Andres Gonzalez
Comment 9 2022-06-23 12:09:06 PDT
(In reply to chris fleizach from comment #6) > Comment on attachment 460444 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=460444&action=review > > >>> Source/WebCore/accessibility/AXObjectCache.cpp:1913 > >>> + handleTextChanged(getOrCreate(element)); > >> > >> I'm worried about the getOrCreate() here. this might get fired during layout and creating ax objects can be problematic. it looks like the rest of the versions here only use get() or defer changes > > > > That's what we had before for textChanged: > > > > -void AXObjectCache::textChanged(Node* node) > > { > > - textChanged(getOrCreate(node)); > > -} > > > > I could change that, but didn't want to change a long standing behavior this late. > > if its the same behavior we can probably keep as is but could be problematic > in the future Agree.
Andres Gonzalez
Comment 10 2022-06-23 18:09:22 PDT
EWS
Comment 11 2022-06-23 19:46:26 PDT
Committed 251817@main (6dfa4f8dfed6): <https://commits.webkit.org/251817@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 460471 [details].
Note You need to log in before you can comment on or make changes to this bug.