[css-flexbox] A non-default "flex-basis" incorrectly prevents min-size:auto from being clamped by specified size
Categories
(Core :: Layout: Flexbox, defect)
Tracking
()
People
(Reporter: dholbert, Assigned: TYLin)
References
(Blocks 1 open bug)
Details
(Whiteboard: [webcompat], [wptsync upstream])
Attachments
(9 files)
(deleted),
text/html
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details |
Reporter | ||
Updated•8 years ago
|
Reporter | ||
Comment 1•8 years ago
|
||
Reporter | ||
Updated•8 years ago
|
Reporter | ||
Comment 2•8 years ago
|
||
Comment 3•8 years ago
|
||
Reporter | ||
Updated•7 years ago
|
Reporter | ||
Updated•7 years ago
|
Reporter | ||
Updated•7 years ago
|
Reporter | ||
Comment 5•7 years ago
|
||
Reporter | ||
Comment 6•7 years ago
|
||
Updated•7 years ago
|
Reporter | ||
Updated•6 years ago
|
Reporter | ||
Updated•6 years ago
|
Reporter | ||
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Comment 11•6 years ago
|
||
Migrating Webcompat whiteboard priorities to project flags. See bug 1547409.
Comment 12•6 years ago
|
||
See bug 1547409. Migrating whiteboard priority tags to program flags.
Updated•6 years ago
|
Updated•5 years ago
|
Reporter | ||
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Reporter | ||
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Reporter | ||
Updated•5 years ago
|
Reporter | ||
Updated•5 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Reporter | ||
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Assignee | ||
Comment 16•4 years ago
|
||
Assignee | ||
Comment 17•4 years ago
|
||
Flex item's intrinsic size can affect the content size suggestion in the
automatic minimum size resolution, so we shouldn't optimize the reflow
away. https://drafts.csswg.org/css-flexbox-1/#min-size-auto
Add IsFlexItem()
condition to the methods to avoid set
IMAGE_SIZECONSTRAINED
bit in nsImageFrame::Reflow()
. So after
decoding the image and updating its intrinsic size, we'll reflow the
flex item again.
This is needed to pass
testing/web-platform/tests/css/css-flexbox/flex-minimum-width-flex-items-013.html
after updating specified / content size suggestion of the automatic minimum size
resolution in the next part.
Depends on D90452
Assignee | ||
Comment 18•4 years ago
|
||
(WIP) Need to update some tests and test expectations.
Spec reference:
https://drafts.csswg.org/css-flexbox-1/#min-size-auto
The transferred size suggestion will be updated to match the spec in bug
1136312.
Depends on D90453
Updated•4 years ago
|
Updated•4 years ago
|
Assignee | ||
Comment 19•4 years ago
|
||
nsIFrame::ComputeSize() respects UseAutoBSize, so should
ComputeSizeWithIntrinsicDimensions(). This is essential in order to pass
layout/reftests/w3c-css/submitted/flexbox/flexbox-min-height-auto-002{a,c}.html
and flex-aspect-ratio-img-column-011.html [.flexbox 7] after updating specified
/ content size suggestion in a later part.
Depends on D90453
Assignee | ||
Comment 20•4 years ago
|
||
test_dynamic_reflow_root_disallowal.html: in the next part, we can calculate
min-size:auto
as the minimum of specified size and content size correctly
regardless of the value of flex-basis
. If we are not reset the inline-size
(or block-size
) to auto
, the flex item's min-width (or min-height) will
always be its specified size (width:10px
or height:10px
set in
gReflowRootCandidateStyles
), and changing inner
to the content size from
width:20px
to width:40px
will have no effect.
flex-minimum-{width,height}-flex-items-005.xht: To make the flex item
resolve min-height:auto as the specified size, the content (image) size
must be larger than it. So here we change the image size to 200x200.
Google Chrome can also pass this test after this patch.
Depends on D90618
Updated•4 years ago
|
Assignee | ||
Comment 21•4 years ago
|
||
Depends on D90454
Assignee | ||
Comment 22•4 years ago
|
||
This doesn't change the behavior because we remove the
aMinSizeFallback=true
use case in the previous part.
Depends on D90620
Assignee | ||
Comment 23•4 years ago
|
||
Depends on D90621
Updated•4 years ago
|
Reporter | ||
Comment 24•4 years ago
|
||
CC'ing @rego who may be interested to take a glance at part 4 which is tweaking some tests that he wrote a while back:
https://phabricator.services.mozilla.com/D90619
(As noted in the phab issue, I'm convinced that the tests don't match the current spec text here; the tests predate this bug's filing & the current spec text around "specified size suggestion" etc.)
WPT.fyi links for the tests that are being changed there (showing that they don't pass anywhere, except one of them in Firefox, but that's probably a mistake that's changing as part of this bug):
https://wpt.fyi/results/css/css-flexbox/flex-minimum-height-flex-items-005.xht
https://wpt.fyi/results/css/css-flexbox/flex-minimum-width-flex-items-005.xht
Updated•4 years ago
|
Comment 25•4 years ago
|
||
(In reply to Daniel Holbert [:dholbert] from comment #24)
CC'ing @rego who may be interested to take a glance at part 4 which is tweaking some tests that he wrote a while back:
https://phabricator.services.mozilla.com/D90619
(As noted in the phab issue, I'm convinced that the tests don't match the current spec text here; the tests predate this bug's filing & the current spec text around "specified size suggestion" etc.)WPT.fyi links for the tests that are being changed there (showing that they don't pass anywhere, except one of them in Firefox, but that's probably a mistake that's changing as part of this bug):
https://wpt.fyi/results/css/css-flexbox/flex-minimum-height-flex-items-005.xht
https://wpt.fyi/results/css/css-flexbox/flex-minimum-width-flex-items-005.xht
Thanks for the heads-up Daniel.
As you mention these tests are very old and no longer match the spec (if the ever did it), so thanks for fixing them.
Updated•4 years ago
|
Comment 26•4 years ago
|
||
Comment 28•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/1f142e206947
https://hg.mozilla.org/mozilla-central/rev/0f703c317330
https://hg.mozilla.org/mozilla-central/rev/d606b4e5c08b
https://hg.mozilla.org/mozilla-central/rev/2de8d429eaad
https://hg.mozilla.org/mozilla-central/rev/110cd2ff4214
https://hg.mozilla.org/mozilla-central/rev/4a13cf490237
https://hg.mozilla.org/mozilla-central/rev/34aa91a23ea0
https://hg.mozilla.org/mozilla-central/rev/fe228ad057f6
Comment 38•4 years ago
|
||
The Webcompat team will double check if all the SeeAlso webcompat issues are solved by this fix.
Ting-Yu, thanks, thanks, thanks AND THANKS! This was a major webcompat issue being solved this week.
Updated•4 years ago
|
Comment 39•4 years ago
|
||
After verifying the issues from the ''See Also" list we came up with the following results:
- 18 fixed issues
- 18 issues are still reproducible
- 3 issues are invalid due to the changed layout or the page not being available anymore.
Thanks!
Assignee | ||
Comment 40•4 years ago
|
||
Re comment 39:
Do you have the list of sites where the issues are still reproducible? I can take a look on them.
Comment 41•4 years ago
|
||
These are the links to the reproducible issues:
- https://github.com/webcompat/web-bugs/issues/22508
- https://github.com/webcompat/web-bugs/issues/29473
- https://github.com/webcompat/web-bugs/issues/40200
- https://github.com/webcompat/web-bugs/issues/40118
- https://github.com/webcompat/web-bugs/issues/45901
- https://github.com/webcompat/web-bugs/issues/46098
- https://github.com/webcompat/web-bugs/issues/46169
- https://github.com/webcompat/web-bugs/issues/47346
- https://github.com/webcompat/web-bugs/issues/47698
- https://github.com/webcompat/web-bugs/issues/48153
- https://github.com/webcompat/web-bugs/issues/49768
- https://github.com/webcompat/web-bugs/issues/50407
- https://github.com/webcompat/web-bugs/issues/52608
- https://github.com/webcompat/web-bugs/issues/54834
- https://github.com/webcompat/web-bugs/issues/55102
- https://github.com/webcompat/web-bugs/issues/57529
- https://github.com/webcompat/web-bugs/issues/57946
- https://github.com/webcompat/web-bugs/issues/58288
Assignee | ||
Comment 42•4 years ago
|
||
Ciprian, thanks for the list!
The webcompat issues are all report on mobile websites, but the lastest Firefox Android are still using geckoview 2020-09-22, which unfortunately doesn't contain the patches yet.
So I go through the list by using desktop Nightly 2020-09-20 (buggy) and Nightly 2020-09-30 (fixed by this bug), and open them in devtools'
Responsive Design Mode with Galaxy S9 screen size. All the sites except https://github.com/webcompat/web-bugs/issues/57946 look good to me on Nightly 2020-09-30, and look broken on Nightly 2020-09-20. I've left a comment on the problematic one for further investigation.
Comment 43•4 years ago
|
||
There is one new issue, https://github.com/webcompat/web-bugs/issues/58981, which is still reproducible on mobile Nightly (GV: 83.0a1-20200922), but fixed in the reference browser (GV: 83.0a1-20200929), similar to what Ting-Yu mentioned in comment 42
Description
•