Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 168604874bc2171c5c7a39c2969e35d9b96f17cb
https://github.com/WebKit/WebKit/commit/168604874bc2171c5c7a39c2969e35d9b96f17cb
Author: Andres Gonzalez <[email protected]>
Date: 2023-10-12 (Thu, 12 Oct 2023)
Changed paths:
M Source/WebCore/accessibility/AccessibilityObject.cpp
M Source/WebCore/accessibility/AccessibilityObject.h
Log Message:
-----------
AX: AccessibilityObject::listMarkerTextForNodeAndPosition overload that takes
a VisiblePosition is not performant.
https://bugs.webkit.org/show_bug.cgi?id=263032
<rdar://problem/116826061>
Reviewed by Tyler Wilcock.
Follow up to https://bugs.webkit.org/show_bug.cgi?id=262990.
This overload has the same problem identified in bug 262990 where it can
perform expensive operations unnecessarily like determining whether two
VisiblePositions are in the same line. This patch removes this method overload
and provides a more efficient way of achieving the same functionality along the
lines of the change made in the above mentioned bug. It also eliminates the
ambiguity about which overload is called when a caller invokes the method with
a Position that can be implicitly converted to a VisiblePosition. The addition
of a parameter to the static helper listMarkerText, avoids calling
RenderListItem::markerTextWithSuffix twice.
* Source/WebCore/accessibility/AccessibilityObject.cpp:
(WebCore::renderListItemContainer):
(WebCore::listMarkerText):
(WebCore::AccessibilityObject::listMarkerTextForNodeAndPosition):
(WebCore::AccessibilityObject::stringForVisiblePositionRange):
(WebCore::renderListItemContainerForNode): Renamed.
* Source/WebCore/accessibility/AccessibilityObject.h:
Canonical link: https://commits.webkit.org/269250@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes