Added state to keep track of lines that are impacted by floaters

This commit is contained in:
kipp%netscape.com 1999-03-21 01:14:05 +00:00
Родитель 64001dcb96
Коммит 5293dd812d
2 изменённых файлов: 12 добавлений и 2 удалений

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

@ -59,6 +59,7 @@ public:
void BeginLineReflow(nscoord aX, nscoord aY, void BeginLineReflow(nscoord aX, nscoord aY,
nscoord aWidth, nscoord aHeight, nscoord aWidth, nscoord aHeight,
PRBool aImpactedByFloaters,
PRBool aIsTopOfPage); PRBool aIsTopOfPage);
void EndLineReflow(); void EndLineReflow();
@ -84,7 +85,6 @@ public:
nsIFrame** aNextRCFrame, nsIFrame** aNextRCFrame,
nsReflowStatus& aReflowStatus); nsReflowStatus& aReflowStatus);
nscoord GetCarriedOutTopMargin() const { nscoord GetCarriedOutTopMargin() const {
return mCurrentSpan->mLastFrame->mCarriedOutTopMargin; return mCurrentSpan->mLastFrame->mCarriedOutTopMargin;
} }
@ -146,6 +146,10 @@ public:
return 0 == mTotalPlacedFrames; return 0 == mTotalPlacedFrames;
} }
PRBool LineIsBreakable() const {
return (0 != mTotalPlacedFrames) || mImpactedByFloaters;
}
//---------------------------------------- //----------------------------------------
// Inform the line-layout engine about the presence of a BR frame // Inform the line-layout engine about the presence of a BR frame
@ -229,6 +233,7 @@ protected:
PRBool mWasInWord; PRBool mWasInWord;
PRBool mCanBreakBeforeFrame; PRBool mCanBreakBeforeFrame;
PRBool mUpdatedBand; PRBool mUpdatedBand;
PRBool mImpactedByFloaters;
PRUint8 mPlacedFloaters; PRUint8 mPlacedFloaters;
PRInt32 mTotalPlacedFrames; PRInt32 mTotalPlacedFrames;
nsVoidArray mWordFrames; nsVoidArray mWordFrames;

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

@ -59,6 +59,7 @@ public:
void BeginLineReflow(nscoord aX, nscoord aY, void BeginLineReflow(nscoord aX, nscoord aY,
nscoord aWidth, nscoord aHeight, nscoord aWidth, nscoord aHeight,
PRBool aImpactedByFloaters,
PRBool aIsTopOfPage); PRBool aIsTopOfPage);
void EndLineReflow(); void EndLineReflow();
@ -84,7 +85,6 @@ public:
nsIFrame** aNextRCFrame, nsIFrame** aNextRCFrame,
nsReflowStatus& aReflowStatus); nsReflowStatus& aReflowStatus);
nscoord GetCarriedOutTopMargin() const { nscoord GetCarriedOutTopMargin() const {
return mCurrentSpan->mLastFrame->mCarriedOutTopMargin; return mCurrentSpan->mLastFrame->mCarriedOutTopMargin;
} }
@ -146,6 +146,10 @@ public:
return 0 == mTotalPlacedFrames; return 0 == mTotalPlacedFrames;
} }
PRBool LineIsBreakable() const {
return (0 != mTotalPlacedFrames) || mImpactedByFloaters;
}
//---------------------------------------- //----------------------------------------
// Inform the line-layout engine about the presence of a BR frame // Inform the line-layout engine about the presence of a BR frame
@ -229,6 +233,7 @@ protected:
PRBool mWasInWord; PRBool mWasInWord;
PRBool mCanBreakBeforeFrame; PRBool mCanBreakBeforeFrame;
PRBool mUpdatedBand; PRBool mUpdatedBand;
PRBool mImpactedByFloaters;
PRUint8 mPlacedFloaters; PRUint8 mPlacedFloaters;
PRInt32 mTotalPlacedFrames; PRInt32 mTotalPlacedFrames;
nsVoidArray mWordFrames; nsVoidArray mWordFrames;