RESOLVED FIXED264095
AX: Give user feedback while the isolated tree is being built.
https://bugs.webkit.org/show_bug.cgi?id=264095
Summary AX: Give user feedback while the isolated tree is being built.
Andres Gonzalez
Reported 2023-11-02 09:26:58 PDT
Especially needed for large pages where building the isolated tree can take several seconds.
Attachments
Patch (9.83 KB, patch)
2023-11-02 11:41 PDT, Andres Gonzalez
no flags
Patch (9.83 KB, patch)
2023-11-03 06:35 PDT, Andres Gonzalez
no flags
Patch (9.85 KB, patch)
2023-11-03 14:22 PDT, Andres Gonzalez
no flags
Radar WebKit Bug Importer
Comment 1 2023-11-02 09:27:08 PDT
Andres Gonzalez
Comment 2 2023-11-02 11:41:06 PDT
Andres Gonzalez
Comment 3 2023-11-03 06:35:17 PDT
Tyler Wilcock
Comment 4 2023-11-03 10:27:36 PDT
Comment on attachment 468468 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=468468&action=review > Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp:-155 > - tree->updatingSubtree(nullptr); Is this removing the only place we set updatingSubtree to nullptr? > Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp:181 > + String percent = String::number(percentComplete) + "%"_s; > + String title = AXProcessingPage() + " "_s + percent; I think using makeString will be more efficient here (less String allocations). String title = makeString(AXProcessingPage(), " ", percentComplete, "%"); > Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp:190 > + { AXPropertyName::TitleAttributeValue, title }, I think we can WTFMove(title) here. > Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp:389 > + double i = 0; Is there a more descriptive name that could be used? appendsResolved? Something else? > Source/WebCore/platform/LocalizedStrings.cpp:955 > + return WEB_UI_STRING("Processing page", "Title for the webarea while accessibility isolated tree is being built."); I think this note: "Title for the webarea while accessibility isolated tree is being built." is only used but folks doing localization, who might not know what "isolated tree" is (and probably don't need to). Maybe we just call it the accessibility tree?
Andres Gonzalez
Comment 5 2023-11-03 14:22:19 PDT
Andres Gonzalez
Comment 6 2023-11-03 14:37:19 PDT
(In reply to Tyler Wilcock from comment #4) > Comment on attachment 468468 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=468468&action=review > > > Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp:-155 > > - tree->updatingSubtree(nullptr); > > Is this removing the only place we set updatingSubtree to nullptr? AG: At the moment, this was superfluous, it was always null for a full tree. The only time it is not null is for the empty content tree, and for that tree it remains not null until the tree is destroyed. This will have a role when we implement some sort of feedback during updates of isolated subtrees or to avoid processing notifications while a subtree is being re-built. > > > Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp:181 > > + String percent = String::number(percentComplete) + "%"_s; > > + String title = AXProcessingPage() + " "_s + percent; > > I think using makeString will be more efficient here (less String > allocations). > > String title = makeString(AXProcessingPage(), " ", percentComplete, "%"); AG: we need both Strings, the percent and the title since they are used for different purposes. Also makeString and the operator+ resolve to invoking the same method tryMakeString in StringConcatenate.h, so I don't think there is significant advantage of one over the other performance wise, and + is a lot more readable. > > > Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp:190 > > + { AXPropertyName::TitleAttributeValue, title }, > > I think we can WTFMove(title) here. Fixed. > > > Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp:389 > > + double i = 0; > > Is there a more descriptive name that could be used? appendsResolved? > Something else? counter since that's what it is. > > > Source/WebCore/platform/LocalizedStrings.cpp:955 > > + return WEB_UI_STRING("Processing page", "Title for the webarea while accessibility isolated tree is being built."); > > I think this note: > > "Title for the webarea while accessibility isolated tree is being built." > > is only used but folks doing localization, who might not know what "isolated > tree" is (and probably don't need to). Maybe we just call it the > accessibility tree? Removed "isolated" and left it as "accessibility tree".
EWS
Comment 7 2023-11-06 11:28:46 PST
Committed 270280@main (16714dac0820): <https://commits.webkit.org/270280@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 468477 [details].
Note You need to log in before you can comment on or make changes to this bug.