WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
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
Details
Formatted Diff
Diff
Patch
(9.27 KB, patch)
2021-01-17 12:19 PST
,
Rob Buis
no flags
Details
Formatted Diff
Diff
Patch
(9.34 KB, patch)
2021-01-20 07:58 PST
,
Rob Buis
no flags
Details
Formatted Diff
Diff
Patch
(9.57 KB, patch)
2021-01-20 13:06 PST
,
Rob Buis
no flags
Details
Formatted Diff
Diff
Patch
(9.99 KB, patch)
2021-01-27 06:46 PST
,
Rob Buis
no flags
Details
Formatted Diff
Diff
Patch
(9.89 KB, patch)
2021-02-04 03:48 PST
,
Rob Buis
no flags
Details
Formatted Diff
Diff
Patch
(9.57 KB, patch)
2021-02-09 00:46 PST
,
Rob Buis
no flags
Details
Formatted Diff
Diff
Patch
(9.60 KB, patch)
2021-02-11 01:54 PST
,
Rob Buis
no flags
Details
Formatted Diff
Diff
Show Obsolete
(7)
View All
Add attachment
proposed patch, testcase, etc.
Rob Buis
Comment 1
2021-01-13 01:53:36 PST
Created
attachment 417516
[details]
Patch
Rob Buis
Comment 2
2021-01-17 12:19:13 PST
Created
attachment 417781
[details]
Patch
Radar WebKit Bug Importer
Comment 3
2021-01-20 01:51:12 PST
<
rdar://problem/73395736
>
Rob Buis
Comment 4
2021-01-20 07:58:27 PST
Created
attachment 417968
[details]
Patch
Rob Buis
Comment 5
2021-01-20 13:06:02 PST
Created
attachment 417992
[details]
Patch
Rob Buis
Comment 6
2021-01-27 06:46:01 PST
Created
attachment 418541
[details]
Patch
Rob Buis
Comment 7
2021-02-04 03:48:26 PST
Created
attachment 419265
[details]
Patch
Rob Buis
Comment 8
2021-02-09 00:46:55 PST
Created
attachment 419685
[details]
Patch
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
Created
attachment 419966
[details]
Patch
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.
Top of Page
Format For Printing
XML
Clone This Bug