Bug 1501145 Part 2 - Assign default values to ColumnBalanceData fields. r=mats

Depends on D9467

Differential Revision: https://phabricator.services.mozilla.com/D9468

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Ting-Yu Lin 2018-10-23 13:09:16 +00:00
parent 4e6b53ce88
commit 8c481a151b
2 changed files with 9 additions and 6 deletions

View File

@ -1240,7 +1240,6 @@ nsColumnSetFrame::Reflow(nsPresContext* aPresContext,
bool unboundedLastColumn = config.mIsBalancing && !nextInFlow;
nsCollapsingMargin carriedOutBottomMargin;
ColumnBalanceData colData;
colData.mHasExcessBSize = false;
bool feasible = ReflowColumns(aDesiredSize, aReflowInput, aStatus, config,
unboundedLastColumn, &carriedOutBottomMargin,

View File

@ -145,18 +145,22 @@ protected:
*/
struct ColumnBalanceData {
// The maximum "content block-size" of any column
nscoord mMaxBSize;
nscoord mMaxBSize = 0;
// The sum of the "content block-size" for all columns
nscoord mSumBSize;
nscoord mSumBSize = 0;
// The "content block-size" of the last column
nscoord mLastBSize;
nscoord mLastBSize = 0;
// The maximum "content block-size" of all columns that overflowed
// their available block-size
nscoord mMaxOverflowingBSize;
nscoord mMaxOverflowingBSize = 0;
// This flag determines whether the last reflow of children exceeded the
// computed block-size of the column set frame. If so, we set the bSize to
// this maximum allowable bSize, and continue reflow without balancing.
bool mHasExcessBSize;
bool mHasExcessBSize = false;
void Reset() {
mMaxBSize = mSumBSize = mLastBSize = mMaxOverflowingBSize = 0;