aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout_2020/flow/construct.rs
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2019-12-08 11:41:29 +0100
committerSimon Sapin <simon.sapin@exyr.org>2019-12-10 15:11:53 +0100
commit53ce7140059c07019489fc0eae522e9f76fcb08b (patch)
tree32c28d98361a714f1862758d60cc7e4b9e5883f2 /components/layout_2020/flow/construct.rs
parenta17db217a18e8646c4e8c64b81533469ecbd2580 (diff)
downloadservo-53ce7140059c07019489fc0eae522e9f76fcb08b.tar.gz
servo-53ce7140059c07019489fc0eae522e9f76fcb08b.zip
Fix a “Accessing content size that was not requested” panic
Percentage `width` are treated as `auto` for the purpose of min/max-content computation, so they also need to be considered when testing “wether width is auto”
Diffstat (limited to 'components/layout_2020/flow/construct.rs')
-rw-r--r--components/layout_2020/flow/construct.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/components/layout_2020/flow/construct.rs b/components/layout_2020/flow/construct.rs
index c02dcd08fd7..896293831bc 100644
--- a/components/layout_2020/flow/construct.rs
+++ b/components/layout_2020/flow/construct.rs
@@ -393,7 +393,7 @@ where
style.clone(),
display_inside,
contents,
- ContentSizesRequest::inline_if(style.inline_size_is_auto()),
+ ContentSizesRequest::inline_if(!style.inline_size_is_length()),
),
))
};
@@ -590,7 +590,7 @@ where
&style,
ContentSizesRequest::inline_if(
max_assign_in_flow_outer_content_sizes_to.is_some() &&
- style.inline_size_is_auto(),
+ !style.inline_size_is_length(),
),
);
if let Some(to) = max_assign_in_flow_outer_content_sizes_to {
@@ -607,7 +607,7 @@ where
} => {
let content_sizes = ContentSizesRequest::inline_if(
max_assign_in_flow_outer_content_sizes_to.is_some() &&
- style.inline_size_is_auto(),
+ !style.inline_size_is_length(),
);
let contents = IndependentFormattingContext::construct(
context,