зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1255393 part 3 - [css-grid] Update 'auto' min track sizing for span=1 to the latest Grid spec. r=dholbert
Now it returns the min/max-content contribution for intrinsic sizing. Otherwise, i.e. during Reflow, return the min-size contribution. (Previously, it always returned the min-size contribution.) https://drafts.csswg.org/css-grid/#algo-content
This commit is contained in:
Родитель
0f91dea2f7
Коммит
9ab65db5db
|
@ -3781,7 +3781,15 @@ nsGridContainerFrame::Tracks::ResolveIntrinsicSizeStep1(
|
|||
WritingMode wm = aState.mWM;
|
||||
nsRenderingContext* rc = &aState.mRenderingContext;
|
||||
if (sz.mState & TrackSize::eAutoMinSizing) {
|
||||
nscoord s = MinSize(aGridItem, aState, rc, wm, mAxis);
|
||||
nscoord s;
|
||||
if (aConstraint == SizingConstraint::eMinContent) {
|
||||
s = MinContentContribution(aGridItem, aState, rc, wm, mAxis);
|
||||
} else if (aConstraint == SizingConstraint::eMaxContent) {
|
||||
s = MaxContentContribution(aGridItem, aState, rc, wm, mAxis);
|
||||
} else {
|
||||
MOZ_ASSERT(aConstraint == SizingConstraint::eNoConstraint);
|
||||
s = MinSize(aGridItem, aState, rc, wm, mAxis);
|
||||
}
|
||||
sz.mBase = std::max(sz.mBase, s);
|
||||
} else if ((sz.mState & TrackSize::eMinContentMinSizing) ||
|
||||
(aConstraint == SizingConstraint::eMinContent &&
|
||||
|
|
Загрузка…
Ссылка в новой задаче