From e8551741db3e7ddf5f0b32e932de6b4d857402af Mon Sep 17 00:00:00 2001 From: "karnaze%netscape.com" Date: Wed, 5 Apr 2000 00:06:20 +0000 Subject: [PATCH] bug 8398 - correct the placement of the caption during an incremental reflow targeted at the inner table. --- layout/html/table/src/nsTableOuterFrame.cpp | 6 +++--- layout/tables/nsTableOuterFrame.cpp | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/layout/html/table/src/nsTableOuterFrame.cpp b/layout/html/table/src/nsTableOuterFrame.cpp index 295814651381..003602b3a6ed 100644 --- a/layout/html/table/src/nsTableOuterFrame.cpp +++ b/layout/html/table/src/nsTableOuterFrame.cpp @@ -806,13 +806,13 @@ nsresult nsTableOuterFrame::IR_InnerTableReflow(nsIPresContext* aPresCont if (nsnull != mCaptionFrame) { // factor in caption and it's margin // we're guaranteed that captionMargin and captionTableStyle are set at this point - if (NS_SIDE_BOTTOM == captionTableStyle->mCaptionSide) { - // bottom caption + if (NS_SIDE_BOTTOM != captionTableStyle->mCaptionSide) { + // top caption innerY = 0; // the inner table goes at the top of the outer table // the total v-space consumed is the inner table height + the caption height + the margin between them aReflowState.y = innerSize.height + updatedCaptionRect.YMost() + captionMargin.top; } - else { // top caption + else { // bottom caption innerY = updatedCaptionRect.YMost() + captionMargin.bottom; // the total v-space consumed is the inner table height + the caption height + the margin between them aReflowState.y = innerY + innerSize.height; diff --git a/layout/tables/nsTableOuterFrame.cpp b/layout/tables/nsTableOuterFrame.cpp index 295814651381..003602b3a6ed 100644 --- a/layout/tables/nsTableOuterFrame.cpp +++ b/layout/tables/nsTableOuterFrame.cpp @@ -806,13 +806,13 @@ nsresult nsTableOuterFrame::IR_InnerTableReflow(nsIPresContext* aPresCont if (nsnull != mCaptionFrame) { // factor in caption and it's margin // we're guaranteed that captionMargin and captionTableStyle are set at this point - if (NS_SIDE_BOTTOM == captionTableStyle->mCaptionSide) { - // bottom caption + if (NS_SIDE_BOTTOM != captionTableStyle->mCaptionSide) { + // top caption innerY = 0; // the inner table goes at the top of the outer table // the total v-space consumed is the inner table height + the caption height + the margin between them aReflowState.y = innerSize.height + updatedCaptionRect.YMost() + captionMargin.top; } - else { // top caption + else { // bottom caption innerY = updatedCaptionRect.YMost() + captionMargin.bottom; // the total v-space consumed is the inner table height + the caption height + the margin between them aReflowState.y = innerY + innerSize.height;