aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout_2020/replaced.rs
diff options
context:
space:
mode:
authorOriol Brufau <obrufau@igalia.com>2024-09-27 10:16:07 -0700
committerGitHub <noreply@github.com>2024-09-27 17:16:07 +0000
commit057dd1e9eb46749f3e38bf7fbbf05392d8fbe1fd (patch)
tree3aa851a9f2b523596efbb3cf69912d8a484ad3cd /components/layout_2020/replaced.rs
parentc7ef974968c32d58e6fdd3213965c0f88ee6e4a5 (diff)
downloadservo-057dd1e9eb46749f3e38bf7fbbf05392d8fbe1fd.tar.gz
servo-057dd1e9eb46749f3e38bf7fbbf05392d8fbe1fd.zip
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>
Diffstat (limited to 'components/layout_2020/replaced.rs')
-rw-r--r--components/layout_2020/replaced.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/components/layout_2020/replaced.rs b/components/layout_2020/replaced.rs
index f0e4648a5a9..b54682a287d 100644
--- a/components/layout_2020/replaced.rs
+++ b/components/layout_2020/replaced.rs
@@ -427,15 +427,15 @@ impl ReplacedContent {
pbm: &PaddingBorderMargin,
) -> LogicalVec2<Au> {
let box_size = style
- .content_box_size(containing_block, pbm)
+ .content_box_size_deprecated(containing_block, pbm)
// We need to clamp to zero here to obtain the proper aspect
// ratio when box-sizing is border-box and the inner box size
// would otherwise be negative.
.map(|value| value.map(|value| value.max(Au::zero())));
let min_box_size = style
- .content_min_box_size(containing_block, pbm)
+ .content_min_box_size_deprecated(containing_block, pbm)
.auto_is(Au::zero);
- let max_box_size = style.content_max_box_size(containing_block, pbm);
+ let max_box_size = style.content_max_box_size_deprecated(containing_block, pbm);
self.used_size_as_if_inline_element_from_content_box_sizes(
containing_block,
style,