-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
layout: Fix bug where whitespace didn't have line decorations #38007
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Leo Ring <leoring03@gmail.com>
🔨 Triggering try run (#16225700169) for Linux (WPT) |
Tests are needed, but probably they already exist and you will only need to update expectations |
Test results for linux-wpt from try job (#16225700169): Flaky unexpected result (24)
Stable unexpected results that are known to be intermittent (18)
Stable unexpected results (2)
|
|
The failure is expected because we don't support |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You will need to update expectations
Co-authored-by: Oriol Brufau <obrufau@igalia.com> Signed-off-by: leo030303 <59373587+leo030303@users.noreply.github.com>
Expectations should be updated, thanks for the quick review! |
Signed-off-by: Leo Ring <leoring03@gmail.com>
d20aeca
to
b413dfe
Compare
Signed-off-by: Leo Ring <leoring03@gmail.com>
25efb2d
to
8cdee71
Compare
🛠 These changes could not be applied onto the latest upstream WPT. Servo's copy of the Web Platform Tests may be out of sync. |
🔨 Triggering try run (#16249412545) for Linux (WPT) |
Test results for linux-wpt from try job (#16249412545): Flaky unexpected result (17)
Stable unexpected results that are known to be intermittent (22)
Stable unexpected results (1)
|
|
This PR fixes the issue where underlines weren't appearing on whitespaces. This was due to whitespace being ignored in the
glyphs
function ofcomponents/layout/display_list/mod.rs
when the fragment didn't have a selection. I added in a check to include the whitespace if there's a selection or if there are any line decorations. I also renamed the field fromignore_whitespace
toinclude_whitespace
to make it a bit clearer since it was being reversed everywhere it was used anyway.Before:

After:

Testing:
/css/css-text/white-space/pre-wrap-018.html
is now passing. Also verified manually by runningdata:text/html;base64,PGRpdiBzdHlsZT0idGV4dC1kZWNvcmF0aW9uOiB1bmRlcmxpbmU7Ij5IZWxsbyBXb3JsZCE8L2Rpdj4=
Fixes: #33463