RESOLVED FIXED 221328
Make shouldComputeLogicalWidthFromAspectRatioAndInsets writing mode aware
https://bugs.webkit.org/show_bug.cgi?id=221328
Summary Make shouldComputeLogicalWidthFromAspectRatioAndInsets writing mode aware
Rob Buis
Reported 2021-02-03 06:09:22 PST
Commit r271061 added support for aspect-ratio on positioned elements, taking into account insets, but it failed to take writing-mode into account when checking insets. This change fixes that by asking logical values.
Attachments
Patch (3.97 KB, patch)
2021-02-03 06:11 PST, Rob Buis
no flags
Rob Buis
Comment 1 2021-02-03 06:11:49 PST
Manuel Rego Casasnovas
Comment 2 2021-02-04 00:57:01 PST
Comment on attachment 419128 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=419128&action=review r=me, with a nit comment inline. > Source/WebCore/rendering/RenderBox.cpp:5100 > + if (style().width().isAuto() && style().height().isAuto() && !style().logicalTop().isAuto() && !style().logicalBottom().isAuto() && (style().logicalLeft().isAuto() || style().logicalRight().isAuto())) What about logicalWidth() instead of width()? I guess it doesn't really matter as we have an and for width and height, but maybe it'd be worth changing for consistency dunno.
Rob Buis
Comment 3 2021-02-04 01:00:06 PST
Comment on attachment 419128 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=419128&action=review >> Source/WebCore/rendering/RenderBox.cpp:5100 >> + if (style().width().isAuto() && style().height().isAuto() && !style().logicalTop().isAuto() && !style().logicalBottom().isAuto() && (style().logicalLeft().isAuto() || style().logicalRight().isAuto())) > > What about logicalWidth() instead of width()? I guess it doesn't really matter as we have an and for width and height, but maybe it'd be worth changing for consistency dunno. Interesting idea, but ultimately we need to check both dimensions and using the logical variants is a bit slower. So I'll keep as-is.
EWS
Comment 4 2021-02-04 01:11:34 PST
Committed r272363: <https://trac.webkit.org/changeset/272363> All reviewed patches have been landed. Closing bug and clearing flags on attachment 419128 [details].
Radar WebKit Bug Importer
Comment 5 2021-02-04 01:12:14 PST
Note You need to log in before you can comment on or make changes to this bug.