Auto merge of #29949 - Loirooriol:proper-clearance, r=mrobinson

Layout 2020: Properly calculate clearance

<!-- Please describe your changes on the following line: -->
calculate_clearance() was not taking into account that adding clearance prevents top margin from collapsing with earlier margins.

---
<!-- 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
- [X] These changes fix #29885 and #29919
- [X] There are tests for these changes

<!-- 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-30 23:06:24 +02:00 committed by GitHub
commit fe5b494e3f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 66 additions and 35 deletions

View file

@ -1,2 +0,0 @@
[clear-on-child-with-margins.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[clear-on-parent-with-margins.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[negative-clearance-after-bottom-margin.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[nested-clearance-new-formatting-context.html]
expected: FAIL