mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
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:
parent
e260c539f2
commit
2340488c8b
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user