New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 750758 link

Starred by 9 users

Issue metadata

Status: Fixed
Owner: ----
Closed: Nov 5
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Whitespace rules not correctly followed when white-space: pre is used inside flex/grid/table/...

Project Member Reported by eco...@igalia.com, Jul 31 2017

Issue description

This is pretty similar to  issue 746437 . I fixed most of the issues there, but there's one nasty edge case that was missed (and that isn't quite trivial to fix).

Basically, if you have something like:

<!doctype html>
<div id="target" style="display: flex; white-space: pre;"></div>
<script>
  target.appendChild(document.createTextNode(" "));
  target.appendChild(document.createTextNode("A"));
  target.appendChild(document.createTextNode(" "));
  target.appendChild(document.createTextNode("B"));
  target.appendChild(document.createTextNode(" "));
</script>

We won't properly preserve the first of the whitespace text-nodes.

If we don't want to unconditionally generate whitespace layout objects in that case, we'd need some kind of knowledge about the whole text run, since you'd need to scan it all to be able to discard it because of being whitespace.
 

Comment 1 by r...@opera.com, Aug 1 2017

And the reason why we cannot simply always create LayoutTexts for whitespace nodes for preformatted text inside display:flex is that we should not create an anonymous flex item for the whitespace in this markup?:

<div style="display:flex;white-space:pre"><div>A</div> <div>B</div></div>

Comment 2 by eco...@igalia.com, Aug 1 2017

Right.

Comment 3 by r...@opera.com, Aug 1 2017

This case is so far out on the edge that I wouldn't spend too many cycles on it.
Labels: Hotlist-Interop
Labels: Update-Quarterly

Comment 6 by r...@opera.com, Oct 11 2017

Cc: esprehn@chromium.org eseidel@chromium.org cbiesin...@chromium.org le...@chromium.org
 Issue 249573  has been merged into this issue.

Comment 7 by r...@opera.com, Oct 11 2017

Cc: -le...@chromium.org -eseidel@chromium.org -esprehn@chromium.org
Components: -Blink>CSS Blink>Layout
Project Member

Comment 9 by sheriffbot@chromium.org, Oct 31

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: Fixed (was: Untriaged)

Sign in to add a comment