[wpt-sync] Sync PR 12894 - Reland: A leading white-space should break before handling overflow

RESOLVED FIXED in Firefox 64

Status

()

enhancement
P4
normal
RESOLVED FIXED
11 months ago
9 months ago

People

(Reporter: wptsync, Unassigned)

Tracking

unspecified
mozilla64
Points:
---

Firefox Tracking Flags

(firefox64 fixed)

Details

(Whiteboard: [wptsync downstream], )

Sync web-platform-tests PR 12894 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/12894
Details from upstream follow.

Javier Fernandez <jfernandez@igalia.com> wrote:
>  Reland: A leading white-space should break before handling overflow
>  
>  This is basically a reland of 6ea2a2e7f3ef01e0c98424ce272a732ade92ad1a
>  but with some changes to avoid regressions like the one reported in
>  issue #866109.
>  
>  The key to keep the behavior we want is to change the
>  RewindToMidWordBreak function so it only looks for previous breaking
>  opportunities if the current word_measurement's length is longer that 1
>  single character.
>  
>  Original change's description:
>  > [css-text] A leading white-space should break before handling overflow
>  >
>  > Leading white-spaces are indeed breaking opportunities that should
>  > prevent, if there are no other css properties forcing it, breaking text
>  > in the middle of a word when honoring the word-wrap/overflow-wrap CSS
>  > property.
>  >
>  > We are doing so if the leading white-space sequence is longer than 1
>  > character, but when we have a single leading white-space, we are missing
>  > that breaking opportunity and we may lead to cases, like the one
>  > described in the bug.
>  >
>  > However, this breaking opportunity should be considered together
>  > with other provided by the word-break CSS property (eg, break-word or
>  > break-all).
>  >
>  > There is a discussion [1] in the CSS WG github about this issue, which
>  > provides an interoperability analysis of a few cases where a single
>  > leading white-space character may produce different results, depending
>  > on the browser and the combination of line-breaking properties.
>  >
>  > [1] https://github.com/w3c/csswg-drafts/issues/2907
>  >
>  > Bug: 854624
>  > Change-Id: I49ec8282e899a32990662c104b48cab04057b909
>  > Reviewed-on: https://chromium-review.googlesource.com/1130515
>  > Commit-Queue: Javier Fernandez <jfernandez@igalia.com>
>  > Reviewed-by: Koji Ishii <kojii@chromium.org>
>  > Cr-Commit-Position: refs/heads/master@{#575596}
>  
>  Bug: 854624
>  Change-Id: I1cc0f55050d54ea1e76c655cf6b3ef8bcc0b0e2c
>  Reviewed-on: https://chromium-review.googlesource.com/1209745
>  WPT-Export-Revision: 6658be4f5045af66fdb2c400528a234da4bbb4bf
Component: web-platform-tests → CSS Parsing and Computation
Product: Testing → Core
Ran 5 tests
PASS   : 2
FAIL   : 3

New tests that have failures or other problems:
/css/css-text/overflow-wrap/overflow-wrap-break-word-004.html: FAIL
/css/css-text/word-break/word-break-break-all-010.html: FAIL
/css/css-text/word-break/word-break-break-all-011.html: FAIL
Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/12ab47127613
[wpt PR 12894] - [css-text] A leading white-space should break before handling overflow, a=testonly
https://hg.mozilla.org/integration/mozilla-inbound/rev/b08a738d556b
[wpt PR 12894] - Update wpt metadata, a=testonly
https://hg.mozilla.org/mozilla-central/rev/12ab47127613
https://hg.mozilla.org/mozilla-central/rev/b08a738d556b
Status: NEW → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
You need to log in before you can comment on or make changes to this bug.