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
layout: Add support for clear
on <br>
elements
#32094
Conversation
`<br>` elements are a bit "special" in the sense that they defer a linebreak, but can also have `clear` applied to them. The `clear` that they supply should be applie *after* the linebreak is processed. This change adds special processing for this situation. Fixes servo#15402.
🔨 Triggering try run (#8705706012) for Linux WPT |
Test results for linux-wpt-layout-2020 from try job (#8705706012): Flaky unexpected result (27)
Stable unexpected results that are known to be intermittent (8)
|
✨ Try run (#8705706012) succeeded. |
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.
These cases are not consistent:
<!DOCTYPE html>
<div style="float: left; width: 100px; height: 100px; background: cyan"></div>
<div style="height: 50px; width: 150px; background: magenta"></div>
<br style="clear: both; display: inline; margin-top: 100px">a
<hr>
<div style="float: left; width: 100px; height: 100px; background: cyan"></div>
<div style="height: 50px; width: 150px; background: magenta"></div>
<br style="clear: both; display: block; margin-top: 100px">a
Servo | Gecko | Blink |
---|---|---|
But Gecko and Blink, while self-consistent, are not interoperable, so I guess it's fine. Also setting display
on a <br>
is quite broken in general.
<br>
elements are a bit "special" in the sense that they defer alinebreak, but can also have
clear
applied to them. Theclear
thatthey supply should be applied after the linebreak is processed. This
change adds special processing for this situation.
Fixes #15402.
Fixes #8960.
Fixes #7311.
./mach build -d
does not report any errors./mach test-tidy
does not report any errorsclear:both
not working when applied to<br>
element #15402.