mirror of
https://github.com/servo/servo.git
synced 2025-10-10 13:30:20 +01:00
Consider: ```html <div style="position: relative; width: 50px; height: 50px; border: solid; margin: 5px"> <div style="position: absolute; top: 0; bottom: 0; height: max-content"> <canvas width="25" height="25" style="background: cyan; height: 100%"></canvas> </div> </div> ``` In order to determine the inline min/max-content sizes, we need a tentative block size as the input, which only takes extrinsic values into account. In this case `height: max-content` is intrinsic, so we were treating it as `height: initial`, which would behave as a definite `height: stretch`. Therefore, the canvas was able to resolve its percentage. However, it seems weird to treat an explicitly intrinsic keyword in an extrinsic way, and Blink doesn't do it. So now we treat the tentative block size as indefinite, therefore the percentage behaves as auto. This adds a new test, we were previously failing 6 subtests, now only 3. Signed-off-by: Oriol Brufau <obrufau@igalia.com> |
||
---|---|---|
.. | ||
display_list | ||
flexbox | ||
flow | ||
fragment_tree | ||
table | ||
taffy | ||
tests | ||
Cargo.toml | ||
cell.rs | ||
construct_modern.rs | ||
context.rs | ||
dom.rs | ||
dom_traversal.rs | ||
formatting_contexts.rs | ||
geom.rs | ||
layout_box_base.rs | ||
layout_debug.rs | ||
lib.rs | ||
lists.rs | ||
positioned.rs | ||
query.rs | ||
replaced.rs | ||
sizing.rs | ||
style_ext.rs | ||
traversal.rs |