layout: Use a consistent definition of "document white space"#44424
Conversation
|
🤖 Opened new upstream WPT pull request (web-platform-tests/wpt#59396) with upstreamable changes. |
| self.text | ||
| .bytes() | ||
| .all(|byte| matches!(byte, b' ' | b'\n' | b'\t')) | ||
| .all(|byte| InlineFormattingContextBuilder::is_document_white_space(byte.into())) |
There was a problem hiding this comment.
I have tested Firefox and Chrome, and U+000C doesn't create a flex item:
<!DOCTYPE html>
<div style="display: flex; justify-content: space-between"><span>item</span></div>But it's not included in is_document_white_space
There was a problem hiding this comment.
I wasn't sure how to test this, so it is good to have confirmation. I've updated the change to include the form feed character (U+00C), which also happens to be WhatWG's definition of ASCII white space and the Rust is_ascii_whitespace function.
84880d4 to
2458b1f
Compare
|
🔨 Triggering try run (#24788358751) for Linux (WPT) |
|
📝 Transplanted new upstreamable changes to existing upstream WPT pull request (web-platform-tests/wpt#59396). |
|
Test results for linux-wpt from try job (#24788358751): Flaky unexpected result (31)
Stable unexpected results that are known to be intermittent (18)
|
|
✨ Try run (#24788358751) succeeded. |
2458b1f to
ab97e93
Compare
|
📝 Transplanted new upstreamable changes to existing upstream WPT pull request (web-platform-tests/wpt#59396). |
|
Hrm. The DCO bot seems to be wedged. |
Perhaps you can try doing a rebase + force push again. |
Because the definition of "document white space" differed in various places in Servo layout, it was possible for the flexbox container builder to expect to be able to build an inline formatting context from text that was ultimately determined to be empty by the inline formatting context builder. This led to a `BoxSlot` not being properly filled (a thing that should never happen) and an assertion failing. This change fixes that issue. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
ab97e93 to
2c780ba
Compare
|
📝 Transplanted new upstreamable changes to existing upstream WPT pull request (web-platform-tests/wpt#59396). |
Because the definition of "document white space" differed in various
places in Servo layout, it was possible for the flexbox container
builder to expect to be able to build an inline formatting context from
text that was ultimately determined to be empty by the inline formatting
context builder. This led to a
BoxSlotnot being properly filled (athing that should never happen) and an assertion failing.
This change fixes that issue.
Testing: This change adds a new WPT crash test.
Fixes: #43550.