Make ComputedValuesExt expose keywords for the sizing properties (#33558)

This will allow callers to start obeying `min-content`, `max-content`,
`fit-content` and `stretch` in follow-up patches.
The old functionality is kept as deprecated methods that we should
eventually remove.
This patch has very little impact on the existing behavior, just some
very minimal implementation of the keywords for css tables.

This also overhauls fixed-layout-2.html since:
 - It had code that wasn't doing anything
 - It had wrong expecations in prose
 - The logic seemed broken in general
 - All browsers were failing one testcase

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
Oriol Brufau 2024-09-27 10:16:07 -07:00 committed by GitHub
parent c7ef974968
commit 057dd1e9eb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 419 additions and 268 deletions

View file

@ -915,13 +915,13 @@ impl FloatBox {
// https://drafts.csswg.org/css2/#float-width
let style = non_replaced.style.clone();
let box_size = style
.content_box_size(containing_block, &pbm)
.content_box_size_deprecated(containing_block, &pbm)
.map(|v| v.map(Au::from));
let max_box_size = style
.content_max_box_size(containing_block, &pbm)
.content_max_box_size_deprecated(containing_block, &pbm)
.map(|v| v.map(Au::from));
let min_box_size = style
.content_min_box_size(containing_block, &pbm)
.content_min_box_size_deprecated(containing_block, &pbm)
.map(|v| v.map(Au::from))
.auto_is(Au::zero);