Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: c01e3bafb0da4100588fd6c68b0752393d706a24 https://github.com/WebKit/WebKit/commit/c01e3bafb0da4100588fd6c68b0752393d706a24 Author: Ahmad Saleem <ahmad.saleem792+git...@gmail.com> Date: 2023-06-01 (Thu, 01 Jun 2023)
Changed paths: A LayoutTests/svg/text/getcharnumatposition-multiple-fragments-expected.txt A LayoutTests/svg/text/getcharnumatposition-multiple-fragments.html M Source/WebCore/rendering/svg/SVGTextQuery.cpp Log Message: ----------- Handle multiple fragments in the getCharNumberAtPosition SVGTextQuery https://bugs.webkit.org/show_bug.cgi?id=257429 Reviewed by Simon Fraser. This patch aligns WebKit with Blink / Chromium and Gecko / Firefox. Merge: https://src.chromium.org/viewvc/blink?view=revision&revision=176936 The start position (and thus indirectly end position) used to compute the extents of a glyph to check against the point is computed based on the 'processedCharacter' query data state. Following state is only updated after each text box has been processed, meaning that for a text box with multiple fragments, the offset of the fragment within the box needs to be included to get the correct start/end position. * Source/WebCore/rendering/svg/SVGTextQuery.cpp: (SVGTextQuery::characterNumberAtPositionCallback): As above * LayoutTests/svg/text/getcharnumatposition-multiple-fragments.html: Add Test Case * LayoutTests/svg/text/getcharnumatposition-multiple-fragments-expected.txt: Add Test Case Expectation Canonical link: https://commits.webkit.org/264796@main _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes