Closed Bug 1646100 Opened 9 months ago Closed 1 month ago

Take intrinsic size into account when using aspect-ratio

Categories

(Core :: Layout, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
86 Branch
Tracking Status
firefox86 --- fixed

People

(Reporter: boris, Assigned: boris)

References

(Blocks 3 open bugs, )

Details

Attachments

(3 files, 2 obsolete files)

This should address this issue: https://github.com/w3c/csswg-drafts/issues/5032.

There are some examples when the ratio-determining axis uses intrinsic sizes, e.g. max-content, min-content.

See Also: → 1665532
See Also: → 1670151
Blocks: 1672641
Assignee: nobody → boris.chiou
Status: NEW → ASSIGNED
Attachment #9192529 - Attachment description: Bug 1646100 - min-width:auto should take content size into account when width:min-content. → Bug 1646100 - min-width:auto should take content size into account when width is min-content or auto.

I think https://bugzilla.mozilla.org/show_bug.cgi?id=1670151 is also fixed by the 2nd patch. However, I will add the test in that bug.

Blocks: 1670151
See Also: 1670151

In some cases, the aspect ratio works with box sizing dimensions, and
sometimes it works only with content box dimensions. We need an extra
flag to know this, and handle it well while computing the size in
ratio-dependent axis.

Comment on attachment 9193855 [details]
Bug 1646100 - Add UseBoxSizing for AspectRatio class.

Revision D100072 was moved to bug 1683424. Setting attachment 9193855 [details] to obsolete.

Attachment #9193855 - Attachment is obsolete: true

We need a simplified version for ComputeISizeValue() for table cols and
table cells to avoid taking aspect-ratio into account for the following
patches.

Comment on attachment 9195352 [details]
Bug 1646100 - Rewrite the computation for min/max inline size for table cols and table cells.

Revision D100749 was moved to bug 1685207. Setting attachment 9195352 [details] to obsolete.

Attachment #9195352 - Attachment is obsolete: true
Depends on: 1685207
Attachment #9192529 - Attachment description: Bug 1646100 - min-width:auto should take content size into account when width is min-content or auto. → Bug 1646100 - min-width:auto should take intrinsic content size into account when width is min-content or auto.
Attachment #9192529 - Attachment description: Bug 1646100 - min-width:auto should take intrinsic content size into account when width is min-content or auto. → Bug 1646100 - min-width:auto together with apect-ratio should take the intrinsic content size into account when width is {min|max|fit}-content or auto.
Attachment #9192295 - Attachment description: Bug 1646100 - Compute min-content and max-content from the definite block-size and aspect-ratio. → Bug 1646100 - Compute {min|max|fit}-content from the definite block-size and aspect-ratio.
Pushed by bchiou@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0825deaefb7e
Take LogicalSize type for containing block and boxing size adjustment for ComputeISizeValue. r=TYLin
https://hg.mozilla.org/integration/autoland/rev/47d9283b4c33
Compute {min|max|fit}-content from the definite block-size and aspect-ratio. r=TYLin,emilio
https://hg.mozilla.org/integration/autoland/rev/12053c7dc8e4
min-width:auto together with apect-ratio should take the intrinsic content size into account when width is {min|max|fit}-content or auto. r=TYLin
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/27248 for changes under testing/web-platform/tests
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 86 Branch
Upstream PR merged by moz-wptsync-bot
Keywords: dev-doc-needed
Blocks: 1690422
You need to log in before you can comment on or make changes to this bug.