|
@@ -639,10 +639,10 @@ void FlexFormattingContext::determine_flex_base_size_and_hypothetical_main_size(
|
|
|
|
|
|
// AD-HOC: This is not mentioned in the spec, but if the item has an aspect ratio,
|
|
// AD-HOC: This is not mentioned in the spec, but if the item has an aspect ratio,
|
|
// we may need to adjust the main size in these ways:
|
|
// we may need to adjust the main size in these ways:
|
|
- // - using stretch-fit main size if the flex basis is indefinite.
|
|
|
|
|
|
+ // - using stretch-fit main size if the flex basis is indefinite and there is no cross size to resolve the ratio against.
|
|
// - in response to cross size min/max constraints.
|
|
// - in response to cross size min/max constraints.
|
|
- if (item.box->has_preferred_aspect_ratio()) {
|
|
|
|
- if (!item.used_flex_basis_is_definite) {
|
|
|
|
|
|
+ if (item.box->has_natural_aspect_ratio()) {
|
|
|
|
+ if (!item.used_flex_basis_is_definite && !has_definite_cross_size(item)) {
|
|
item.flex_base_size = inner_main_size(m_flex_container_state);
|
|
item.flex_base_size = inner_main_size(m_flex_container_state);
|
|
}
|
|
}
|
|
item.flex_base_size = adjust_main_size_through_aspect_ratio_for_cross_size_min_max_constraints(child_box, item.flex_base_size, computed_cross_min_size(child_box), computed_cross_max_size(child_box));
|
|
item.flex_base_size = adjust_main_size_through_aspect_ratio_for_cross_size_min_max_constraints(child_box, item.flex_base_size, computed_cross_min_size(child_box), computed_cross_max_size(child_box));
|