Skip to content

Commit

Permalink
Don't treat lone CRs as segment breaks.
Browse files Browse the repository at this point in the history
That prevents preceding whitespace from getting collapsed.

When there's a single lone CR (so `a\rb`) our behavior here diverges
from Chrome's but matches Safari's. We treat it as ZWSP.

That matches the initial resolution of [1], but then there have been
various doing and undoings of that resolution, so it's not totally clear
to me what the correct behavior per spec should be. I think "treat it as
other control character"? But I haven't dug into what that implies, so
for now I've just kept behavior there as-is.

[1]: w3c/csswg-drafts#855

Differential Revision: https://phabricator.services.mozilla.com/D86188

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1657437
gecko-commit: b579c12907dc3bb210177454a696ccc181c1ded0
gecko-integration-branch: autoland
gecko-reviewers: jfkthame
  • Loading branch information
emilio authored and moz-wptsync-bot committed Aug 9, 2020
1 parent 247e070 commit edfb582
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions css/css-text/white-space/lone-cr-001-ref.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<!doctype html>
<title>CSS Test Reference</title>
<p>A B</p>
10 changes: 10 additions & 0 deletions css/css-text/white-space/lone-cr-001.tentative.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!doctype html>
<title>Lone CR shouldn't cause previous spaces to collapse</title>
<link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez">
<link rel="author" href="https://mozilla.org" title="Mozilla">
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1657437">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-rules">
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/855#issuecomment-380435969">
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/5410">
<link rel="match" href="lone-cr-001-ref.html">
<p>A &#013;B</p>

0 comments on commit edfb582

Please sign in to comment.