RESOLVED FIXED 219741
Support aspect-ratio on positioned elements
https://bugs.webkit.org/show_bug.cgi?id=219741
Summary Support aspect-ratio on positioned elements
Rob Buis
Reported 2020-12-10 07:15:42 PST
Support aspect-ratio on positioned elements
Attachments
Patch (6.90 KB, patch)
2020-12-10 07:18 PST, Rob Buis
ews-feeder: commit-queue-
Patch (8.94 KB, patch)
2020-12-10 10:16 PST, Rob Buis
no flags
Patch (9.77 KB, patch)
2020-12-11 07:22 PST, Rob Buis
no flags
Patch (10.11 KB, patch)
2020-12-11 11:59 PST, Rob Buis
no flags
Patch (10.26 KB, patch)
2020-12-11 13:38 PST, Rob Buis
no flags
Patch (10.36 KB, patch)
2020-12-22 11:40 PST, Rob Buis
no flags
Rob Buis
Comment 1 2020-12-10 07:18:30 PST
Rob Buis
Comment 2 2020-12-10 10:16:36 PST
Rob Buis
Comment 3 2020-12-11 07:22:27 PST
Rob Buis
Comment 4 2020-12-11 11:59:11 PST
Rob Buis
Comment 5 2020-12-11 13:38:34 PST
Radar WebKit Bug Importer
Comment 6 2020-12-17 07:16:23 PST
Simon Fraser (smfr)
Comment 7 2020-12-22 11:12:53 PST
Comment on attachment 416038 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=416038&action=review > Source/WebCore/rendering/RenderBox.cpp:5011 > + if (style().width().isAuto() && style().height().isAuto() && !style().top().isAuto() && !style().bottom().isAuto() && (style().left().isAuto() || style().right().isAuto())) Maybe all these could become a helper on RenderStyle. > Source/WebCore/rendering/RenderBox.cpp:5024 > + LayoutUnit containerWidthIninlineDirection = std::max<LayoutUnit>(0, containingBlockLogicalWidthForContentInFragment(fragment)); containerWidthInIInlineDirection
Rob Buis
Comment 8 2020-12-22 11:40:31 PST
EWS
Comment 9 2020-12-22 12:30:50 PST
Committed r271061: <https://trac.webkit.org/changeset/271061> All reviewed patches have been landed. Closing bug and clearing flags on attachment 416678 [details].
zalan
Comment 10 2021-03-31 20:35:32 PDT
Comment on attachment 416678 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=416678&action=review > Source/WebCore/rendering/RenderBox.cpp:5013 > +bool RenderBox::shouldComputeLogicalWidthFromAspectRatio() const What does inset mean in this context and how would a caller know if shouldComputeLogicalHeightFromAspectRatio() or shouldComputeLogicalWidthFromAspectRatioAndInsets() is the right function to call.
Rob Buis
Comment 11 2021-04-01 08:42:46 PDT
Comment on attachment 416678 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=416678&action=review >> Source/WebCore/rendering/RenderBox.cpp:5013 >> +bool RenderBox::shouldComputeLogicalWidthFromAspectRatio() const > > What does inset mean in this context and how would a caller know if shouldComputeLogicalHeightFromAspectRatio() or shouldComputeLogicalWidthFromAspectRatioAndInsets() is the right function to call. Inset as defined here https://drafts.csswg.org/css-logical/#inset-properties. shouldComputeLogicalWidthFromAspectRatioAndInsets is more an implementation detail of shouldComputeLogicalWidthFromAspectRatio/shouldComputeLogicalHeightFromAspectRatio, so maybe it would have been better to keep it private.
zalan
Comment 12 2021-04-01 13:14:49 PDT
(In reply to Rob Buis from comment #11) > Comment on attachment 416678 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=416678&action=review > > >> Source/WebCore/rendering/RenderBox.cpp:5013 > >> +bool RenderBox::shouldComputeLogicalWidthFromAspectRatio() const > > > > What does inset mean in this context and how would a caller know if shouldComputeLogicalHeightFromAspectRatio() or shouldComputeLogicalWidthFromAspectRatioAndInsets() is the right function to call. > > Inset as defined here https://drafts.csswg.org/css-logical/#inset-properties. Awesome! Thanks, apparently I am super behind on css-logical. :(
Note You need to log in before you can comment on or make changes to this bug.