Stronger band-aid to prevent table splitting inside columns bug 362275 r/sr=roc

This commit is contained in:
bmlk%gmx.de 2007-01-21 17:51:33 +00:00
Родитель 99fc87fa1c
Коммит 97b5794242
5 изменённых файлов: 6 добавлений и 1 удалений

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

@ -431,6 +431,7 @@ nsColumnSetFrame::ReflowChildren(nsHTMLReflowMetrics& aDesiredSize,
availSize, availSize.width,
aReflowState.mComputedHeight);
kidReflowState.mFlags.mIsTopOfPage = PR_TRUE;
kidReflowState.mFlags.mTableIsSplittable = PR_FALSE;
#ifdef DEBUG_roc
printf("*** Reflowing child #%d %p: availHeight=%d\n",

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

@ -100,6 +100,7 @@ nsHTMLReflowState::nsHTMLReflowState(nsPresContext* aPresContext,
mLineLayout = nsnull;
mFlags.mSpecialHeightReflow = PR_FALSE;
mFlags.mIsTopOfPage = PR_FALSE;
mFlags.mTableIsSplittable = PR_FALSE;
mFlags.mNextInFlowUntouched = PR_FALSE;
mFlags.mAssumingHScrollbar = mFlags.mAssumingVScrollbar = PR_FALSE;
mFlags.mHasClearance = PR_FALSE;

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

@ -318,6 +318,8 @@ struct nsHTMLReflowState : public nsCSSOffsetState {
// (potentially) in a context where
// percent heights have a different
// basis?
PRUint16 mTableIsSplittable:1; // tables are splittable, this should happen only inside a page
// and never insider a column frame
} mFlags;
#ifdef IBMBIDI

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

@ -147,6 +147,7 @@ NS_IMETHODIMP nsPageFrame::Reflow(nsPresContext* aPresContext,
nsHTMLReflowState kidReflowState(aPresContext, aReflowState, frame, maxSize);
kidReflowState.mFlags.mIsTopOfPage = PR_TRUE;
kidReflowState.mFlags.mTableIsSplittable = PR_TRUE;
// calc location of frame
nscoord xc = mPD->mReflowMargin.left + mPD->mExtraMargin.left;

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

@ -1286,7 +1286,7 @@ nsTableRowGroupFrame::Reflow(nsPresContext* aPresContext,
// See if all the frames fit. Do not try to split anything if we're
// not paginated ... we can't split across columns yet.
if (aPresContext->IsPaginated() &&
if (aReflowState.mFlags.mTableIsSplittable &&
(NS_FRAME_NOT_COMPLETE == aStatus || splitDueToPageBreak ||
aDesiredSize.height > aReflowState.availableHeight)) {
// Nope, find a place to split the row group