зеркало из https://github.com/mozilla/pjs.git
Remove aReflowStatus parameters made unnecessary by previous patch. (Bug 563584, patch 20) r=roc
This commit is contained in:
Родитель
507b8cac2d
Коммит
6aaed7c6a6
|
@ -5727,8 +5727,7 @@ nsBlockFrame::ReflowFloatContinuations(nsBlockReflowState& aState,
|
|||
nsRect oldOverflow = f->GetOverflowRect();
|
||||
|
||||
// Reflow
|
||||
nsReflowStatus fStatus = NS_FRAME_COMPLETE;
|
||||
aState.FlowAndPlaceFloat(f, fStatus);
|
||||
aState.FlowAndPlaceFloat(f);
|
||||
|
||||
// Invalidate if there was a position or size change
|
||||
nsRect rect = f->GetRect();
|
||||
|
|
|
@ -539,8 +539,7 @@ nsBlockReflowState::RecoverStateFrom(nsLineList::iterator aLine,
|
|||
PRBool
|
||||
nsBlockReflowState::AddFloat(nsLineLayout* aLineLayout,
|
||||
nsIFrame* aFloat,
|
||||
nscoord aAvailableWidth,
|
||||
nsReflowStatus& aReflowStatus)
|
||||
nscoord aAvailableWidth)
|
||||
{
|
||||
NS_PRECONDITION(aLineLayout, "must have line layout");
|
||||
NS_PRECONDITION(mBlock->end_lines() != mCurrentLine, "null ptr");
|
||||
|
@ -571,9 +570,6 @@ nsBlockReflowState::AddFloat(nsLineLayout* aLineLayout,
|
|||
mBlock->mFloats.AppendFrame(mBlock, aFloat);
|
||||
}
|
||||
|
||||
// FIXME: Remove aReflowStatus parameter!
|
||||
aReflowStatus = NS_FRAME_COMPLETE;
|
||||
|
||||
// Because we are in the middle of reflowing a placeholder frame
|
||||
// within a line (and possibly nested in an inline frame or two
|
||||
// that's a child of our block) we need to restore the space
|
||||
|
@ -598,7 +594,7 @@ nsBlockReflowState::AddFloat(nsLineLayout* aLineLayout,
|
|||
mBlock->ComputeFloatWidth(*this, floatAvailableSpace, aFloat)
|
||||
<= aAvailableWidth)) {
|
||||
// And then place it
|
||||
placed = FlowAndPlaceFloat(aFloat, aReflowStatus);
|
||||
placed = FlowAndPlaceFloat(aFloat);
|
||||
if (placed) {
|
||||
// Pass on updated available space to the current inline reflow engine
|
||||
nsFlowAreaRect floatAvailSpace = GetFloatAvailableSpace(mY);
|
||||
|
@ -662,11 +658,8 @@ FloatMarginWidth(const nsHTMLReflowState& aCBReflowState,
|
|||
}
|
||||
|
||||
PRBool
|
||||
nsBlockReflowState::FlowAndPlaceFloat(nsIFrame* aFloat,
|
||||
// FIXME: remove aReflowStatus
|
||||
nsReflowStatus& aReflowStatus)
|
||||
nsBlockReflowState::FlowAndPlaceFloat(nsIFrame* aFloat)
|
||||
{
|
||||
aReflowStatus = NS_FRAME_COMPLETE;
|
||||
// Save away the Y coordinate before placing the float. We will
|
||||
// restore mY at the end after placing the float. This is
|
||||
// necessary because any adjustments to mY during the float
|
||||
|
@ -975,8 +968,7 @@ nsBlockReflowState::PlaceBelowCurrentLineFloats(nsFloatCacheFreeList& aList)
|
|||
}
|
||||
#endif
|
||||
// Place the float
|
||||
nsReflowStatus reflowStatus;
|
||||
PRBool placed = FlowAndPlaceFloat(fc->mFloat, reflowStatus);
|
||||
PRBool placed = FlowAndPlaceFloat(fc->mFloat);
|
||||
nsFloatCache *next = fc->Next();
|
||||
if (!placed) {
|
||||
aList.Remove(fc);
|
||||
|
|
|
@ -106,14 +106,12 @@ public:
|
|||
*/
|
||||
PRBool AddFloat(nsLineLayout* aLineLayout,
|
||||
nsIFrame* aFloat,
|
||||
nscoord aAvailableWidth,
|
||||
nsReflowStatus& aReflowStatus);
|
||||
nscoord aAvailableWidth);
|
||||
private:
|
||||
PRBool CanPlaceFloat(nscoord aFloatWidth,
|
||||
const nsFlowAreaRect& aFloatAvailableSpace);
|
||||
public:
|
||||
PRBool FlowAndPlaceFloat(nsIFrame* aFloat,
|
||||
nsReflowStatus& aReflowStatus);
|
||||
PRBool FlowAndPlaceFloat(nsIFrame* aFloat);
|
||||
private:
|
||||
void PushFloatPastBreak(nsIFrame* aFloat);
|
||||
public:
|
||||
|
|
|
@ -888,7 +888,7 @@ nsLineLayout::ReflowFrame(nsIFrame* aFrame,
|
|||
// We might as well allow zero-width floats to be placed, though.
|
||||
availableWidth = 0;
|
||||
}
|
||||
placedFloat = AddFloat(outOfFlowFrame, availableWidth, aReflowStatus);
|
||||
placedFloat = AddFloat(outOfFlowFrame, availableWidth);
|
||||
NS_ASSERTION(!(outOfFlowFrame->GetType() == nsGkAtoms::letterFrame &&
|
||||
GetFirstLetterStyleOK()),
|
||||
"FirstLetterStyle set on line with floating first letter");
|
||||
|
|
|
@ -221,11 +221,9 @@ public:
|
|||
//----------------------------------------
|
||||
// Inform the line-layout about the presence of a floating frame
|
||||
// XXX get rid of this: use get-frame-type?
|
||||
PRBool AddFloat(nsIFrame* aFloat,
|
||||
nscoord aAvailableWidth,
|
||||
nsReflowStatus& aReflowStatus)
|
||||
PRBool AddFloat(nsIFrame* aFloat, nscoord aAvailableWidth)
|
||||
{
|
||||
return mBlockRS->AddFloat(this, aFloat, aAvailableWidth, aReflowStatus);
|
||||
return mBlockRS->AddFloat(this, aFloat, aAvailableWidth);
|
||||
}
|
||||
|
||||
void SetTrimmableWidth(nscoord aTrimmableWidth) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче