diff options
author | bors-servo <infra@servo.org> | 2023-07-03 11:55:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-03 11:55:43 +0200 |
commit | c19eb800de71bf06736781ca1cf9d57620d66f8d (patch) | |
tree | 5f53d1969948d64134079cfe2b38e2cea110fe86 /python/servo | |
parent | 4365d9a64682a1c20df0a893069530a0afaa0d8e (diff) | |
parent | a4c4550e3b934328df180a50197681c3ebb14ffa (diff) | |
download | servo-c19eb800de71bf06736781ca1cf9d57620d66f8d.tar.gz servo-c19eb800de71bf06736781ca1cf9d57620d66f8d.zip |
Auto merge of #29957 - Loirooriol:optimize-collapsible-margin-lookahead, r=mrobinson
Layout 2020: Optimize collapsible margin lookahead
Every time that we would lay out a block box that could collapse its top margin with its contents, we would do a lookahead to compute the resulting margin in order to place floats correctly.
The problem is that this lookahead could iterate several descendants, but then when laying these we would run the lookahead again.
This patch restricts the lookahead to boxes that either aren't collapsing their top margin with their parent, or that have 'clear' different than 'none' (since clearance prevents collapsing margins with the parent).
Since the lookahead stops iterating when it finds a box that doesn't collapse its top margin with its parent, or whose 'clear' isn't 'none', this should ensure that lookahead never handles the same box twice.
<!-- Please describe your changes on the following line: -->
---
<!-- 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 do not require tests because there shouldn't be any change in behavior
<!-- 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. -->
Diffstat (limited to 'python/servo')
0 files changed, 0 insertions, 0 deletions