Repository navigation
layout_2020: Only count for content size for height of non-replaced inline elements - #29803
Conversation
|
@bors-servo try=wpt-2020 |
layout_2020: Invalidate bottom and top margins on non-replaced inline elements <!-- Please describe your changes on the following line: --> According to https://drafts.csswg.org/css2/#margin-properties, 'margin-top' and 'margin-bottom' have no effect on non-replaced inline elements. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors <!-- Either: --> - [x] There are tests for these changes OR <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
|
Test results for linux-wpt-layout-2020 from try job (#5104828618): Flaky unexpected result (2)
Stable unexpected results (4)
|
|
💔 Test failed - checks-github |
|
Although the block direction margins do not take effects, they still show up in firefox devtools. |
Loirooriol
left a comment
There was a problem hiding this comment.
I don't think this should special-case margins. https://drafts.csswg.org/css2/#inline-non-replaced says
The vertical padding, border and margin of an inline, non-replaced box start at the top and bottom of the content area, and has nothing to do with the line-height. But only the line-height is used when calculating the height of the line box.
If I take /css/CSS2/margin-padding-clear/margin-inline-002.xht replacing the margin with padding, then it's still wrong:
So can you try removing the vertical padding and borders too, and see if more tests pass or something breaks?
|
@bors-servo try=wpt-2020 |
layout_2020: Invalidate bottom and top margins on non-replaced inline elements <!-- Please describe your changes on the following line: --> According to https://drafts.csswg.org/css2/#margin-properties, 'margin-top' and 'margin-bottom' have no effect on non-replaced inline elements. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors <!-- Either: --> - [x] There are tests for these changes OR <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
|
Test results for linux-wpt-layout-2020 from try job (#5127703186): Stable unexpected results (18)
|
|
💔 Test failed - checks-github |
|
More tests passed :) |
inline elements Accorinding to https://drafts.csswg.org/css2/#inline-non-replaced, The vertical padding, border and margin of an inline, non-replaced box start at the top and bottom of the content area, and has nothing to do with the line-height. But only the line-height is used when calculating the height of the line box.
Loirooriol
left a comment
There was a problem hiding this comment.
This case is still wrong:
<!DOCTYPE html>
<style>
div {
border: blue solid 3px;
margin-top: 50px;
}
span {
background: orange;
padding-top: 20px;
padding-bottom: 20px;
height: 100px;
line-height: 100px;
}
</style>
<div><span>Filler Text</span></div>But this patch is an improvement so I guess it's fine as-is.
|
that looks like is related to line height, let's deal with that later. |
|
@bors-servo r+ |
|
📌 Commit 78125ae has been approved by |
|
Test results for linux-wpt-layout-2020 from try job (#5161094063): Stable unexpected results that are known to be intermittent (1)
|
|
Test results for linux-wpt-layout-2013 from try job (#5161094063): Flaky unexpected result (12)
Stable unexpected results that are known to be intermittent (22)
|
|
☀️ Test successful - checks-github |


Accorinding to https://drafts.csswg.org/css2/#inline-non-replaced, The vertical padding, border and margin of an inline, non-replaced box start at the top and bottom of the content area, and has nothing to do with the line-height. But only the line-height is used when calculating the height of the line box.
./mach build -ddoes not report any errors./mach test-tidydoes not report any errors