Auto merge of #29839 - stshine:collapse-through, r=mrobinson

layout_2020: Allow end margin to collapse with children if height is set to 0

<!-- Please describe your changes on the following line: -->

Previously, end margin was allowed to collapse only when block size is not set.

---
<!-- 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
- [ ] These changes fix #___ (GitHub issue number if applicable)

<!-- Either: -->
- [x] There are tests for these changes OR
- [ ] These changes do not require tests because ___

<!-- 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. -->
This commit is contained in:
bors-servo 2023-06-04 17:55:50 +02:00 committed by GitHub
commit a16295720d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 1 additions and 7 deletions

View file

@ -482,7 +482,7 @@ fn layout_in_flow_non_replaced_block_level(
let end_margin_can_collapse_with_children = block_is_same_formatting_context &&
pbm.padding.block_end == Length::zero() &&
pbm.border.block_end == Length::zero() &&
block_size == LengthOrAuto::Auto &&
block_size.auto_is(|| Length::zero()) == Length::zero() &&
min_box_size.block == Length::zero();
let mut clearance = Length::zero();

View file

@ -1,2 +0,0 @@
[margin-collapse-016.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[margin-collapse-019.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[margin-collapse-through-zero-height-block.html]
expected: FAIL