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”
This commit is contained in:
Simon Sapin 2019-12-08 11:41:29 +01:00
parent a17db217a1
commit 53ce714005
4 changed files with 8 additions and 8 deletions

View file

@ -33,7 +33,7 @@ impl FloatBox {
display_inside: DisplayInside,
contents: Contents<impl NodeExt<'dom>>,
) -> Self {
let content_sizes = ContentSizesRequest::inline_if(style.inline_size_is_auto());
let content_sizes = ContentSizesRequest::inline_if(!style.inline_size_is_length());
Self {
contents: IndependentFormattingContext::construct(
context,