The aspect ratio used in ComputeSizeWithIntrinsicDimensions() should consider box-sizing if it is from aspect-ratio property
Categories
(Core :: Layout, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox86 | --- | fixed |
People
(Reporter: boris, Assigned: boris)
References
(Blocks 1 open bug, )
Details
Attachments
(2 files)
Based on the spec definitions, for replaced elements, if aspect-ratio is:
-
auto
Replaced elements with a natural aspect ratio use that aspect ratio; otherwise the box has no preferred aspect ratio. Size calculations involving the aspect ratio work with the content box dimensions always. -
<ratio>
The box’s preferred aspect ratio is the specified ratio of width / height. Size calculations involving the aspect ratio work with the dimensions of the box specified by box-sizing. -
auto && <ratio>
If both auto and a <ratio> are specified together, the preferred aspect ratio is the specified ratio of width / height unless it is a replaced element with a natural aspect ratio, in which case that aspect ratio is used instead. In all cases, size calculations involving the aspect ratio work with the content box dimensions always.
So if we use <ratio>
, we have to take box-sizing into consideration for replaced elements.
Assignee | ||
Comment 1•4 years ago
|
||
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.
Updated•4 years ago
|
Assignee | ||
Comment 2•4 years ago
|
||
If aspect-ratio is '<ratio>', now the aspect-ratio works with box sizing
dimensions for replaced elements.
Updated•4 years ago
|
Updated•4 years ago
|
Comment 5•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/c86f4e7967e3
https://hg.mozilla.org/mozilla-central/rev/5dc148186bb2
Description
•