Bug 1447166 part 1 - [css-grid] Make FindUsedFlexFraction iterate the GridItemInfo array instead of using a CSSOrderAwareFrameIterator (idempotent change). r=dholbert

This commit is contained in:
Mats Palmgren 2018-03-24 23:03:43 +01:00
Родитель 29ae84491a
Коммит b71cc2ba37
1 изменённых файлов: 1 добавлений и 4 удалений

Просмотреть файл

@ -4581,12 +4581,9 @@ nsGridContainerFrame::Tracks::FindUsedFlexFraction(
}
WritingMode wm = aState.mWM;
gfxContext* rc = &aState.mRenderingContext;
CSSOrderAwareFrameIterator& iter = aState.mIter;
iter.Reset();
// ... the result of 'finding the size of an fr' for each item that spans
// a flex track with its max-content contribution as 'space to fill'
for (; !iter.AtEnd(); iter.Next()) {
const GridItemInfo& item = aGridItems[iter.ItemIndex()];
for (const GridItemInfo& item : aGridItems) {
if (item.mState[mAxis] & ItemState::eIsFlexing) {
// XXX optimize: bug 1194446
auto pb = Some(aState.PercentageBasisFor(mAxis, item));