Skip to content

Commit 52dd2e9

Browse files
committed
Bug 1427608 - [css-grid] Fix span=1 'auto' min-sizing for intrinsic sizing. r=dholbert
When sizing the container under a min- or max-content constraint, the item's min/max-content contribution needs to be clamped (when Automatic Minimum Size / clamping applies) if its size is 'auto'. That'll give the container the right intrinsic size. In Reflow, we'll size the track initially to the clamped min-content contribution again (in the Resolve Intrinsic Track Sizes step), but since the container now has a definite size we'll grow the track in the Maximize Tracks step up to its limit (i.e. the clamp size). For more details on the underlying issue, see: w3c/csswg-drafts#2303 UltraBlame original commit: 82bd129fd8059961fca6eca013cf7ed84ccee897
1 parent d71ba03 commit 52dd2e9

File tree

2 files changed

+137
-178
lines changed

2 files changed

+137
-178
lines changed

layout/base/nsLayoutUtils.cpp

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -27098,35 +27098,6 @@ StyleBoxSizing
2709827098
:
2709927099
Content
2710027100
;
27101-
if
27102-
(
27103-
aMarginBoxMinSizeClamp
27104-
!
27105-
=
27106-
NS_MAXSIZE
27107-
&
27108-
&
27109-
styleISize
27110-
.
27111-
GetIntValue
27112-
(
27113-
)
27114-
=
27115-
=
27116-
NS_STYLE_WIDTH_MIN_CONTENT
27117-
)
27118-
{
27119-
result
27120-
=
27121-
aFrame
27122-
-
27123-
>
27124-
GetMinISize
27125-
(
27126-
aRenderingContext
27127-
)
27128-
;
27129-
}
2713027101
}
2713127102
else
2713227103
if
@@ -27165,19 +27136,6 @@ gNoiseIndent
2716527136
endif
2716627137
if
2716727138
(
27168-
aType
27169-
!
27170-
=
27171-
MIN_ISIZE
27172-
)
27173-
{
27174-
aMarginBoxMinSizeClamp
27175-
=
27176-
NS_MAXSIZE
27177-
;
27178-
}
27179-
if
27180-
(
2718127139
MOZ_UNLIKELY
2718227140
(
2718327141
!

0 commit comments

Comments
 (0)