Bug 139186

Summary: CSS property "white-space: pre-line" causes all the svg <text> tag lines to overlap
Product: WebKit Reporter: Said Abou-Hallawa <sabouhallawa>
Component: SVGAssignee: Nobody <webkit-unassigned>
Status: RESOLVED CONFIGURATION CHANGED    
Severity: Normal CC: ahmad.saleem792, ap, bfulgham, mmaxfield, rniwa, webkit-bug-importer, zimmermann
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Test first-line style element with the svg <text> element.
none
Expected file
none
Safari 15.5 differs from other browsers none

Description Said Abou-Hallawa 2014-12-02 09:19:12 PST
Created attachment 242417 [details]
Test first-line style element with the svg <text> element.

Open the attached file and compare it with the expected. They should be identical.

Adding "white-space: pre-line" to the style attribute of the <text> element should cause the text to wrap to different lines. In WebKit, the wrapping happens but all the lines are displayed with the same vertical position which causes them to overlap.

NOTE: The attached file is an imported test from Mozilla test suite for svg.
Comment 1 Said Abou-Hallawa 2014-12-02 09:19:35 PST
Created attachment 242418 [details]
Expected file
Comment 2 Radar WebKit Bug Importer 2014-12-02 09:20:01 PST
<rdar://problem/19115260>
Comment 3 Ahmad Saleem 2022-07-14 09:21:34 PDT
Created attachment 460894 [details]
Safari 15.5 differs from other browsers

I am able to reproduce this bug in Safari 15.5 on macOS 12.4 based on attached test case. It is different across all browsers but the expected output is across Firefox Nightly 104 as can be seen from attached screenshot. Thanks!
Comment 4 Ahmad Saleem 2023-01-12 16:37:12 PST
Fixed in STP161. :-)

Marking this as "RESOLVED CONFIGURATION CHANGED". Thanks!