Stronger band-aid to prevent table splitting inside columns bug 362275 r/sr=roc
This commit is contained in:
@@ -431,6 +431,7 @@ nsColumnSetFrame::ReflowChildren(nsHTMLReflowMetrics& aDesiredSize,
|
|||||||
availSize, availSize.width,
|
availSize, availSize.width,
|
||||||
aReflowState.mComputedHeight);
|
aReflowState.mComputedHeight);
|
||||||
kidReflowState.mFlags.mIsTopOfPage = PR_TRUE;
|
kidReflowState.mFlags.mIsTopOfPage = PR_TRUE;
|
||||||
|
kidReflowState.mFlags.mTableIsSplittable = PR_FALSE;
|
||||||
|
|
||||||
#ifdef DEBUG_roc
|
#ifdef DEBUG_roc
|
||||||
printf("*** Reflowing child #%d %p: availHeight=%d\n",
|
printf("*** Reflowing child #%d %p: availHeight=%d\n",
|
||||||
|
|||||||
@@ -100,6 +100,7 @@ nsHTMLReflowState::nsHTMLReflowState(nsPresContext* aPresContext,
|
|||||||
mLineLayout = nsnull;
|
mLineLayout = nsnull;
|
||||||
mFlags.mSpecialHeightReflow = PR_FALSE;
|
mFlags.mSpecialHeightReflow = PR_FALSE;
|
||||||
mFlags.mIsTopOfPage = PR_FALSE;
|
mFlags.mIsTopOfPage = PR_FALSE;
|
||||||
|
mFlags.mTableIsSplittable = PR_FALSE;
|
||||||
mFlags.mNextInFlowUntouched = PR_FALSE;
|
mFlags.mNextInFlowUntouched = PR_FALSE;
|
||||||
mFlags.mAssumingHScrollbar = mFlags.mAssumingVScrollbar = PR_FALSE;
|
mFlags.mAssumingHScrollbar = mFlags.mAssumingVScrollbar = PR_FALSE;
|
||||||
mFlags.mHasClearance = PR_FALSE;
|
mFlags.mHasClearance = PR_FALSE;
|
||||||
|
|||||||
@@ -318,6 +318,8 @@ struct nsHTMLReflowState : public nsCSSOffsetState {
|
|||||||
// (potentially) in a context where
|
// (potentially) in a context where
|
||||||
// percent heights have a different
|
// percent heights have a different
|
||||||
// basis?
|
// basis?
|
||||||
|
PRUint16 mTableIsSplittable:1; // tables are splittable, this should happen only inside a page
|
||||||
|
// and never insider a column frame
|
||||||
} mFlags;
|
} mFlags;
|
||||||
|
|
||||||
#ifdef IBMBIDI
|
#ifdef IBMBIDI
|
||||||
|
|||||||
@@ -147,6 +147,7 @@ NS_IMETHODIMP nsPageFrame::Reflow(nsPresContext* aPresContext,
|
|||||||
|
|
||||||
nsHTMLReflowState kidReflowState(aPresContext, aReflowState, frame, maxSize);
|
nsHTMLReflowState kidReflowState(aPresContext, aReflowState, frame, maxSize);
|
||||||
kidReflowState.mFlags.mIsTopOfPage = PR_TRUE;
|
kidReflowState.mFlags.mIsTopOfPage = PR_TRUE;
|
||||||
|
kidReflowState.mFlags.mTableIsSplittable = PR_TRUE;
|
||||||
|
|
||||||
// calc location of frame
|
// calc location of frame
|
||||||
nscoord xc = mPD->mReflowMargin.left + mPD->mExtraMargin.left;
|
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
|
// See if all the frames fit. Do not try to split anything if we're
|
||||||
// not paginated ... we can't split across columns yet.
|
// not paginated ... we can't split across columns yet.
|
||||||
if (aPresContext->IsPaginated() &&
|
if (aReflowState.mFlags.mTableIsSplittable &&
|
||||||
(NS_FRAME_NOT_COMPLETE == aStatus || splitDueToPageBreak ||
|
(NS_FRAME_NOT_COMPLETE == aStatus || splitDueToPageBreak ||
|
||||||
aDesiredSize.height > aReflowState.availableHeight)) {
|
aDesiredSize.height > aReflowState.availableHeight)) {
|
||||||
// Nope, find a place to split the row group
|
// Nope, find a place to split the row group
|
||||||
|
|||||||
Reference in New Issue
Block a user