Bug 1424436 Part 1: Add more asserts in flex api calculation of mainDeltaSize values. r=dholbert

MozReview-Commit-ID: IpMrMfmMy7t

--HG--
extra : rebase_source : b5862f1cb1735a00b63e000c4857bd80cc5c9f49
This commit is contained in:
Brad Werth 2017-12-08 15:49:56 -08:00
Родитель 082293ce3e
Коммит ba544223af
1 изменённых файлов: 4 добавлений и 0 удалений

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

@ -2684,11 +2684,15 @@ FlexLine::ResolveFlexibleLengths(nscoord aFlexContainerMainSize,
// structure; likewise if any item is shrinking. Items in
// a line can't be both growing and shrinking.
if (deltaSize > 0) {
MOZ_ASSERT(item->IsFrozen() || isUsingFlexGrow,
"Unfrozen items shouldn't grow without isUsingFlexGrow.");
MOZ_ASSERT(aLineInfo->mGrowthState !=
ComputedFlexLineInfo::GrowthState::SHRINKING);
aLineInfo->mGrowthState =
ComputedFlexLineInfo::GrowthState::GROWING;
} else if (deltaSize < 0) {
MOZ_ASSERT(item->IsFrozen() || !isUsingFlexGrow,
"Unfrozen items shouldn't shrink with isUsingFlexGrow.");
MOZ_ASSERT(aLineInfo->mGrowthState !=
ComputedFlexLineInfo::GrowthState::GROWING);
aLineInfo->mGrowthState =