RESOLVED FIXED 257429
Handle multiple fragments in the getCharNumberAtPosition SVGTextQuery
https://bugs.webkit.org/show_bug.cgi?id=257429
Summary Handle multiple fragments in the getCharNumberAtPosition SVGTextQuery
Ahmad Saleem
Reported 2023-05-27 14:17:15 PDT
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!
Attachments
EWS
Comment 1 2023-06-01 09:56:18 PDT
Committed 264796@main (c01e3bafb0da): <https://commits.webkit.org/264796@main> Reviewed commits have been landed. Closing PR #14433 and removing active labels.
Radar WebKit Bug Importer
Comment 2 2023-06-01 09:57:21 PDT
Note You need to log in before you can comment on or make changes to this bug.