Ensure elements not supporting aspect-ratio property are ignoring aspect-ratio
Categories
(Core :: Layout, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox87 | --- | fixed |
People
(Reporter: TYLin, Assigned: boris)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 1 obsolete file)
Per spec, aspect-ratio
applies to all elements except inline boxes and internal ruby or table boxes. https://drafts.csswg.org/css-sizing-4/#aspect-ratio
Currently, we do apply aspect-ratio
on <table>
elements. See the attached test case.
I think the root cause probably is we unconditionally consider aspect-ratio
in nsIFrame::ComputeSize()
. After bug 1660122, we can call nsIFrame::GetApsectRatio()
and get a ratio if the frame supports aspect-ratio
.
Assignee | ||
Updated•4 years ago
|
Reporter | ||
Comment 1•4 years ago
|
||
Per discussion with emilio on Matrix, it's correct to apply aspect-ratio
property on <table>
.
We currently unconditionally consider aspect-ratio property in nsIFrame::ComputeSize()
. If the size of the elements not supporting aspect-ratio
(inline boxes and internal ruby or table boxes) are not computed via the nsIFrame::ComputeSize()
, then we're fine to leave it as is (though using GetAspectRatio()
added in bug 1660122 may be a little bit ergonomic).
We also need testcases to ensure that those elements not supporting aspect-ratio are covered. Currently, I don't see any in testing/web-platform/tests/css/css-sizing/aspect-ratio
.
Reporter | ||
Comment 2•4 years ago
|
||
Comment on attachment 9177999 [details]
table-with-aspect-ratio.html
Obsolete the wrong testcase.
Assignee | ||
Comment 3•4 years ago
|
||
aspect-ratio applies to all elements except inline boxes and internal ruby or
table boxes. So we should return false for inline frames, table internal frames
(i.e. except nsTableFrame and nsTableWrapperFrame), and ruby internal frames.
Note: it seems nsRubyBaseContainerFrame and nsRubyTextContainerFrame are
inline, so we return false for them.
Updated•4 years ago
|
Comment 5•4 years ago
|
||
bugherder |
Description
•