[Webkit-unassigned] [Bug 257429] New: Handle multiple fragments in the getCharNumberAtPosition SVGTextQuery

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat May 27 14:17:15 PDT 2023


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

            Bug ID: 257429
           Summary: Handle multiple fragments in the
                    getCharNumberAtPosition SVGTextQuery
           Product: WebKit
           Version: Safari Technology Preview
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Keywords: BrowserCompat
          Severity: Normal
          Priority: P2
         Component: SVG
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: ahmad.saleem792 at gmail.com
                CC: sabouhallawa at apple.com, zimmermann at kde.org

Hi Team,

We fail following test in WebKit ToT:

Testcase: https://jsfiddle.net/czgum406/show

Blink Commit: https://src.chromium.org/viewvc/blink?view=revision&revision=176936

WebKit Source: https://searchfox.org/wubkat/source/Source/WebCore/rendering/svg/SVGTextQuery.cpp#524

This works:

________

// Offset of the fragment within the text box.
    unsigned boxOffset = fragment.characterOffset - queryData->textBox->start();

    FloatRect extent;
    for (unsigned i = 0; i < fragment.length; ++i) {
        unsigned startPosition = data->processedCharacters + boxOffset + i;
        unsigned endPosition = startPosition + 1;
        if (!mapStartEndPositionsIntoFragmentCoordinates(queryData, fragment, startPosition, endPosition))
            continue;
        calculateGlyphBoundaries(queryData, fragment, startPosition, extent);
        if (extent.contains(data->position)) {
            data->processedCharacters += boxOffset + I;

_________

Just wanted to raise so we can fix it.

Thanks!

-- 
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/20230527/4ab4b9f0/attachment.htm>


More information about the webkit-unassigned mailing list