Open Bug 1627788 Opened 6 years ago Updated 5 years ago

white-space: pre* ignores breaks when no doctype present

Categories

(Core :: Layout: Text and Fonts, defect, P3)

defect

Tracking

()

Tracking Status
firefox75 --- affected
firefox76 --- affected
firefox77 --- affected

People

(Reporter: siemenskun, Unassigned)

Details

Attachments

(1 file)

Attached file bug.html

User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:74.0) Gecko/20100101 Firefox/74.0

Steps to reproduce:

Example 1:
<div style="border: 1px solid black;">
There should be an empty line below<br /><span style="white-space: pre-wrap;">
</span></div>

Example 2:
<!doctype html>
<div style="border: 1px solid black;">
There should be an empty line below<br /><span style="white-space: pre-wrap;">
</span></div>

Actual results:

Example 1:
Firefox 74 ignores a line break inside <span>.
Chromium 71 doesn't ignore it.

Example 2:
Firefox 74 doesn't ignore a line break inside <span>.
Chromium 71 too.

Expected results:

Firefox should respect white-space: pre-wrap and display an empty line even there's no doctype.

This is a newly invented behavior. Firefox treated Example 1 correctly a few versions ago.

Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:75.0) Gecko/20100101 Firefox/75.0

Hi,

I have manage to reproduced this using the Release version 75, Beta 76.0b2 and latest Nightly build 77.0a1 using Windows 7 and Windows 10.
In Chrome the issue is not reproducible.
@Siemens could you tell us when approximately this worked well last time? I've tried to reproduce the issue with some older builds in order to find a regression range but the issue occurs even in fx version 63 from 2018.

I will move this over to a component so developers can take a look over it. If this is not the correct component please feel free to change it to an appropriate one.

Thanks for the report.

Status: UNCONFIRMED → NEW
Component: Untriaged → Layout: Text and Fonts
Ever confirmed: true
Flags: needinfo?(siemenskun)
OS: Unspecified → All
Product: Firefox → Core
Hardware: Unspecified → All
Version: 74 Branch → Trunk

Firefox 60 renders the same, fwiw, so if it's a regression it's not recent.

(In reply to Alin Ilea from comment #1)

@Siemens could you tell us when approximately this worked well last time?

Oops, my bad, it's not a regression. Firefox 38 renders the same.
Probably I have confused it with Blink behavior.

Flags: needinfo?(siemenskun)
Priority: -- → P3

Because this bug's Severity has not been changed from the default since it was filed, and it's Priority is P3 (Backlog,) indicating it has been triaged, the bug's Severity is being updated to S3 (normal.)

Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: