WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
311185
SVG tspan positioning bug with xml:space="preserve"
https://bugs.webkit.org/show_bug.cgi?id=311185
Summary
SVG tspan positioning bug with xml:space="preserve"
Karl Dubost
Reported
2026-03-31 07:19:11 PDT
Created
attachment 478860
[details]
testcase When SVG <tspan> elements have xml:space="preserve" and are separated by whitespace text nodes (typical of indented markup), the tspan x/y positions are assigned to the wrong characters. This causes text to be visually split and mispositioned. <text transform="translate(300 300)" fill="black"> <tspan font-family="Helvetica Neue" font-size="16" x="120" y="70.34399" xml:space="preserve">A</tspan> <tspan font-family="Helvetica Neue" font-size="16" x="120" y="88.79199" xml:space="preserve">AB</tspan> <tspan font-family="Helvetica Neue" font-size="16" x="120" y="107.23999" xml:space="preserve">Z</tspan> </text> Renders in Firefox/Chrome A AB Z Renders in Safari A A BZ
Attachments
testcase
(806 bytes, image/svg+xml)
2026-03-31 07:19 PDT
,
Karl Dubost
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Karl Dubost
Comment 1
2026-03-31 07:20:19 PDT
rdar://143722975
Karl Dubost
Comment 2
2026-03-31 07:21:00 PDT
This also creates rendering issue on
https://github.com/w3c/csswg-drafts/issues/11610#issuecomment-2680514021
Karl Dubost
Comment 3
2026-03-31 07:43:34 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/61764
EWS
Comment 4
2026-03-31 17:24:04 PDT
Committed
310347@main
(279d4c423fd2): <
https://commits.webkit.org/310347@main
> Reviewed commits have been landed. Closing PR #61764 and removing active labels.
Karl Dubost
Comment 5
2026-03-31 17:26:17 PDT
Submitted web-platform-tests pull request:
https://github.com/web-platform-tests/wpt/pull/58897
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug