Bug 139186 - CSS property "white-space: pre-line" causes all the svg <text> tag lines to overlap
Summary: CSS property "white-space: pre-line" causes all the svg <text> tag lines to o...
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-12-02 09:19 PST by Said Abou-Hallawa
Modified: 2023-01-12 16:37 PST (History)
7 users (show)

See Also:


Attachments
Test first-line style element with the svg <text> element. (407 bytes, image/svg+xml)
2014-12-02 09:19 PST, Said Abou-Hallawa
no flags Details
Expected file (364 bytes, image/svg+xml)
2014-12-02 09:19 PST, Said Abou-Hallawa
no flags Details
Safari 15.5 differs from other browsers (552.60 KB, image/png)
2022-07-14 09:21 PDT, Ahmad Saleem
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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!