[wpt-sync] Sync PR 26101 - Avoid DCHECK failure when reusing space and newline with white-space:pre
Categories
(Core :: Layout: Text and Fonts, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox84 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
(Blocks 1 open bug, )
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 26101 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/26101
Details from upstream follow.
b'Oriol Brufau <obrufau@igalia.com>' wrote:
Avoid DCHECK failure when reusing space and newline with white-space:pre
Consider this code:
\<style>i { white-space: pre-line }\</style>
X\<i> \</i>\<i> \</i>The first time that NGInlineNode::CollectInlines runs, the text data
will be "X", then "X ", and then AppendForcedBreakCollapseWhitespace
will remove the trailing whitespace before inserting the forced break,
so we get "X\n".But if some text is appended dynamically, CollectInlines will run again,
and this time it will try to reuse existing items in AppendTextReusing.
Before this patch, this would produce "X \n", which would trigger a
DCHECK failure in ComputeOffsetMapping because it's a different string.Therefore, this patch prevents AppendTextReusing from reusing existing
items if the last item to collapse with ends with collapsible spaces and
the first item to reuse has 'white-space:pre' and begins with a newline.Bug: 1136688
TEST=external/wpt/css/css-text/white-space/pre-line-with-space-and-newline.html
Change-Id: I0ff71b125b66256ec3b5c263605c3c116f9ac55f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2466279
Reviewed-by: Koji Ishii \<kojii@chromium.org>
Commit-Queue: Oriol Brufau \<obrufau@igalia.com>
Cr-Commit-Position: refs/heads/master@{#816641}
| Assignee | ||
Updated•5 years ago
|
| Assignee | ||
Comment 1•5 years ago
|
||
| Assignee | ||
Comment 2•5 years ago
|
||
CI Results
Ran 12 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 1 tests
Status Summary
Firefox
FAIL: 1
Chrome
PASS: 1
Safari
FAIL: 1
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
New Tests That Don't Pass
/css/css-text/white-space/pre-line-with-space-and-newline.html: FAIL (Chrome: PASS, Safari: FAIL)
| Assignee | ||
Comment 3•5 years ago
|
||
CI Results
Ran 12 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 1 tests
Status Summary
Firefox
FAIL: 1
Chrome
PASS: 1
Safari
FAIL: 1
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
New Tests That Don't Pass
/css/css-text/white-space/pre-line-with-space-and-newline.html: FAIL (Chrome: PASS, Safari: FAIL)
Comment 5•5 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/c38df7d89326
https://hg.mozilla.org/mozilla-central/rev/8cfcc196f948
Description
•