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
268672
AX: Implement off-main-thread AXTextMarker::partialOrder and AXCoreObject::textMarkerRange
https://bugs.webkit.org/show_bug.cgi?id=268672
Summary
AX: Implement off-main-thread AXTextMarker::partialOrder and AXCoreObject::te...
Tyler Wilcock
Reported
2024-02-02 16:55:19 PST
...
Attachments
Patch
(20.61 KB, patch)
2024-02-02 17:04 PST
,
Tyler Wilcock
no flags
Details
Formatted Diff
Diff
Patch
(42.75 KB, patch)
2024-02-04 10:04 PST
,
Tyler Wilcock
no flags
Details
Formatted Diff
Diff
Patch
(43.52 KB, patch)
2024-02-06 10:37 PST
,
Tyler Wilcock
no flags
Details
Formatted Diff
Diff
Patch
(46.17 KB, patch)
2024-02-06 10:52 PST
,
Tyler Wilcock
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2024-02-02 16:55:33 PST
<
rdar://problem/122212250
>
Tyler Wilcock
Comment 2
2024-02-02 17:04:10 PST
Created
attachment 469682
[details]
Patch
Tyler Wilcock
Comment 3
2024-02-04 10:04:13 PST
Created
attachment 469716
[details]
Patch
Joshua Hoffman
Comment 4
2024-02-06 09:26:04 PST
Comment on
attachment 469716
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=469716&action=review
> Source/WebCore/accessibility/AXTextMarker.cpp:610 > + RefPtr start = isolatedObject(); > + RefPtr current = start->hasTextRuns() ? WTFMove(start) : findObjectWithRuns(*start, AXDirection::Next);
Is `start` guaranteed to be non-null here? AXTextMarker::object() looks like it can return a nullptr, which would make start null as well.
> Source/WebCore/accessibility/AXTextMarker.h:183 > + AXTextMarker findLast(std::optional<AXID> = std::nullopt) const;
Nit: do you think we should name this something like `findLastBefore`? This comment helps explain that it navigates "to the last marker before the given AXID", but I can see confusion without that context.
> Source/WebCore/accessibility/isolatedtree/mac/AXIsolatedObjectMac.mm:144 > + // This object doesn't have text content of its own. Create a range pointing to the first and last > + // text positions of our descendants. We can do this by stopping text marker traversal when we try > + // to move to our sibling. For example, getting textMarkerRange() for {ID 1, Role Group}:
These comments & diagrams have been super helpful, thanks for including them!
Tyler Wilcock
Comment 5
2024-02-06 10:37:50 PST
Created
attachment 469752
[details]
Patch
Tyler Wilcock
Comment 6
2024-02-06 10:39:54 PST
(In reply to Joshua Hoffman from
comment #4
)
> Comment on
attachment 469716
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=469716&action=review
> > > Source/WebCore/accessibility/AXTextMarker.cpp:610 > > + RefPtr start = isolatedObject(); > > + RefPtr current = start->hasTextRuns() ? WTFMove(start) : findObjectWithRuns(*start, AXDirection::Next); > > Is `start` guaranteed to be non-null here? AXTextMarker::object() looks like > it can return a nullptr, which would make start null as well.
It is technically guaranteed to be non-null, as we return early for !isValid() above. But if the object dies between that check and when we use isolatedObject() here, then we will nullptr crash. I'm not sure if this is possible, but if it is, we have this problem elsewhere and we can address it holistically later.
> > Source/WebCore/accessibility/AXTextMarker.h:183 > > + AXTextMarker findLast(std::optional<AXID> = std::nullopt) const; > > Nit: do you think we should name this something like `findLastBefore`? This > comment helps explain that it navigates "to the last marker before the given > AXID", but I can see confusion without that context.
Good idea, fixed!
Tyler Wilcock
Comment 7
2024-02-06 10:52:29 PST
Created
attachment 469753
[details]
Patch
EWS
Comment 8
2024-02-07 13:13:42 PST
Committed
274240@main
(6429c99998c8): <
https://commits.webkit.org/274240@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 469753
[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