зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1447166 part 2 - [css-grid] Make ResolveIntrinsicSize iterate the GridItemInfo array instead of using a CSSOrderAwareFrameIterator (idempotent change). r=dholbert
This commit is contained in:
Родитель
b71cc2ba37
Коммит
383cd0da9f
|
@ -4317,7 +4317,6 @@ nsGridContainerFrame::Tracks::ResolveIntrinsicSize(
|
||||||
};
|
};
|
||||||
AutoTArray<PerSpanData, 16> perSpanData;
|
AutoTArray<PerSpanData, 16> perSpanData;
|
||||||
nsTArray<Step2ItemData> step2Items;
|
nsTArray<Step2ItemData> step2Items;
|
||||||
CSSOrderAwareFrameIterator& iter = aState.mIter;
|
|
||||||
gfxContext* rc = &aState.mRenderingContext;
|
gfxContext* rc = &aState.mRenderingContext;
|
||||||
WritingMode wm = aState.mWM;
|
WritingMode wm = aState.mWM;
|
||||||
uint32_t maxSpan = 0; // max span of the step2Items items
|
uint32_t maxSpan = 0; // max span of the step2Items items
|
||||||
|
@ -4330,9 +4329,7 @@ nsGridContainerFrame::Tracks::ResolveIntrinsicSize(
|
||||||
aConstraint == SizingConstraint::eMaxContent ?
|
aConstraint == SizingConstraint::eMaxContent ?
|
||||||
(TrackSize::eMaxContentMinSizing | TrackSize::eAutoMinSizing) :
|
(TrackSize::eMaxContentMinSizing | TrackSize::eAutoMinSizing) :
|
||||||
TrackSize::eMaxContentMinSizing;
|
TrackSize::eMaxContentMinSizing;
|
||||||
iter.Reset();
|
for (auto& gridItem : aGridItems) {
|
||||||
for (; !iter.AtEnd(); iter.Next()) {
|
|
||||||
auto& gridItem = aGridItems[iter.ItemIndex()];
|
|
||||||
MOZ_ASSERT(!(gridItem.mState[mAxis] &
|
MOZ_ASSERT(!(gridItem.mState[mAxis] &
|
||||||
(ItemState::eApplyAutoMinSize | ItemState::eIsFlexing |
|
(ItemState::eApplyAutoMinSize | ItemState::eIsFlexing |
|
||||||
ItemState::eClampMarginBoxMinSize)),
|
ItemState::eClampMarginBoxMinSize)),
|
||||||
|
@ -4398,7 +4395,7 @@ nsGridContainerFrame::Tracks::ResolveIntrinsicSize(
|
||||||
}
|
}
|
||||||
step2Items.AppendElement(
|
step2Items.AppendElement(
|
||||||
Step2ItemData({span, state, lineRange, minSize,
|
Step2ItemData({span, state, lineRange, minSize,
|
||||||
minContent, maxContent, *iter}));
|
minContent, maxContent, gridItem.mFrame}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
MOZ_ASSERT(!(gridItem.mState[mAxis] & ItemState::eClampMarginBoxMinSize) ||
|
MOZ_ASSERT(!(gridItem.mState[mAxis] & ItemState::eClampMarginBoxMinSize) ||
|
||||||
|
|
Загрузка…
Ссылка в новой задаче