Summary: | AX: Update cached text runs when line layout changes | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Joshua Hoffman <jhoffman23> | ||||||
Component: | Accessibility | Assignee: | Joshua Hoffman <jhoffman23> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | aboxhall, andresg_22, apinheiro, cfleizach, changseok, dmazzoni, esprehn+autocc, ews-watchlist, glenn, jcraig, kondapallykalyan, pdr, samuel_white, tyler_w, webkit-bug-importer | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Attachments: |
|
Description
Joshua Hoffman
2024-02-16 16:48:37 PST
Created attachment 469939 [details]
Patch
Comment on attachment 469939 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=469939&action=review > COMMIT_MESSAGE:17 > +* LayoutTests/accessibility/ax-thread-text-apis/changing-text-runs.html: Added. I wonder if something like "dynamic-text-line-wrapping.html" would be a better name. I imagine we'll want to add lots more tests where we dynamically change the underlying text runs data structure and test the result, which would make the current name of this test confusing. > Source/WebCore/accessibility/AXObjectCache.h:221 > + void onTextRunsChanged(RenderObject&); Can this be const RenderObject&? > Source/WebCore/rendering/RenderBlockFlow.cpp:4042 > + if (auto* axObjectCache = document().axObjectCache()) This should use Document::existingAXObjectCache() instead of axObjectCache(). The latter creates a cache if one doesn't already exist, which is probably not what we want here? Maybe just `cache` instead of `axObjectCache`? > LayoutTests/accessibility/ax-thread-text-apis/changing-text-runs.html:9 > +<p id="line" style="word-break: break-word;">Hello world.</p> Maybe id="paragraph"? > LayoutTests/accessibility/ax-thread-text-apis/changing-text-runs.html:12 > +<script> > + var output = "This tests that text runs are updated when a container is resized and text wraps.\n"; Everything inside the script tag can be indented one less level. Comment on attachment 469939 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=469939&action=review >> COMMIT_MESSAGE:17 >> +* LayoutTests/accessibility/ax-thread-text-apis/changing-text-runs.html: Added. > > I wonder if something like "dynamic-text-line-wrapping.html" would be a better name. I imagine we'll want to add lots more tests where we dynamically change the underlying text runs data structure and test the result, which would make the current name of this test confusing. Good point, will update that. Created attachment 469966 [details]
Patch
Committed 274999@main (ed2bfb346eb5): <https://commits.webkit.org/274999@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 469966 [details]. |