diff options
author | Simon Sapin <simon.sapin@exyr.org> | 2019-12-08 11:41:29 +0100 |
---|---|---|
committer | Simon Sapin <simon.sapin@exyr.org> | 2019-12-10 15:11:53 +0100 |
commit | 53ce7140059c07019489fc0eae522e9f76fcb08b (patch) | |
tree | 32c28d98361a714f1862758d60cc7e4b9e5883f2 /components/layout_2020/flow/construct.rs | |
parent | a17db217a18e8646c4e8c64b81533469ecbd2580 (diff) | |
download | servo-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.rs | 6 |
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, |