RESOLVED FIXED 220582
Handle min-width/min-height:auto for aspect-ratio
https://bugs.webkit.org/show_bug.cgi?id=220582
Summary Handle min-width/min-height:auto for aspect-ratio
Rob Buis
Reported 2021-01-13 01:50:36 PST
Handle min-width/min-height:auto for aspect-ratio.
Attachments
Patch (9.42 KB, patch)
2021-01-13 01:53 PST, Rob Buis
no flags
Patch (9.27 KB, patch)
2021-01-17 12:19 PST, Rob Buis
no flags
Patch (9.34 KB, patch)
2021-01-20 07:58 PST, Rob Buis
no flags
Patch (9.57 KB, patch)
2021-01-20 13:06 PST, Rob Buis
no flags
Patch (9.99 KB, patch)
2021-01-27 06:46 PST, Rob Buis
no flags
Patch (9.89 KB, patch)
2021-02-04 03:48 PST, Rob Buis
no flags
Patch (9.57 KB, patch)
2021-02-09 00:46 PST, Rob Buis
no flags
Patch (9.60 KB, patch)
2021-02-11 01:54 PST, Rob Buis
no flags
Rob Buis
Comment 1 2021-01-13 01:53:36 PST
Rob Buis
Comment 2 2021-01-17 12:19:13 PST
Radar WebKit Bug Importer
Comment 3 2021-01-20 01:51:12 PST
Rob Buis
Comment 4 2021-01-20 07:58:27 PST
Rob Buis
Comment 5 2021-01-20 13:06:02 PST
Rob Buis
Comment 6 2021-01-27 06:46:01 PST
Rob Buis
Comment 7 2021-02-04 03:48:26 PST
Rob Buis
Comment 8 2021-02-09 00:46:55 PST
Antti Koivisto
Comment 9 2021-02-11 01:14:20 PST
Comment on attachment 419685 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=419685&action=review > Source/WebCore/rendering/RenderBox.cpp:665 > + Length minLength = styleToUse.logicalMinWidth(); could use auto > Source/WebCore/rendering/RenderBox.cpp:3810 > + if (widthType == MinSize && logicalWidth.isAuto()) { > + if (shouldComputeLogicalWidthFromAspectRatio()) { > + LayoutUnit minLogicalWidth; > + LayoutUnit maxLogicalWidth; > + computeIntrinsicLogicalWidths(minLogicalWidth, maxLogicalWidth); > + logicalWidth = Length(minLogicalWidth, Fixed); > + } else > + logicalWidth = Length(0, Fixed); > + } else if (widthType == MainOrPreferredSize && logicalWidth.isAuto() && shouldComputeLogicalWidthFromAspectRatio()) > logicalWidth = Length(computeLogicalWidthFromAspectRatio(), Fixed); > else if (logicalWidth.isIntrinsic()) > logicalWidth = Length(computeIntrinsicLogicalWidthUsing(logicalWidth, containerLogicalWidth, bordersPlusPadding) - bordersPlusPadding, Fixed); This sort of code can often made read better by using lambdas and early returns.
Antti Koivisto
Comment 10 2021-02-11 01:15:58 PST
Comment on attachment 419685 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=419685&action=review > LayoutTests/TestExpectations:4421 > +webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-008.html [ ImageOnlyFailure ] Why does this break?
Rob Buis
Comment 11 2021-02-11 01:19:03 PST
Comment on attachment 419685 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=419685&action=review >> LayoutTests/TestExpectations:4421 >> +webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-008.html [ ImageOnlyFailure ] > > Why does this break? Flex support still needs to land: https://bugs.webkit.org/show_bug.cgi?id=219679 I am waiting on an Igalia colleague for some flexbox fixes so that patch can be rebased and made smaller.
Rob Buis
Comment 12 2021-02-11 01:54:31 PST
EWS
Comment 13 2021-02-11 02:55:25 PST
Committed r272718: <https://commits.webkit.org/r272718> All reviewed patches have been landed. Closing bug and clearing flags on attachment 419966 [details].
Note You need to log in before you can comment on or make changes to this bug.