[Webkit-unassigned] [Bug 238341] New: Remove redundant isStartOfLine check in AccessibilityObject::listMarkerTextForNodeAndPosition

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Mar 24 11:42:35 PDT 2022


https://bugs.webkit.org/show_bug.cgi?id=238341

            Bug ID: 238341
           Summary: Remove redundant isStartOfLine check in
                    AccessibilityObject::listMarkerTextForNodeAndPosition
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: All
                OS: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Accessibility
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: tyler_w at apple.com
                CC: andresg_22 at apple.com,
                    webkit-bug-importer at group.apple.com

This function is currently:

String AccessibilityObject::listMarkerTextForNodeAndPosition(Node* node, const VisiblePosition& visiblePositionStart)
{
    // If the range does not contain the start of the line, the list marker text should not be included.
    if (!isStartOfLine(visiblePositionStart))
        return String();

    // We should speak the list marker only for the first line.
    RenderListItem* listItem = renderListItemContainerForNode(node);
    if (!listItem)
        return String();
    if (!inSameLine(visiblePositionStart, firstPositionInNode(&listItem->element())))
        return String();

    return listMarkerTextForNode(node);
}

The !isStartOfLine(visiblePositionStart) check is redundant, covered entirely by the later !inSameLine(visiblePositionStart, firstPositionInNode(&listItem->element())) check.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220324/d083ba66/attachment.htm>


More information about the webkit-unassigned mailing list