Closed Bug 1702835 Opened 1 month ago Closed 1 month ago

Incorrect transferred min/max size with aspect-ratio

Categories

(Core :: Layout, defect, P3)

defect

Tracking

()

RESOLVED FIXED
89 Branch
Tracking Status
firefox89 --- fixed

People

(Reporter: boris, Assigned: boris)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

It seems the if-condition for handling the transferred min/max size in nsIFrame::ComputeSize is incorrect:
example:

<div style="background: green; aspect-ratio: 1/1; height: 1000px; max-height: 100px;"></div>

This should be 100x100. We skip this case because we don't apply transferred min/max if the inline size is definite (code).

Blocks: aspect-ratio

We have to apply min/max transferred size if inline size is auto or intrinsic
size keywords.

The basic principle is that sizing constraints transfer through the
aspect-ratio to the other side to preserve the aspect ratio to the extent
that they can without violating any sizes specified explicitly on that
affected axis.

Note: block-aspect-ratio-021.html tests the similar case with the non-zero
content size. However we don't have the similar tests for intrinsic size
keywords, so I add them in this patch as well.

Pushed by bchiou@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/379285a42f12
Min/Max size transfers should work only when inline size is not specified. r=TYLin,emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/28376 for changes under testing/web-platform/tests
Status: NEW → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 89 Branch
Upstream PR merged by moz-wptsync-bot
You need to log in before you can comment on or make changes to this bug.