|
@@ -1226,10 +1226,15 @@ void FormattingContext::layout_absolutely_positioned_element(Box const& box, Ava
|
|
|
|
|
|
// If the box width and/or height is fixed and/or or resolved from inset properties,
|
|
|
// mark the size as being definite (since layout was not required to resolve it, per CSS-SIZING-3).
|
|
|
- if (box.computed_values().inset().left().is_length() && box.computed_values().inset().right().is_length()) {
|
|
|
+ auto is_length_but_not_auto = [](auto& length_percentage) {
|
|
|
+ return length_percentage.is_length() && !length_percentage.is_auto();
|
|
|
+ };
|
|
|
+ if (is_length_but_not_auto(box.computed_values().inset().left())
|
|
|
+ && is_length_but_not_auto(box.computed_values().inset().right())) {
|
|
|
box_state.set_has_definite_width(true);
|
|
|
}
|
|
|
- if (box.computed_values().inset().top().is_length() && box.computed_values().inset().bottom().is_length()) {
|
|
|
+ if (is_length_but_not_auto(box.computed_values().inset().top())
|
|
|
+ && is_length_but_not_auto(box.computed_values().inset().bottom())) {
|
|
|
box_state.set_has_definite_height(true);
|
|
|
}
|
|
|
|