Use new mPendingBreak state
git-svn-id: svn://10.0.0.236/trunk@2748 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
5f78a9d123
commit
6afff43de1
@ -216,7 +216,7 @@ nsLineLayout::Initialize(nsBlockReflowState& aState, nsLineData* aLine)
|
||||
|
||||
mSavedState.mKidFrame = nsnull;
|
||||
mBreakFrame = nsnull;
|
||||
mPendingLineBreak = PR_FALSE;
|
||||
mPendingBreak = NS_STYLE_CLEAR_NONE;
|
||||
|
||||
mLine = aLine;
|
||||
mKidPrevInFlow = nsnull;
|
||||
@ -923,8 +923,12 @@ nsLineLayout::PlaceChild(nsRect& kidRect,
|
||||
if (NS_FRAME_IS_COMPLETE(kidReflowStatus)) {
|
||||
mLine->mLastContentIsComplete = PR_TRUE;
|
||||
if (mLine->mIsBlock ||
|
||||
(NS_LINE_LAYOUT_REFLOW_RESULT_BREAK_AFTER == mReflowResult)) {
|
||||
(NS_LINE_LAYOUT_REFLOW_RESULT_BREAK_AFTER == mReflowResult) ||
|
||||
(NS_STYLE_CLEAR_NONE != mPendingBreak)) {
|
||||
rv = NS_LINE_LAYOUT_BREAK_AFTER;
|
||||
if (NS_STYLE_CLEAR_LINE == mPendingBreak) {
|
||||
mPendingBreak = NS_STYLE_CLEAR_NONE;
|
||||
}
|
||||
}
|
||||
mKidPrevInFlow = nsnull;
|
||||
}
|
||||
|
||||
@ -123,10 +123,6 @@ struct nsLineLayout {
|
||||
mState.mColumn = aNewColumn;
|
||||
}
|
||||
|
||||
void LineBreak() {
|
||||
mPendingLineBreak = PR_TRUE;
|
||||
}
|
||||
|
||||
// A value set by line-layout cognizant frames. Frames that are not
|
||||
// aware of line layout leave the value unchanged and can thus be
|
||||
// detected by the line-layout algorithm.
|
||||
@ -157,7 +153,7 @@ struct nsLineLayout {
|
||||
// requested then this is where the line will break at.
|
||||
nsIFrame* mBreakFrame;
|
||||
nscoord mBreakX;
|
||||
PRBool mPendingLineBreak;
|
||||
PRUint8 mPendingBreak;
|
||||
|
||||
// XXX ick
|
||||
// This is set by the block code when it updates the available
|
||||
|
||||
@ -216,7 +216,7 @@ nsLineLayout::Initialize(nsBlockReflowState& aState, nsLineData* aLine)
|
||||
|
||||
mSavedState.mKidFrame = nsnull;
|
||||
mBreakFrame = nsnull;
|
||||
mPendingLineBreak = PR_FALSE;
|
||||
mPendingBreak = NS_STYLE_CLEAR_NONE;
|
||||
|
||||
mLine = aLine;
|
||||
mKidPrevInFlow = nsnull;
|
||||
@ -923,8 +923,12 @@ nsLineLayout::PlaceChild(nsRect& kidRect,
|
||||
if (NS_FRAME_IS_COMPLETE(kidReflowStatus)) {
|
||||
mLine->mLastContentIsComplete = PR_TRUE;
|
||||
if (mLine->mIsBlock ||
|
||||
(NS_LINE_LAYOUT_REFLOW_RESULT_BREAK_AFTER == mReflowResult)) {
|
||||
(NS_LINE_LAYOUT_REFLOW_RESULT_BREAK_AFTER == mReflowResult) ||
|
||||
(NS_STYLE_CLEAR_NONE != mPendingBreak)) {
|
||||
rv = NS_LINE_LAYOUT_BREAK_AFTER;
|
||||
if (NS_STYLE_CLEAR_LINE == mPendingBreak) {
|
||||
mPendingBreak = NS_STYLE_CLEAR_NONE;
|
||||
}
|
||||
}
|
||||
mKidPrevInFlow = nsnull;
|
||||
}
|
||||
|
||||
@ -123,10 +123,6 @@ struct nsLineLayout {
|
||||
mState.mColumn = aNewColumn;
|
||||
}
|
||||
|
||||
void LineBreak() {
|
||||
mPendingLineBreak = PR_TRUE;
|
||||
}
|
||||
|
||||
// A value set by line-layout cognizant frames. Frames that are not
|
||||
// aware of line layout leave the value unchanged and can thus be
|
||||
// detected by the line-layout algorithm.
|
||||
@ -157,7 +153,7 @@ struct nsLineLayout {
|
||||
// requested then this is where the line will break at.
|
||||
nsIFrame* mBreakFrame;
|
||||
nscoord mBreakX;
|
||||
PRBool mPendingLineBreak;
|
||||
PRUint8 mPendingBreak;
|
||||
|
||||
// XXX ick
|
||||
// This is set by the block code when it updates the available
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user