mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
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:
parent
a17db217a1
commit
53ce714005
4 changed files with 8 additions and 8 deletions
|
@ -60,7 +60,7 @@ impl AbsolutelyPositionedBox {
|
|||
// "Shrink-to-fit" in https://drafts.csswg.org/css2/visudet.html#abs-non-replaced-width
|
||||
let content_sizes = ContentSizesRequest::inline_if(
|
||||
// If inline-size is non-auto, that value is used without shrink-to-fit
|
||||
style.inline_size_is_auto() &&
|
||||
!style.inline_size_is_length() &&
|
||||
// If it is, then the only case where shrink-to-fit is *not* used is
|
||||
// if both offsets are non-auto, leaving inline-size as the only variable
|
||||
// in the constraint equation.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue