Closed Bug 1457304 Opened 6 years ago Closed 2 years ago

Empty text node generates text run in empty element with white-space:pre

Categories

(Core :: Layout: Block and Inline, defect, P3)

defect

Tracking

()

RESOLVED DUPLICATE of bug 1731120

People

(Reporter: Oriol, Unassigned)

Details

Attachments

(1 file)

Attached file testcase.htm
Run this code:

    <style>
    div {
      white-space: pre;
      background: red;
    }
    </style>
    There should be no red: <div></div>
    <script>
    document.querySelector("div").appendChild(document.createTextNode(""));
    </script>

Result: the element contains a red text line

Expected: no text line because empty text nodes do not generate text runs. Chrome and Edge behave properly.

https://drafts.csswg.org/css-display-3/#intro
> If the sequence contains no text, however, it does not generate a text run.
Priority: -- → P3

Fixed in bug 1731120

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: