Bug 1667501 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

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()`](https://searchfox.org/mozilla-central/rev/9fab6c0021ed9b103a70bf5c296b45949a2950bc/layout/generic/nsIFrame.cpp#6155-6163). After bug 1660122, we can call `nsIFrame::GetApsectRatio()` and get a ratio if the frame supports `aspect-ratio`.
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()`](https://searchfox.org/mozilla-central/rev/9fab6c0021ed9b103a70bf5c296b45949a2950bc/layout/generic/nsIFrame.cpp#6155-6163). After bug 1660122, we can call `nsIFrame::GetApsectRatio()` and get a ratio if the frame supports `aspect-ratio`.
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()`](https://searchfox.org/mozilla-central/rev/9fab6c0021ed9b103a70bf5c296b45949a2950bc/layout/generic/nsIFrame.cpp#6155-6163). After bug 1660122, we can call `nsIFrame::GetApsectRatio()` and get a ratio if the frame supports `aspect-ratio`.~~

Back to Bug 1667501 Comment 0