aboutsummaryrefslogtreecommitdiffstats
path: root/python/mach_bootstrap.py
diff options
context:
space:
mode:
authorbors-servo <infra@servo.org>2023-07-01 19:38:30 +0200
committerGitHub <noreply@github.com>2023-07-01 19:38:30 +0200
commita1dfadc4fac39aa80fc3c277fc6e8365ed1311f5 (patch)
treee76b3217366d78212302a74f52af5598a0702bfa /python/mach_bootstrap.py
parentc41334ee3d76631de703d9fdb65b58c7144234bc (diff)
parent7d8122b264224f82921373e28ca59fda063095eb (diff)
downloadservo-a1dfadc4fac39aa80fc3c277fc6e8365ed1311f5.tar.gz
servo-a1dfadc4fac39aa80fc3c277fc6e8365ed1311f5.zip
Auto merge of #29951 - Loirooriol:margin-collapse-use-computed, r=mrobinson
Check computed (min-)block-size when determining margin collapse To collapse margins through, CSS2 requires "zero or auto computed height" and "zero computed min-height" (the latter should also also include auto, which was introduced in CSS3 as the new initial value). Similarly, "auto computed height" is required to collapse the bottom margin with the bottom margin of the contents. Therefore this patch stops collapsing when the used height is clamped to zero by max-height, but the computed value is not zero. Same for non-zero percentages that are indefinite or that resolve to 0px. Note that 0% and calc(0% + 0px) are still considered to be zero (so they allow margin collapse), this may a bit inconsistent but matches Firefox (for the collapsing through case). This also matches the heuristics in find_block_margin_collapsing_with_parent(). We could change the heuristics instead, but then they would have to track block sizes in order to be able to resolve percentages. The change makes margin-collapse-through-percentage-height-block.html fail, that test is only passing on Blink, which did a different interpretation of the spec. To be fair, various places of CSS2 loosely consider that indefinite percentages compute to auto, and even Firefox does so when determining whether to collapse the top margin with the contents. Since the spec isn't particularly clear and interoperability is lacking, I filed https://github.com/w3c/csswg-drafts/issues/8919. <!-- 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 fix #29907 - [X] There are tests for these changes (1 test fails, see above) <!-- 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/mach_bootstrap.py')
0 files changed, 0 insertions, 0 deletions