Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 9343d8ff722ecfe6379cf2668fc1c0d13bd902ce https://github.com/WebKit/WebKit/commit/9343d8ff722ecfe6379cf2668fc1c0d13bd902ce Author: Joshua Hoffman <jhoffma...@apple.com> Date: 2025-03-19 (Wed, 19 Mar 2025)
Changed paths: M Source/WebCore/accessibility/AXCoreObject.h M Source/WebCore/accessibility/AXLogger.cpp M Source/WebCore/accessibility/AXTextMarker.cpp M Source/WebCore/accessibility/AXTextRun.cpp M Source/WebCore/accessibility/AXTextRun.h M Source/WebCore/accessibility/AccessibilityObject.h M Source/WebCore/accessibility/AccessibilityRenderObject.cpp M Source/WebCore/accessibility/cocoa/AccessibilityObjectCocoa.mm M Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp M Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h M Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h M Source/WebCore/accessibility/isolatedtree/mac/AXIsolatedObjectMac.mm Log Message: ----------- AX: [AX Thread Text APIs] Estimated range bounds aren't accurate https://bugs.webkit.org/show_bug.cgi?id=290015 rdar://147365717 Reviewed by Tyler Wilcock. Our old approach of computing text marker range bounds off of the main thread, using a fixed, estimated character width, would lead to frames that were inaccurate and didn't properly highlight the range. To account for variable character widths, we can instead reference the CTFont's properties, which we already cache on isolated objects. The `advance` of a series of the glyphs provides an accurate horizontal width of a text range. Follow up PRs will be necessary to address geometry and character manipulation like transforms and letter-spacing. * Source/WebCore/accessibility/AXCoreObject.h: * Source/WebCore/accessibility/AXLogger.cpp: (WebCore::operator<<): * Source/WebCore/accessibility/AXTextMarker.cpp: (WebCore::viewportRelativeFrameFromRuns): * Source/WebCore/accessibility/AXTextRun.cpp: (WebCore::AXTextRuns::localRect const): * Source/WebCore/accessibility/AXTextRun.h: (WebCore::AXTextRuns::AXTextRuns): * Source/WebCore/accessibility/AccessibilityObject.h: * Source/WebCore/accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::textRuns): * Source/WebCore/accessibility/cocoa/AccessibilityObjectCocoa.mm: (WebCore::AccessibilityObject::fontOrientation const): * Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp: (WebCore::AXIsolatedObject::setProperty): * Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h: * Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h: * Source/WebCore/accessibility/isolatedtree/mac/AXIsolatedObjectMac.mm: (WebCore::AXIsolatedObject::initializePlatformProperties): Canonical link: https://commits.webkit.org/292392@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