WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
270395
AX: Add notification for VoiceOver to announce percentage of completion of isolated tree creation.
https://bugs.webkit.org/show_bug.cgi?id=270395
Summary
AX: Add notification for VoiceOver to announce percentage of completion of is...
Andres Gonzalez
Reported
2024-03-02 12:30:21 PST
.
Attachments
Patch
(7.30 KB, patch)
2024-03-02 12:41 PST
,
Andres Gonzalez
no flags
Details
Formatted Diff
Diff
Patch
(8.19 KB, patch)
2024-03-04 10:05 PST
,
Andres Gonzalez
no flags
Details
Formatted Diff
Diff
Patch
(13.11 KB, patch)
2024-03-06 14:34 PST
,
Andres Gonzalez
no flags
Details
Formatted Diff
Diff
Patch
(12.06 KB, patch)
2024-03-06 17:12 PST
,
Andres Gonzalez
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2024-03-02 12:30:37 PST
<
rdar://problem/123951195
>
Andres Gonzalez
Comment 2
2024-03-02 12:31:56 PST
rdar://122335605
Andres Gonzalez
Comment 3
2024-03-02 12:41:45 PST
Created
attachment 470141
[details]
Patch
chris fleizach
Comment 4
2024-03-02 13:51:22 PST
Comment on
attachment 470141
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=470141&action=review
> Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h:505 > + String titleAttributeValue() const;
should this be final
Andres Gonzalez
Comment 5
2024-03-03 14:54:44 PST
(In reply to chris fleizach from
comment #4
)
> Comment on
attachment 470141
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=470141&action=review
> > > Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h:505 > > + String titleAttributeValue() const; > > should this be final
The whole class is final, so I don't think we need to add final to each individual method.
chris fleizach
Comment 6
2024-03-03 14:59:57 PST
Comment on
attachment 470141
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=470141&action=review
>>> Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h:505 >>> + String titleAttributeValue() const; >> >> should this be final > > The whole class is final, so I don't think we need to add final to each individual method.
Maybe we should remove final from all the other methods then?
Andres Gonzalez
Comment 7
2024-03-03 15:04:27 PST
(In reply to chris fleizach from
comment #6
)
> Comment on
attachment 470141
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=470141&action=review
> > >>> Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h:505 > >>> + String titleAttributeValue() const; > >> > >> should this be final > > > > The whole class is final, so I don't think we need to add final to each individual method. > > Maybe we should remove final from all the other methods then?
I'll check whether there is a WebKit/C++ guideline about this, and address in a separate patch.
Andres Gonzalez
Comment 8
2024-03-04 10:05:00 PST
Created
attachment 470162
[details]
Patch
Andres Gonzalez
Comment 9
2024-03-04 10:09:12 PST
(In reply to chris fleizach from
comment #6
)
> Comment on
attachment 470141
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=470141&action=review
> > >>> Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h:505 > >>> + String titleAttributeValue() const; > >> > >> should this be final > > > > The whole class is final, so I don't think we need to add final to each individual method. > > Maybe we should remove final from all the other methods then?
There are some advantages in declaring each member function as final in addition to declaring the class final. So I'm correcting myself and made that change. Also changed it for a couple of other methods related to datetimes I added before. Thanks.
Andres Gonzalez
Comment 10
2024-03-06 14:34:40 PST
Created
attachment 470212
[details]
Patch
Tyler Wilcock
Comment 11
2024-03-06 15:31:44 PST
Comment on
attachment 470212
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=470212&action=review
> Source/WebCore/accessibility/AXLogger.cpp:58 > + static NeverDestroyed nameFilter = Vector<String> { "AXIsolatedTree::updateLoadingProgress"_s, "AXIsolatedTree::reportLoadingProgress"_s, "AXIsolatedTree::create"_s };
Do we want to commit this? Or is it left over from debugging?
> Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp:146 > + else > + AXLOG("no existing tree!");
Do we want to commit this? Or is it leftover from debugging?
> Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp:198 > + String percent = String::number(std::ceil(loadingProgress() * 100)) + "%"_s;
I know this problem existed before this patch, but I realize now that this is not localized. For example, some locales expect the percentage sign to be first. Maybe we can address this in a follow-up patch.
> Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp:203 > + if (RefPtr axWebarea = cache ? cache->rootWebArea() : nullptr) {
Most places seem to capitalize web area like axWebArea, rather than axWebarea.
Andres Gonzalez
Comment 12
2024-03-06 17:12:15 PST
Created
attachment 470218
[details]
Patch
Andres Gonzalez
Comment 13
2024-03-06 17:15:20 PST
(In reply to Tyler Wilcock from
comment #11
)
> Comment on
attachment 470212
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=470212&action=review
> > > Source/WebCore/accessibility/AXLogger.cpp:58 > > + static NeverDestroyed nameFilter = Vector<String> { "AXIsolatedTree::updateLoadingProgress"_s, "AXIsolatedTree::reportLoadingProgress"_s, "AXIsolatedTree::create"_s }; > > Do we want to commit this? Or is it left over from debugging? > > > Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp:146 > > + else > > + AXLOG("no existing tree!"); > > Do we want to commit this? Or is it leftover from debugging? > > > Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp:198 > > + String percent = String::number(std::ceil(loadingProgress() * 100)) + "%"_s; > > I know this problem existed before this patch, but I realize now that this > is not localized. For example, some locales expect the percentage sign to be > first. Maybe we can address this in a follow-up patch. > > > Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp:203 > > + if (RefPtr axWebarea = cache ? cache->rootWebArea() : nullptr) { > > Most places seem to capitalize web area like axWebArea, rather than > axWebarea.
Addressed all comments except the localization issue which I'll fix in a separate follow up. Thanks!
Tyler Wilcock
Comment 14
2024-03-06 17:20:41 PST
Comment on
attachment 470218
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=470218&action=review
> Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp:206 > + if (cache) > + cache->postPlatformNotification(axWebArea.get(), AXObjectCache::AXNotification::AXLayoutComplete);
So we're posting layout complete notifications to report partial progress? That doesn't feel exactly right to me — there's no layout happening here, and it's not complete (presumably unless processingProgress == 1). Can you help me understand why we do it this way?
Andres Gonzalez
Comment 15
2024-03-06 18:00:15 PST
(In reply to Tyler Wilcock from
comment #14
)
> Comment on
attachment 470218
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=470218&action=review
> > > Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp:206 > > + if (cache) > > + cache->postPlatformNotification(axWebArea.get(), AXObjectCache::AXNotification::AXLayoutComplete); > > So we're posting layout complete notifications to report partial progress? > That doesn't feel exactly right to me — there's no layout happening here, > and it's not complete (presumably unless processingProgress == 1). Can you > help me understand why we do it this way?
As I put in the commit comment, that's what VoiceOver expects and reacts to in order to announce loading progress. There is a long story about this workaround that is beyond the scope of this change, but I agree that this should be refactored in the future.
Tyler Wilcock
Comment 16
2024-03-06 18:58:09 PST
(In reply to Andres Gonzalez from
comment #15
)
> (In reply to Tyler Wilcock from
comment #14
) > > Comment on
attachment 470218
[details]
> > Patch > > > > View in context: > >
https://bugs.webkit.org/attachment.cgi?id=470218&action=review
> > > > > Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp:206 > > > + if (cache) > > > + cache->postPlatformNotification(axWebArea.get(), AXObjectCache::AXNotification::AXLayoutComplete); > > > > So we're posting layout complete notifications to report partial progress? > > That doesn't feel exactly right to me — there's no layout happening here, > > and it's not complete (presumably unless processingProgress == 1). Can you > > help me understand why we do it this way? > > As I put in the commit comment, that's what VoiceOver expects and reacts to > in order to announce loading progress. There is a long story about this > workaround that is beyond the scope of this change, but I agree that this > should be refactored in the future.
OK, got it. Might be nice to have a FIXME comment here so we don't forget.
EWS
Comment 17
2024-03-07 07:08:48 PST
Committed
275788@main
(44f5b661008a): <
https://commits.webkit.org/275788@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 470218
[details]
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug