Bug 1485430 - Simplify PlaceBelowCurrentFloats. r=dbaron,mats

No reason to pass our own member as an argument.

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Emilio Cobos Álvarez 2018-08-22 23:29:22 +00:00
parent e260c539f2
commit 2340488c8b
3 changed files with 7 additions and 8 deletions

View File

@ -1065,10 +1065,10 @@ BlockReflowInput::PushFloatPastBreak(nsIFrame *aFloat)
* Place below-current-line floats.
*/
void
BlockReflowInput::PlaceBelowCurrentLineFloats(nsFloatCacheFreeList& aList,
nsLineBox* aLine)
BlockReflowInput::PlaceBelowCurrentLineFloats(nsLineBox* aLine)
{
nsFloatCache* fc = aList.Head();
MOZ_ASSERT(mBelowCurrentLineFloats.NotEmpty());
nsFloatCache* fc = mBelowCurrentLineFloats.Head();
while (fc) {
#ifdef DEBUG
if (nsBlockFrame::gNoisyReflow) {
@ -1082,12 +1082,13 @@ BlockReflowInput::PlaceBelowCurrentLineFloats(nsFloatCacheFreeList& aList,
bool placed = FlowAndPlaceFloat(fc->mFloat);
nsFloatCache *next = fc->Next();
if (!placed) {
aList.Remove(fc);
mBelowCurrentLineFloats.Remove(fc);
delete fc;
aLine->SetHadFloatPushed();
}
fc = next;
}
aLine->AppendFloats(mBelowCurrentLineFloats);
}
nscoord

View File

@ -154,8 +154,7 @@ public:
bool FlowAndPlaceFloat(nsIFrame* aFloat);
void PlaceBelowCurrentLineFloats(nsFloatCacheFreeList& aFloats,
nsLineBox* aLine);
void PlaceBelowCurrentLineFloats(nsLineBox* aLine);
// Returns the first coordinate >= aBCoord that clears the
// floats indicated by aBreakType and has enough inline size between floats

View File

@ -4802,8 +4802,7 @@ nsBlockFrame::PlaceLine(BlockReflowInput& aState,
if (aState.mBelowCurrentLineFloats.NotEmpty()) {
// Reflow the below-current-line floats, which places on the line's
// float list.
aState.PlaceBelowCurrentLineFloats(aState.mBelowCurrentLineFloats, aLine);
aLine->AppendFloats(aState.mBelowCurrentLineFloats);
aState.PlaceBelowCurrentLineFloats(aLine);
}
// When a line has floats, factor them into the combined-area