WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
262929
AX: Attribute cache is not enabled in traverseToOffsetInRange
https://bugs.webkit.org/show_bug.cgi?id=262929
Summary
AX: Attribute cache is not enabled in traverseToOffsetInRange
Joshua Hoffman
Reported
2023-10-09 15:40:00 PDT
The attribute cache is not enabled in traverseToOffsetInRange, causing more accessibilityIsIgnored calls than necessary.
Attachments
Patch
(1.50 KB, patch)
2023-10-09 16:29 PDT
,
Joshua Hoffman
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2023-10-09 15:40:09 PDT
<
rdar://problem/116703599
>
Joshua Hoffman
Comment 2
2023-10-09 16:29:37 PDT
Created
attachment 468137
[details]
Patch
Andres Gonzalez
Comment 3
2023-10-10 06:39:38 PDT
(In reply to Joshua Hoffman from
comment #2
)
> Created
attachment 468137
[details]
> Patch
diff --git a/Source/WebCore/accessibility/AXObjectCache.cpp b/Source/WebCore/accessibility/AXObjectCache.cpp index 05688086b278..bea7eaf1ef97 100644 --- a/Source/WebCore/accessibility/AXObjectCache.cpp +++ b/Source/WebCore/accessibility/AXObjectCache.cpp @@ -2679,6 +2679,9 @@ CharacterOffset AXObjectCache::traverseToOffsetInRange(const SimpleRange& range, behaviors.add(TextIteratorBehavior::EntersTextControls); TextIterator iterator(range, behaviors); + // Enable the cache here for accessibilityIsIgnored calls in replacedNodeNeedsCharacter + AXAttributeCacheEnabler enableCache(this); AG: if the problem is in replacedNodeNeedsCharacter, shouldn't we enable the caching there instead? + // When the range has zero length, there might be replaced node or brTag that we need to increment the characterOffset. if (iterator.atEnd()) { currentNode = range.start.container.ptr();
Joshua Hoffman
Comment 4
2023-10-10 08:48:40 PDT
(In reply to Andres Gonzalez from
comment #3
)
> (In reply to Joshua Hoffman from
comment #2
) > > Created
attachment 468137
[details]
> > Patch > + // Enable the cache here for accessibilityIsIgnored calls in > replacedNodeNeedsCharacter > + AXAttributeCacheEnabler enableCache(this); > > AG: if the problem is in replacedNodeNeedsCharacter, shouldn't we enable the > caching there instead?
replacedNodeNeedsCharacter, is called in a loop inside traverseToOffsetInRange, so we want to make sure the cache stays enabled across all of those calls to prevent duplicate work.
EWS
Comment 5
2023-10-10 09:45:51 PDT
Committed
269149@main
(7d4e7afc92b3): <
https://commits.webkit.org/269149@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 468137
[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