Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: ed2bfb346eb51503269ee148064da49d3e8d5da9 https://github.com/WebKit/WebKit/commit/ed2bfb346eb51503269ee148064da49d3e8d5da9 Author: Joshua Hoffman <jhoffma...@apple.com> Date: 2024-02-19 (Mon, 19 Feb 2024)
Changed paths: A LayoutTests/accessibility/ax-thread-text-apis/dynamic-text-line-wrapping-expected.txt A LayoutTests/accessibility/ax-thread-text-apis/dynamic-text-line-wrapping.html M Source/WebCore/accessibility/AXLogger.cpp M Source/WebCore/accessibility/AXObjectCache.cpp M Source/WebCore/accessibility/AXObjectCache.h M Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp M Source/WebCore/rendering/RenderBlockFlow.cpp Log Message: ----------- AX: Update cached text runs when line layout changes https://bugs.webkit.org/show_bug.cgi?id=269628 rdar://problem/123122761 Reviewed by Tyler Wilcock. When AX_THREAD_TEXT_APIS is enabled, we cache textruns when objects are initialized. But, when their line layout updates (for example, when the width of their container changes), we do not update the text runs, meaning they will become stale and the line APIs will return incorrect information to clients. This patch hooks into line layout, and updates the cached runs for objects that have changed. One consideration while exploring this patch was whether we need to debounce this caching. But, sampling shows that this computation is not that expensive, making debouncing excessive. * LayoutTests/accessibility/ax-thread-text-apis/dynamic-text-line-wrapping-expected.txt: Added. * LayoutTests/accessibility/ax-thread-text-apis/dynamic-text-line-wrapping.html: Added. * Source/WebCore/accessibility/AXLogger.cpp: (WebCore::operator<<): * Source/WebCore/accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::onTextRunsChanged): (WebCore::AXObjectCache::updateIsolatedTree): * Source/WebCore/accessibility/AXObjectCache.h: * Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp: (WebCore::AXIsolatedTree::updateNodeProperties): * Source/WebCore/rendering/RenderBlockFlow.cpp: (WebCore::RenderBlockFlow::layoutModernLines): Canonical link: https://commits.webkit.org/274999@main To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes