Bug 250631 - Clip the start position when performing SVG text queries
Summary: Clip the start position when performing SVG text queries
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: BrowserCompat, InRadar
Depends on:
Blocks:
 
Reported: 2023-01-14 18:09 PST by Ahmad Saleem
Modified: 2023-10-31 08:24 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ahmad Saleem 2023-01-14 18:09:12 PST
Hi Team,

Another failing text from Blink's commit:

Test - https://jsfiddle.net/uyh48n62/show

^ Failing in Safari 16.2 while passing in Chrome Canary 111 and Firefox Nightly 110

Blink Commit - https://chromium.googlesource.com/chromium/blink/+/55ceb3d896e75fbb5d3bb10e12b17b10d297bf27

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

Just wanted raise to fix this.

Thanks!
Comment 1 Ahmad Saleem 2023-01-15 06:30:44 PST
So this one has pre-requisite bug 120451.
Comment 2 Ahmad Saleem 2023-01-15 06:31:40 PST
PR - https://github.com/WebKit/WebKit/pull/8664

The test still fail and need to add platform specific expectations (if we want to land without pre-requisite) on GTK and Windows.

I am closing my PR but it is something still we need to track and fix.
Comment 3 Radar WebKit Bug Importer 2023-01-21 18:10:17 PST
<rdar://problem/104518891>
Comment 4 Ahmad Saleem 2023-09-17 01:55:53 PDT
NOTE - This got reverted because of potential SVG Text optimisation done in Blink but the test case is still interesting, so let's keep this bug open.
Comment 5 Ahmad Saleem 2023-09-17 01:58:05 PDT
Updated Test Case from Blink: https://jsfiddle.net/xfb7mahe/show
Comment 6 Ahmad Saleem 2023-09-17 11:27:00 PDT
NOTE - This bug get fixed with bug 261651.
Comment 7 Ahmad Saleem 2023-10-21 03:26:50 PDT
I think this blink commit is not right fix since with other SVGTextQuery optimization, this is still not fixed. It is to account for 'RTL' content in SVG.

Could be 'unsigned' (which is not negative) and 'int' (negative) as well thing?
Comment 8 Ahmad Saleem 2023-10-31 08:24:41 PDT
Firefox Nightly 121 and Chrome Canary 120 passes this: https://jsfiddle.net/xfb7mahe/show

Adding 'BrowserCompat'.