diff options
author | Oriol Brufau <obrufau@igalia.com> | 2023-07-27 16:37:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-27 14:37:21 +0000 |
commit | b8c04b4bad1636f78cddf8ec1944386520600da0 (patch) | |
tree | fa0f0e03477bd77a149bf1853604e02650102aec /python/servo/util.py | |
parent | 77c6a61dfaec61bf341b6fc0282930751c3a4cc5 (diff) | |
download | servo-b8c04b4bad1636f78cddf8ec1944386520600da0.tar.gz servo-b8c04b4bad1636f78cddf8ec1944386520600da0.zip |
Floor child sizes in calculate_inline_content_size_for_block_level_boxes (#30034)
Calculating the max-content size of a block container may add the outer
max-content sizes of multiple children. The problem is that the outer
size may be negative (due to margins), producing an incorrect result.
In particular, it could happen that the max-content size was 50-25=25,
but the min-content size would just take the maximum and be 50, which
doesn't make sense.
Therefore, this patch floors the size of all children by 0. This seems
to match Blink. Firefox and WebKit don't floor in some cases, but then
the result seems suboptimal to me. Note that there is no spec for this,
see https://github.com/w3c/csswg-drafts/issues/9120 for details.
Diffstat (limited to 'python/servo/util.py')
0 files changed, 0 insertions, 0 deletions