Index: mozilla/content/shared/src/nsStyleStruct.cpp =================================================================== RCS file: /cvsroot/mozilla/content/shared/src/nsStyleStruct.cpp,v retrieving revision 3.68 diff -p -u -8 -r3.68 nsStyleStruct.cpp --- mozilla/content/shared/src/nsStyleStruct.cpp 2 Feb 2004 22:17:07 -0000 3.68 +++ mozilla/content/shared/src/nsStyleStruct.cpp 11 Feb 2004 03:08:51 -0000 @@ -518,26 +518,34 @@ void nsStyleBorder::RecalcData() } mHasCachedBorder = PR_TRUE; } else { mHasCachedBorder = PR_FALSE; } if ((mBorderStyle[NS_SIDE_TOP] & BORDER_COLOR_DEFINED) == 0) { - mBorderStyle[NS_SIDE_TOP] = BORDER_COLOR_DEFINED | BORDER_COLOR_FOREGROUND; + NS_ASSERTION(!(mBorderStyle[NS_SIDE_TOP] & BORDER_COLOR_SPECIAL), + "Clearing special border because BORDER_COLOR_DEFINED is not set"); + SetBorderToForeground(NS_SIDE_TOP); } if ((mBorderStyle[NS_SIDE_BOTTOM] & BORDER_COLOR_DEFINED) == 0) { - mBorderStyle[NS_SIDE_BOTTOM] = BORDER_COLOR_DEFINED | BORDER_COLOR_FOREGROUND; + NS_ASSERTION(!(mBorderStyle[NS_SIDE_BOTTOM] & BORDER_COLOR_SPECIAL), + "Clearing special border because BORDER_COLOR_DEFINED is not set"); + SetBorderToForeground(NS_SIDE_BOTTOM); } - if ((mBorderStyle[NS_SIDE_LEFT]& BORDER_COLOR_DEFINED) == 0) { - mBorderStyle[NS_SIDE_LEFT] = BORDER_COLOR_DEFINED | BORDER_COLOR_FOREGROUND; + if ((mBorderStyle[NS_SIDE_LEFT] & BORDER_COLOR_DEFINED) == 0) { + NS_ASSERTION(!(mBorderStyle[NS_SIDE_LEFT] & BORDER_COLOR_SPECIAL), + "Clearing special border because BORDER_COLOR_DEFINED is not set"); + SetBorderToForeground(NS_SIDE_LEFT); } if ((mBorderStyle[NS_SIDE_RIGHT] & BORDER_COLOR_DEFINED) == 0) { - mBorderStyle[NS_SIDE_RIGHT] = BORDER_COLOR_DEFINED | BORDER_COLOR_FOREGROUND; + NS_ASSERTION(!(mBorderStyle[NS_SIDE_RIGHT] & BORDER_COLOR_SPECIAL), + "Clearing special border because BORDER_COLOR_DEFINED is not set"); + SetBorderToForeground(NS_SIDE_RIGHT); } } nsChangeHint nsStyleBorder::CalcDifference(const nsStyleBorder& aOther) const { if ((mBorder == aOther.mBorder) && (mFloatEdge == aOther.mFloatEdge)) { PRInt32 ix; Index: mozilla/layout/html/style/src/nsCSSRendering.h =================================================================== RCS file: /cvsroot/mozilla/layout/html/style/src/nsCSSRendering.h,v retrieving revision 3.52 diff -p -u -8 -r3.52 nsCSSRendering.h --- mozilla/layout/html/style/src/nsCSSRendering.h 23 Feb 2003 02:49:17 -0000 3.52 +++ mozilla/layout/html/style/src/nsCSSRendering.h 11 Feb 2004 03:08:51 -0000 @@ -135,32 +135,35 @@ public: */ static void PaintBackground(nsIPresContext* aPresContext, nsIRenderingContext& aRenderingContext, nsIFrame* aForFrame, const nsRect& aDirtyRect, const nsRect& aBorderArea, const nsStyleBorder& aBorder, const nsStylePadding& aPadding, - PRBool aUsePrintSettings); + PRBool aUsePrintSettings, + nsRect* aClipRect = nsnull); /** * Same as |PaintBackground|, except using the provided style context * (which short-circuits the code that ensures that the root element's * background is drawn on the canvas. */ static void PaintBackgroundWithSC(nsIPresContext* aPresContext, nsIRenderingContext& aRenderingContext, nsIFrame* aForFrame, const nsRect& aDirtyRect, const nsRect& aBorderArea, const nsStyleBackground& aColor, const nsStyleBorder& aBorder, const nsStylePadding& aPadding, - PRBool aUsePrintSettings=PR_FALSE); + PRBool aUsePrintSettings = PR_FALSE, + nsRect* aClipRect = nsnull); + /** * Called by the presShell when painting is finished, so we can clear our * inline background data cache. */ static void DidPaint(); static void DrawDashedSides(PRIntn startSide, Index: mozilla/layout/html/style/src/nsCSSRendering.cpp =================================================================== RCS file: /cvsroot/mozilla/layout/html/style/src/nsCSSRendering.cpp,v retrieving revision 3.227 diff -p -u -8 -r3.227 nsCSSRendering.cpp --- mozilla/layout/html/style/src/nsCSSRendering.cpp 31 Jan 2004 22:41:39 -0000 3.227 +++ mozilla/layout/html/style/src/nsCSSRendering.cpp 11 Feb 2004 03:08:51 -0000 @@ -2768,17 +2768,18 @@ nsCSSRendering::DidPaint() void nsCSSRendering::PaintBackground(nsIPresContext* aPresContext, nsIRenderingContext& aRenderingContext, nsIFrame* aForFrame, const nsRect& aDirtyRect, const nsRect& aBorderArea, const nsStyleBorder& aBorder, const nsStylePadding& aPadding, - PRBool aUsePrintSettings) + PRBool aUsePrintSettings, + nsRect* aClipRect) { NS_PRECONDITION(aForFrame, "Frame is expected to be provided to PaintBackground"); PRBool isCanvas; const nsStyleBackground *color; if (!FindBackground(aPresContext, aForFrame, &color, &isCanvas)) { @@ -2796,17 +2797,17 @@ nsCSSRendering::PaintBackground(nsIPresC return; } color = aForFrame->GetStyleBackground(); } if (!isCanvas) { PaintBackgroundWithSC(aPresContext, aRenderingContext, aForFrame, aDirtyRect, aBorderArea, *color, aBorder, - aPadding, aUsePrintSettings); + aPadding, aUsePrintSettings, aClipRect); return; } if (!color) return; nsStyleBackground canvasColor(*color); nsIViewManager* vm = aPresContext->GetViewManager(); @@ -2839,29 +2840,30 @@ nsCSSRendering::PaintBackground(nsIPresC if (canvasColor.mBackgroundAttachment == NS_STYLE_BG_ATTACHMENT_FIXED) { nsIView *view = aForFrame->GetView(); if (view) vm->SetViewBitBltEnabled(view, PR_FALSE); } PaintBackgroundWithSC(aPresContext, aRenderingContext, aForFrame, aDirtyRect, aBorderArea, canvasColor, - aBorder, aPadding, aUsePrintSettings); + aBorder, aPadding, aUsePrintSettings, aClipRect); } void nsCSSRendering::PaintBackgroundWithSC(nsIPresContext* aPresContext, nsIRenderingContext& aRenderingContext, nsIFrame* aForFrame, const nsRect& aDirtyRect, const nsRect& aBorderArea, const nsStyleBackground& aColor, const nsStyleBorder& aBorder, const nsStylePadding& aPadding, - PRBool aUsePrintSettings) + PRBool aUsePrintSettings, + nsRect* aClipRect) { NS_PRECONDITION(aForFrame, "Frame is expected to be provided to PaintBackground"); PRBool canDrawBackgroundImage = PR_TRUE; PRBool canDrawBackgroundColor = PR_TRUE; if (aUsePrintSettings) { @@ -2877,24 +2879,30 @@ nsCSSRendering::PaintBackgroundWithSC(ns aPresContext->GetTheme(getter_AddRefs(theme)); if (theme && theme->ThemeSupportsWidget(aPresContext, aForFrame, displayData->mAppearance)) { theme->DrawWidgetBackground(&aRenderingContext, aForFrame, displayData->mAppearance, aBorderArea, aDirtyRect); return; } } - // The background is rendered over the 'background-clip' area. - nsRect bgClipArea(aBorderArea); - if (aColor.mBackgroundClip != NS_STYLE_BG_CLIP_BORDER) { - NS_ASSERTION(aColor.mBackgroundClip == NS_STYLE_BG_CLIP_PADDING, - "unknown background-clip value"); - nsMargin border; - aBorder.GetBorder(border); - bgClipArea.Deflate(border); + nsRect bgClipArea; + if (aClipRect) { + bgClipArea = *aClipRect; + } + else { + // The background is rendered over the 'background-clip' area. + bgClipArea = aBorderArea; + if (aColor.mBackgroundClip != NS_STYLE_BG_CLIP_BORDER) { + NS_ASSERTION(aColor.mBackgroundClip == NS_STYLE_BG_CLIP_PADDING, + "unknown background-clip value"); + nsMargin border; + aBorder.GetBorder(border); + bgClipArea.Deflate(border); + } } // The actual dirty rect is the intersection of the 'background-clip' // area and the dirty rect we were given nsRect dirtyRect; if (!dirtyRect.IntersectRect(bgClipArea, aDirtyRect)) { // Nothing to paint return; @@ -3265,51 +3273,51 @@ nsCSSRendering::PaintBackgroundWithSC(ns The vertical case is analogous. If the background is fixed, then bgClipArea.x and bgClipArea.y are set to zero when finding the parent viewport, above. */ // first do the horizontal case nscoord x0, x1; + // For scrolling attachment, the anchor is within the 'background-clip' + // For fixed attachment, the anchor is within the bounds of the nearest + // scrolling ancestor (or the viewport) + x0 = (NS_STYLE_BG_ATTACHMENT_SCROLL == aColor.mBackgroundAttachment) ? + bgClipArea.x : 0; if (repeat & NS_STYLE_BG_REPEAT_X) { // When tiling in the x direction, adjust the starting position of the // tile to account for dirtyRect.x. When tiling in x, the anchor.x value // will be a negative value used to adjust the starting coordinate. - x0 = bgClipArea.x + anchor.x + ((dirtyRect.x - (bgClipArea.x + anchor.x)) / tileWidth) * tileWidth; + x0 += anchor.x + + ((dirtyRect.x - (bgClipArea.x + anchor.x)) / tileWidth) * tileWidth; x1 = x0 + ((dirtyRect.x + dirtyRect.width - x0 + tileWidth - 1) / tileWidth) * tileWidth; } else { - // For scrolling attachment, the anchor is within the 'background-clip' - // For fixed attachment, the anchor is within the bounds of the nearest - // scrolling ancestor (or the viewport) - x0 = anchor.x; - if (NS_STYLE_BG_ATTACHMENT_SCROLL == aColor.mBackgroundAttachment) { - x0 += bgClipArea.x; - } + x0 += anchor.x; x1 = x0 + tileWidth; } // now do all that again with the vertical case nscoord y0, y1; + // For scrolling attachment, the anchor is within the 'background-clip' + // For fixed attachment, the anchor is within the bounds of the nearest + // scrolling ancestor (or the viewport) + y0 = (NS_STYLE_BG_ATTACHMENT_SCROLL == aColor.mBackgroundAttachment) ? + bgClipArea.y : 0; if (repeat & NS_STYLE_BG_REPEAT_Y) { // When tiling in the y direction, adjust the starting position of the // tile to account for dirtyRect.y. When tiling in y, the anchor.y value // will be a negative value used to adjust the starting coordinate. - y0 = bgClipArea.y + anchor.y + ((dirtyRect.y - (bgClipArea.y + anchor.y)) / tileHeight) * tileHeight; + y0 += anchor.y + + ((dirtyRect.y - (bgClipArea.y + anchor.y)) / tileHeight) * tileHeight; y1 = y0 + ((dirtyRect.y + dirtyRect.height - y0 + tileHeight - 1) / tileHeight) * tileHeight; } else { - // For scrolling attachment, the anchor is within the 'background-clip' - // For fixed attachment, the anchor is within the bounds of the nearest - // scrolling ancestor (or the viewport) - y0 = anchor.y; - if (NS_STYLE_BG_ATTACHMENT_SCROLL == aColor.mBackgroundAttachment) { - y0 += bgClipArea.y; - } + y0 += anchor.y; y1 = y0 + tileHeight; } // Take the intersection again to paint only the required area nsRect tileRect(x0, y0, (x1 - x0), (y1 - y0)); nsRect drawRect; if (drawRect.IntersectRect(tileRect, dirtyRect)) Index: mozilla/layout/html/document/src/html.css =================================================================== RCS file: /cvsroot/mozilla/layout/html/document/src/html.css,v retrieving revision 3.171 diff -p -u -8 -r3.171 html.css --- mozilla/layout/html/document/src/html.css 4 Feb 2004 06:10:56 -0000 3.171 +++ mozilla/layout/html/document/src/html.css 11 Feb 2004 03:08:51 -0000 @@ -145,17 +145,17 @@ plaintext, xmp, pre { white-space: pre; margin: 1em 0; } /* tables */ table { display: table; - border-spacing: 2px; + border-spacing: 2px; border-collapse: separate; margin-top: 0; margin-bottom: 0; -moz-box-sizing: border-box; text-indent: 0; } table[align="left"] { @@ -164,21 +164,16 @@ table[align="left"] { table[align="right"] { float: right; text-align: start; } table[rules] { border-collapse: collapse; -} - -/* make sure backgrounds are inherited in tables -- see bug 4510 */ -td, th, tr { - background: inherit; } /* caption inherits from table not table-outer */ caption { display: table-caption; text-align: center; -moz-box-sizing: border-box; } Index: mozilla/layout/html/document/src/quirk.css =================================================================== RCS file: /cvsroot/mozilla/layout/html/document/src/quirk.css,v retrieving revision 1.42 diff -p -u -8 -r1.42 quirk.css --- mozilla/layout/html/document/src/quirk.css 30 Jul 2003 08:12:54 -0000 1.42 +++ mozilla/layout/html/document/src/quirk.css 11 Feb 2004 03:08:51 -0000 @@ -108,16 +108,20 @@ table, caption { } table { text-align: -moz-initial; white-space: normal; /* compatible with IE & spec */ line-height: normal; } +/* make sure backgrounds are inherited in tables -- see bug 4510*/ +td, th, tr { + background: inherit; +} /* Quirk: collapse top margin of BODY and TD and bottom margin of TD */ /* * While it may seem simpler to use :first-node and :last-node without * tags, it's slower, since we have to do the :first-node or :last-node * check on every single element in the document. If we list all the * element names for which the UA stylesheet specifies a margin, the Index: mozilla/layout/html/table/src/nsTableFrame.h =================================================================== RCS file: /cvsroot/mozilla/layout/html/table/src/nsTableFrame.h,v retrieving revision 3.232 diff -p -u -8 -r3.232 nsTableFrame.h --- mozilla/layout/html/table/src/nsTableFrame.h 18 Jan 2004 10:28:36 -0000 3.232 +++ mozilla/layout/html/table/src/nsTableFrame.h 11 Feb 2004 03:08:51 -0000 @@ -57,20 +57,16 @@ class nsITableLayoutStrategy; class nsHTMLValue; class nsStyleContext; struct nsTableReflowState; struct nsStylePosition; enum nsPixelRound {eAlwaysRoundUp=0, eAlwaysRoundDown, eRoundUpIfHalfOrMore}; -// flags for Paint, PaintChild, PaintChildren are currently only used by tables. -// use low order bit of flags to distinguish between pass1(0) and pass2(1) border collapse backgrounds -#define BORDER_COLLAPSE_BACKGROUNDS 0x00000001 - #ifdef DEBUG_TABLE_REFLOW_TIMING #ifdef WIN32 #include #endif class nsReflowTimer { public: nsReflowTimer(nsIFrame* aFrame) { @@ -326,16 +322,25 @@ public: PRUint32 aFlags = 0); nsMargin GetBCBorder() const; // get the area that the border leak out from the inner table frame into // the surrounding margin space nsMargin GetBCMargin(nsIPresContext* aPresContext) const; + /** Get width of table + colgroup + col collapse: elements that + * continue along the length of the whole left side. + * see nsTablePainter about continuous borders + * @param aPixelsToTwips - conversion factor + * @param aGetInner - get only inner half of border width + */ + nscoord GetContinuousLeftBCBorderWidth(float aPixelsToTwips, + PRBool aGetInner) const; + void SetBCDamageArea(nsIPresContext& aPresContext, const nsRect& aValue); void PaintBCBorders(nsIPresContext* aPresContext, nsIRenderingContext& aRenderingContext, const nsRect& aDirtyRect); NS_IMETHOD GetFrameForPoint(nsIPresContext* aPresContext, @@ -638,17 +643,17 @@ protected: /** process an incremental reflow command targeted at this frame. * @see nsIFrameReflow::Reflow */ NS_IMETHOD IR_TargetIsMe(nsIPresContext* aPresContext, nsTableReflowState& aReflowState, nsReflowStatus& aStatus); - /** process a style chnaged notification. + /** process a style changed notification. * @see nsIFrameReflow::Reflow * TODO: needs to be optimized for which attribute was actually changed. */ NS_IMETHOD IR_StyleChanged(nsIPresContext* aPresContext, nsTableReflowState& aReflowState, nsReflowStatus& aStatus); NS_IMETHOD AdjustSiblingsAfterReflow(nsIPresContext* aPresContext, @@ -796,21 +801,20 @@ public: PRInt32 aRowIndex, PRInt32 anAdjustment); // Remove cell borders which aren't bordering row and/or col groups void ProcessGroupRules(nsIPresContext* aPresContext); nsVoidArray& GetColCache(); - /** - * Return aFrame's child if aFrame is an nsScrollFrame, otherwise return aFrame - */ - nsTableRowGroupFrame* GetRowGroupFrame(nsIFrame* aFrame, - nsIAtom* aFrameTypeIn = nsnull) const; + /** Return aFrame's child if aFrame is an nsScrollFrame, otherwise return aFrame + */ + static nsTableRowGroupFrame* GetRowGroupFrame(nsIFrame* aFrame, + nsIAtom* aFrameTypeIn = nsnull); protected: void SetBorderCollapse(PRBool aValue); void CalcBCBorders(nsIPresContext& aPresContext); void ExpandBCDamageArea(nsRect& aRect) const; @@ -907,30 +911,31 @@ public: protected: #ifdef DEBUG void DumpRowGroup(nsIFrame* aChildFrame); #endif // DATA MEMBERS struct TableBits { - unsigned mHadInitialReflow:1; // has intial reflow happened - unsigned mHaveReflowedColGroups:1; // have the col groups gotten their initial reflow - unsigned mNeedStrategyBalance:1; // does the strategy needs to balance the table - unsigned mNeedStrategyInit:1; // does the strategy needs to be initialized and then balance the table - unsigned mHasPctCol:1; // does any cell or col have a pct width - unsigned mCellSpansPctCol:1; // does any cell span a col with a pct width (or containing a cell with a pct width) - unsigned mDidResizeReflow:1; // did a resize reflow happen (indicating pass 2) - unsigned mIsBorderCollapse:1; // border collapsing model vs. separate model - unsigned mRowInserted:1; - unsigned mNeedSpecialReflow:1; - unsigned mNeedToInitiateSpecialReflow:1; - unsigned mInitiatedSpecialReflow:1; - unsigned mNeedToCalcBCBorders:1; - unsigned : 19; // unused + PRUint32 mHadInitialReflow:1; // has intial reflow happened + PRUint32 mHaveReflowedColGroups:1; // have the col groups gotten their initial reflow + PRUint32 mNeedStrategyBalance:1; // does the strategy needs to balance the table + PRUint32 mNeedStrategyInit:1; // does the strategy needs to be initialized and then balance the table + PRUint32 mHasPctCol:1; // does any cell or col have a pct width + PRUint32 mCellSpansPctCol:1; // does any cell span a col with a pct width (or containing a cell with a pct width) + PRUint32 mDidResizeReflow:1; // did a resize reflow happen (indicating pass 2) + PRUint32 mIsBorderCollapse:1; // border collapsing model vs. separate model + PRUint32 mRowInserted:1; + PRUint32 mNeedSpecialReflow:1; + PRUint32 mNeedToInitiateSpecialReflow:1; + PRUint32 mInitiatedSpecialReflow:1; + PRUint32 mNeedToCalcBCBorders:1; + PRUint32 mLeftContBCBorder:8; + PRUint32 : 11; // unused } mBits; nsTableCellMap* mCellMap; // maintains the relationships between rows, cols, and cells nsITableLayoutStrategy* mTableLayoutStrategy;// the layout strategy for this frame nsFrameList mColGroups; // the list of colgroup frames nscoord mMinWidth; // XXX could store as PRUint16 with pixels nscoord mDesiredWidth; // XXX could store as PRUint16 with pixels nscoord mPreferredWidth; // XXX could store as PRUint16 with pixels @@ -1081,16 +1086,25 @@ inline void nsTableFrame::SetBorderColla inline PRBool nsTableFrame::NeedToCalcBCBorders() const { return (PRBool)mBits.mNeedToCalcBCBorders; } inline void nsTableFrame::SetNeedToCalcBCBorders(PRBool aValue) { mBits.mNeedToCalcBCBorders = (unsigned)aValue; +} + +inline nscoord +nsTableFrame::GetContinuousLeftBCBorderWidth(float aPixelsToTwips, + PRBool aGetInner) const +{ + return (aGetInner) ? + BC_BORDER_RIGHT_HALF_COORD(aPixelsToTwips, mBits.mLeftContBCBorder) : + NSToCoordRound(aPixelsToTwips * mBits.mLeftContBCBorder); } enum nsTableIteration { eTableLTR = 0, eTableRTL = 1, eTableDIR = 2 }; Index: mozilla/layout/html/table/src/nsTableFrame.cpp =================================================================== RCS file: /cvsroot/mozilla/layout/html/table/src/nsTableFrame.cpp,v retrieving revision 3.550 diff -p -u -8 -r3.550 nsTableFrame.cpp --- mozilla/layout/html/table/src/nsTableFrame.cpp 28 Jan 2004 18:44:41 -0000 3.550 +++ mozilla/layout/html/table/src/nsTableFrame.cpp 11 Feb 2004 03:08:57 -0000 @@ -45,16 +45,17 @@ #include "nsCellMap.h" #include "nsTableCellFrame.h" #include "nsHTMLParts.h" #include "nsTableColFrame.h" #include "nsTableColGroupFrame.h" #include "nsTableRowFrame.h" #include "nsTableRowGroupFrame.h" #include "nsTableOuterFrame.h" +#include "nsTablePainter.h" #include "nsHTMLValue.h" #include "BasicTableLayoutStrategy.h" #include "FixedTableLayoutStrategy.h" #include "nsIPresContext.h" #include "nsCSSRendering.h" #include "nsStyleConsts.h" @@ -121,28 +122,31 @@ struct nsTableReflowState { nsReflowReason aReason, nscoord aAvailWidth, nscoord aAvailHeight) { reason = aReason; nsTableFrame* table = (nsTableFrame*)aTableFrame.GetFirstInFlow(); nsMargin borderPadding = table->GetChildAreaOffset(&reflowState); + nscoord cellSpacingX = table->GetCellSpacingX(); - x = borderPadding.left; - y = borderPadding.top; + x = borderPadding.left + cellSpacingX; + y = borderPadding.top; //cellspacing added during reflow availSize.width = aAvailWidth; if (NS_UNCONSTRAINEDSIZE != availSize.width) { - availSize.width -= borderPadding.left + borderPadding.right; + availSize.width -= borderPadding.left + borderPadding.right + + (2 * cellSpacingX); } availSize.height = aAvailHeight; if (NS_UNCONSTRAINEDSIZE != availSize.height) { - availSize.height -= borderPadding.top + borderPadding.bottom + (2 * table->GetCellSpacingY()); + availSize.height -= borderPadding.top + borderPadding.bottom + + (2 * table->GetCellSpacingY()); } footerFrame = nsnull; firstBodySection = nsnull; } nsTableReflowState(nsIPresContext& aPresContext, const nsHTMLReflowState& aReflowState, @@ -283,17 +287,17 @@ nsTableFrame::Init(nsIPresContext* aPre } nsTableFrame::~nsTableFrame() { if (nsnull!=mCellMap) { delete mCellMap; mCellMap = nsnull; - } + } if (nsnull!=mTableLayoutStrategy) { delete mTableLayoutStrategy; mTableLayoutStrategy = nsnull; } #ifdef DEBUG_TABLE_REFLOW_TIMING nsTableFrame::DebugReflowDone(this); #endif @@ -1218,19 +1222,19 @@ void nsTableFrame::AppendRowGroups(nsIPr nsTableCellMap* cellMap = GetCellMap(); if (cellMap) { nsFrameList newList(aFirstRowGroupFrame); InsertRowGroups(aPresContext, aFirstRowGroupFrame, newList.LastChild()); } } } -nsTableRowGroupFrame* +static nsTableRowGroupFrame* nsTableFrame::GetRowGroupFrame(nsIFrame* aFrame, - nsIAtom* aFrameTypeIn) const + nsIAtom* aFrameTypeIn) { nsIFrame* rgFrame = nsnull; nsIAtom* frameType = aFrameTypeIn; if (!aFrameTypeIn) { frameType = aFrame->GetType(); } if (nsLayoutAtoms::tableRowGroupFrame == frameType) { rgFrame = aFrame; @@ -1376,53 +1380,64 @@ nsTableFrame::PaintChildren(nsIPresConte // SEC: TODO: adjust the rect for captions NS_METHOD nsTableFrame::Paint(nsIPresContext* aPresContext, nsIRenderingContext& aRenderingContext, const nsRect& aDirtyRect, nsFramePaintLayer aWhichLayer, PRUint32 aFlags) { - PRBool visibleBCBorders = PR_FALSE; if (NS_FRAME_PAINT_LAYER_BACKGROUND == aWhichLayer) { if (GetStyleVisibility()->IsVisible()) { + TableBackgroundPainter painter(this, TableBackgroundPainter::eOrigin_Table, + aPresContext, aRenderingContext, aDirtyRect); + nsresult rv; + + if (eCompatibility_NavQuirks == aPresContext->CompatibilityMode()) { + nsMargin deflate(0,0,0,0); + if (IsBorderCollapse()) { + GET_PIXELS_TO_TWIPS(aPresContext, p2t); + BCPropertyData* propData = + (BCPropertyData*)nsTableFrame::GetProperty(aPresContext, + (nsIFrame*)this, + nsLayoutAtoms::tableBCProperty, + PR_FALSE); + if (propData) { + deflate.top = BC_BORDER_TOP_HALF_COORD(p2t, propData->mTopBorderWidth); + deflate.right = BC_BORDER_RIGHT_HALF_COORD(p2t, propData->mRightBorderWidth); + deflate.bottom = BC_BORDER_BOTTOM_HALF_COORD(p2t, propData->mBottomBorderWidth); + deflate.left = BC_BORDER_LEFT_HALF_COORD(p2t, propData->mLeftBorderWidth); + } + } + rv = painter.QuirksPaintTable(this, deflate); + if (NS_FAILED(rv)) return rv; + } + else { + rv = painter.PaintTable(this); + if (NS_FAILED(rv)) return rv; + } + const nsStyleBorder* border = GetStyleBorder(); - const nsStylePadding* padding = GetStylePadding(); nsRect rect(0, 0, mRect.width, mRect.height); - - nsCSSRendering::PaintBackground(aPresContext, aRenderingContext, this, - aDirtyRect, rect, *border, *padding, - PR_TRUE); - - // paint the border here only for separate borders if (!IsBorderCollapse()) { PRIntn skipSides = GetSkipSides(); nsCSSRendering::PaintBorder(aPresContext, aRenderingContext, this, - aDirtyRect, rect, *border, mStyleContext, skipSides); + aDirtyRect, rect, *border, mStyleContext, + skipSides); } else { - visibleBCBorders = PR_TRUE; + PaintBCBorders(aPresContext, aRenderingContext, aDirtyRect); } + aFlags |= NS_PAINT_FLAG_TABLE_BG_PAINT; + aFlags &= ~NS_PAINT_FLAG_TABLE_CELL_BG_PASS; } } - // for collapsed borders paint the backgrounds of cells, but not their contents (that happens below) - PRUint32 flags = aFlags; - if (visibleBCBorders) { - flags &= ~BORDER_COLLAPSE_BACKGROUNDS; // set bit to 0 - } - PaintChildren(aPresContext, aRenderingContext, aDirtyRect, aWhichLayer, flags); - - if (visibleBCBorders) { - // for collapsed borders, paint the borders and then the backgrounds of cell - // contents but not the backgrounds of the cells - PaintBCBorders(aPresContext, aRenderingContext, aDirtyRect); - flags |= BORDER_COLLAPSE_BACKGROUNDS; // set bit to 1 - PaintChildren(aPresContext, aRenderingContext, aDirtyRect, aWhichLayer, flags); - } + PaintChildren(aPresContext, aRenderingContext, aDirtyRect, + aWhichLayer, aFlags); #ifdef DEBUG // for debug... if ((NS_FRAME_PAINT_LAYER_DEBUG == aWhichLayer) && GetShowFrameBorders()) { aRenderingContext.SetColor(NS_RGB(0,255,0)); aRenderingContext.DrawRect(0, 0, mRect.width, mRect.height); } #endif @@ -1573,52 +1588,55 @@ nsTableFrame::AdjustSiblingsAfterReflow( if (NS_UNCONSTRAINEDSIZE != yInvalid) { nsRect dirtyRect(0, yInvalid, mRect.width, mRect.height - yInvalid); Invalidate(aPresContext, dirtyRect); } return NS_OK; } -void +void nsTableFrame::SetColumnDimensions(nscoord aHeight, const nsMargin& aBorderPadding) { - nscoord colHeight = aHeight -= aBorderPadding.top + aBorderPadding.bottom; nscoord cellSpacingX = GetCellSpacingX(); + nscoord cellSpacingY = GetCellSpacingY(); + nscoord colHeight = aHeight -= aBorderPadding.top + aBorderPadding.bottom + + 2* cellSpacingY; nsIFrame* colGroupFrame = mColGroups.FirstChild(); PRInt32 colX = 0; - nsPoint colGroupOrigin(aBorderPadding.left + cellSpacingX, aBorderPadding.top); + nsPoint colGroupOrigin(aBorderPadding.left + cellSpacingX, + aBorderPadding.top + cellSpacingY); PRInt32 numCols = GetColCount(); while (nsnull != colGroupFrame) { nscoord colGroupWidth = 0; nsIFrame* colFrame = colGroupFrame->GetFirstChild(nsnull); nsPoint colOrigin(0,0); while (nsnull != colFrame) { if (NS_STYLE_DISPLAY_TABLE_COLUMN == colFrame->GetStyleDisplay()->mDisplay) { NS_ASSERTION(colX < numCols, "invalid number of columns"); nscoord colWidth = GetColumnWidth(colX); nsRect colRect(colOrigin.x, colOrigin.y, colWidth, colHeight); colFrame->SetRect(colRect); colOrigin.x += colWidth + cellSpacingX; - - colGroupWidth += colWidth; - if (numCols - 1 != colX) { - colGroupWidth += cellSpacingX; - } + colGroupWidth += colWidth + cellSpacingX; colX++; } colFrame = colFrame->GetNextSibling(); } + if (colGroupWidth) { + colGroupWidth -= cellSpacingX; + } + nsRect colGroupRect(colGroupOrigin.x, colGroupOrigin.y, colGroupWidth, colHeight); colGroupFrame->SetRect(colGroupRect); colGroupFrame = colGroupFrame->GetNextSibling(); - colGroupOrigin.x += colGroupWidth; + colGroupOrigin.x += colGroupWidth + cellSpacingX; } } // SEC: TODO need to worry about continuing frames prev/next in flow for splitting across pages. // XXX this could be made more general to handle row modifications that change the // table height, but first we need to scrutinize every Invalidate static void @@ -2875,17 +2893,17 @@ nsTableFrame::RecoverState(nsTableReflow // If this is a footer row group, remember it const nsStyleDisplay* display = rgFrame->GetStyleDisplay(); // We only allow a single footer frame if ((NS_STYLE_DISPLAY_TABLE_FOOTER_GROUP == display->mDisplay) && !aReflowState.footerFrame) { aReflowState.footerFrame = childFrame; - } + } else { if ((NS_STYLE_DISPLAY_TABLE_ROW_GROUP == display->mDisplay) && !aReflowState.firstBodySection) { aReflowState.firstBodySection = childFrame; } } aReflowState.y += cellSpacingY; @@ -3642,17 +3660,17 @@ nsTableFrame::DistributeHeightToRows(con } else { if (amountUsed > 0) { rowFrame->SetPosition(nsPoint(rowRect.x, yOriginRow)); nsTableFrame::RePositionViews(presContext, rowFrame); } yOriginRow += rowRect.height + cellSpacingY; yEndRG += rowRect.height + cellSpacingY; - } + } rowFrame = rowFrame->GetNextRow(); } if (amountUsed > 0) { rgRect.y = yOriginRG; rgRect.height += amountUsedByRG; rgFrame->SetRect(rgRect); } // Make sure child views are properly positioned @@ -5667,17 +5685,17 @@ nsTableFrame::CalcBCBorders(nsIPresConte } GET_TWIPS_TO_PIXELS(&aPresContext, t2p); // vertical borders indexed in x-direction (cols) BCCellBorders lastVerBorders(damageArea.width + 1, damageArea.x); if (!lastVerBorders.borders) ABORT0(); BCCellBorder lastTopBorder, lastBottomBorder; // horizontal borders indexed in x-direction (cols) BCCellBorders lastBottomBorders(damageArea.width + 1, damageArea.x); if (!lastBottomBorders.borders) ABORT0(); - PRBool startSeg; + PRBool startSeg, gotRowBorder; BCMapCellInfo info, ajaInfo; BCBorderOwner owner, ajaOwner; nscolor ownerColor, ajaColor; PRUint8 ownerBStyle, ajaBStyle; PRUint16 ownerWidth, ajaWidth; PRInt32 cellEndRowIndex = -1; PRInt32 cellEndColIndex = -1; @@ -5689,16 +5707,17 @@ nsTableFrame::CalcBCBorders(nsIPresConte for (iter.First(info); !iter.mAtEnd; iter.Next(info)) { cellEndRowIndex = info.rowIndex + info.rowSpan - 1; cellEndColIndex = info.colIndex + info.colSpan - 1; PRBool bottomRowSpan = PR_FALSE; // see if lastTopBorder, lastBottomBorder need to be reset if (iter.IsNewRow()) { + gotRowBorder = PR_FALSE; lastTopBorder.Reset(info.rowIndex, info.rowSpan); lastBottomBorder.Reset(cellEndRowIndex + 1, info.rowSpan); } else if (info.colIndex > damageArea.x) { lastBottomBorder = lastBottomBorders[info.colIndex - 1]; if (info.rowIndex > lastBottomBorder.index - lastBottomBorder.span) { // the top border's left edge butts against the middle of a rowspan lastTopBorder.Reset(info.rowIndex, info.rowSpan); @@ -5731,27 +5750,65 @@ nsTableFrame::CalcBCBorders(nsIPresConte tlCorner.Update(NS_SIDE_RIGHT, owner, ownerBStyle, ownerWidth, ownerColor); tableCellMap->SetBCBorderCorner(eTopLeft, *info.cellMap, 0, 0, colX, tlCorner.ownerSide, tlCorner.subWidth, tlCorner.bevel); } topCorners[colX + 1].Set(NS_SIDE_LEFT, owner, ownerBStyle, ownerWidth, ownerColor); // top right // update lastTopBorder and see if a new segment starts startSeg = SetHorBorder(ownerBStyle, ownerWidth, ownerColor, tlCorner, lastTopBorder); // store the border segment in the cell map - tableCellMap->SetBCBorderEdge(NS_SIDE_TOP, *info.cellMap, 0, 0, colX, + tableCellMap->SetBCBorderEdge(NS_SIDE_TOP, *info.cellMap, 0, 0, colX, 1, owner, ownerWidth, startSeg); // update the affected borders of the cell, row, and table DivideBCBorderSize(ownerWidth, smallHalf, largeHalf); if (info.cell) { info.cell->SetBorderWidth(NS_SIDE_TOP, PR_MAX(smallHalf, info.cell->GetBorderWidth(NS_SIDE_TOP))); } if (info.topRow) { info.topRow->SetTopBCBorderWidth(PR_MAX(smallHalf, info.topRow->GetTopBCBorderWidth())); } propData->mTopBorderWidth = LimitBorderWidth(PR_MAX(propData->mTopBorderWidth, (PRUint8)ownerWidth)); + //calculate column continuous borders + //we only need to do this once, so we'll do it only on the first row + CalcDominantBorder(this, cgFrame, colFrame, info.rg, info.topRow, + nsnull, PR_TRUE, NS_SIDE_TOP, PR_FALSE, t2p, + owner, ownerBStyle, ownerWidth, ownerColor); + ((nsTableColFrame*)colFrame)->SetContinuousBCBorderWidth(NS_SIDE_TOP, + ownerWidth); + if (numCols == cellEndColIndex + 1) { + CalcDominantBorder(this, cgFrame, colFrame, nsnull, nsnull, + nsnull, PR_TRUE, NS_SIDE_RIGHT, PR_FALSE, t2p, + owner, ownerBStyle, ownerWidth, ownerColor); + } + else { + CalcDominantBorder(nsnull, cgFrame, colFrame, nsnull, nsnull, + nsnull, PR_FALSE, NS_SIDE_RIGHT, PR_FALSE, t2p, + owner, ownerBStyle, ownerWidth, ownerColor); + } + ((nsTableColFrame*)colFrame)->SetContinuousBCBorderWidth(NS_SIDE_RIGHT, + ownerWidth); + } + //calculate continuous top first row & rowgroup border: special case + //because it must include the table in the collapse + CalcDominantBorder(this, nsnull, nsnull, info.rg, info.topRow, + nsnull, PR_TRUE, NS_SIDE_TOP, PR_FALSE, t2p, + owner, ownerBStyle, ownerWidth, ownerColor); + info.topRow->SetContinuousBCBorderWidth(NS_SIDE_TOP, ownerWidth); + if (info.cgRight) { + //calculate continuous top colgroup border once per colgroup + CalcDominantBorder(this, info.cg, nsnull, info.rg, info.topRow, + nsnull, PR_TRUE, NS_SIDE_TOP, PR_FALSE, t2p, + owner, ownerBStyle, ownerWidth, ownerColor); + info.cg->SetContinuousBCBorderWidth(NS_SIDE_TOP, ownerWidth); + } + if (0 == info.colIndex) { + CalcDominantBorder(this, info.cg, info.leftCol, nsnull, nsnull, + nsnull, PR_TRUE, NS_SIDE_LEFT, PR_FALSE, t2p, + owner, ownerBStyle, ownerWidth, ownerColor); + mBits.mLeftContBCBorder = ownerWidth; } } else { // see if the top border needs to be the start of a segment due to a vertical border owning the corner if (info.colIndex > 0) { BCData& data = ((BCCellData*)info.cellData)->mData; if (!data.IsTopStart()) { PRUint8 cornerSide; @@ -5769,20 +5826,20 @@ nsTableFrame::CalcBCBorders(nsIPresConte if (0 == info.colIndex) { if (!tableBorderReset[NS_SIDE_LEFT]) { propData->mLeftBorderWidth = 0; tableBorderReset[NS_SIDE_LEFT] = PR_TRUE; } nsTableRowFrame* rowFrame = nsnull; for (PRInt32 rowX = info.rowIndex; rowX <= cellEndRowIndex; rowX++) { rowFrame = (rowX == info.rowIndex) ? info.topRow : rowFrame->GetNextRow(); - CalcDominantBorder(this, info.cg, info.leftCol, info.rg, rowFrame, info.cell, PR_TRUE, NS_SIDE_LEFT, + CalcDominantBorder(this, info.cg, info.leftCol, info.rg, rowFrame, info.cell, PR_TRUE, NS_SIDE_LEFT, PR_FALSE, t2p, owner, ownerBStyle, ownerWidth, ownerColor); BCCornerInfo& tlCorner = (0 == rowX) ? topCorners[0] : bottomCorners[0]; // top left - tlCorner.Update(NS_SIDE_BOTTOM, owner, ownerBStyle, ownerWidth, ownerColor); + tlCorner.Update(NS_SIDE_BOTTOM, owner, ownerBStyle, ownerWidth, ownerColor); tableCellMap->SetBCBorderCorner(eTopLeft, *info.cellMap, iter.mRowGroupStart, rowX, 0, tlCorner.ownerSide, tlCorner.subWidth, tlCorner.bevel); bottomCorners[0].Set(NS_SIDE_TOP, owner, ownerBStyle, ownerWidth, ownerColor); // bottom left // update lastVerBordersBorder and see if a new segment starts startSeg = SetBorder(ownerBStyle, ownerWidth, ownerColor, lastVerBorders[0]); // store the border segment in the cell map tableCellMap->SetBCBorderEdge(NS_SIDE_LEFT, *info.cellMap, iter.mRowGroupStart, rowX, info.colIndex, 1, owner, ownerWidth, startSeg); @@ -5790,16 +5847,27 @@ nsTableFrame::CalcBCBorders(nsIPresConte DivideBCBorderSize(ownerWidth, smallHalf, largeHalf); if (info.cell) { info.cell->SetBorderWidth(NS_SIDE_LEFT, PR_MAX(smallHalf, info.cell->GetBorderWidth(NS_SIDE_LEFT))); } if (info.leftCol) { info.leftCol->SetLeftBorderWidth(PR_MAX(smallHalf, info.leftCol->GetLeftBorderWidth())); } propData->mLeftBorderWidth = LimitBorderWidth(PR_MAX(propData->mLeftBorderWidth, ownerWidth)); + //get row continuous borders + CalcDominantBorder(this, info.cg, info.leftCol, info.rg, rowFrame, nsnull, PR_TRUE, NS_SIDE_LEFT, + PR_FALSE, t2p, owner, ownerBStyle, ownerWidth, ownerColor); + rowFrame->SetContinuousBCBorderWidth(NS_SIDE_LEFT, ownerWidth); + } + //get row group continuous borders + if (info.rgBottom) { //once per row group, so check for bottom + CalcDominantBorder(this, info.cg, info.leftCol, info.rg, nsnull, + nsnull, PR_TRUE, NS_SIDE_LEFT, PR_FALSE, t2p, + owner, ownerBStyle, ownerWidth, ownerColor); + info.rg->SetContinuousBCBorderWidth(NS_SIDE_LEFT, ownerWidth); } } // find the dominate border considernig the cell's right border, adjacent cells and the table, row group, row if (numCols == cellEndColIndex + 1) { // touches right edge of table if (!tableBorderReset[NS_SIDE_RIGHT]) { propData->mRightBorderWidth = 0; tableBorderReset[NS_SIDE_RIGHT] = PR_TRUE; @@ -5827,16 +5895,28 @@ nsTableFrame::CalcBCBorders(nsIPresConte DivideBCBorderSize(ownerWidth, smallHalf, largeHalf); if (info.cell) { info.cell->SetBorderWidth(NS_SIDE_RIGHT, PR_MAX(largeHalf, info.cell->GetBorderWidth(NS_SIDE_RIGHT))); } if (info.rightCol) { info.rightCol->SetRightBorderWidth(PR_MAX(largeHalf, info.rightCol->GetRightBorderWidth())); } propData->mRightBorderWidth = LimitBorderWidth(PR_MAX(propData->mRightBorderWidth, ownerWidth)); + //get row continuous borders + CalcDominantBorder(this, info.cg, info.rightCol, info.rg, rowFrame, + nsnull, PR_TRUE, NS_SIDE_RIGHT, PR_TRUE, t2p, + owner, ownerBStyle, ownerWidth, ownerColor); + rowFrame->SetContinuousBCBorderWidth(NS_SIDE_RIGHT, ownerWidth); + } + //get row group continuous borders + if (info.rgBottom) { //once per rg, so check for bottom + CalcDominantBorder(this, info.cg, info.rightCol, info.rg, nsnull, + nsnull, PR_TRUE, NS_SIDE_RIGHT, PR_TRUE, t2p, + owner, ownerBStyle, ownerWidth, ownerColor); + info.rg->SetContinuousBCBorderWidth(NS_SIDE_RIGHT, ownerWidth); } } else { PRInt32 segLength = 0; BCMapCellInfo priorAjaInfo; for (PRInt32 rowX = info.rowIndex; rowX <= cellEndRowIndex; rowX += segLength) { iter.PeekRight(info, rowX, ajaInfo); const nsIFrame* cg = (info.cgRight) ? info.cg : nsnull; @@ -5953,27 +6033,42 @@ nsTableFrame::CalcBCBorders(nsIPresConte if (info.bottomRow) { info.bottomRow->SetBottomBCBorderWidth(PR_MAX(largeHalf, info.bottomRow->GetBottomBCBorderWidth())); } propData->mBottomBorderWidth = LimitBorderWidth(PR_MAX(propData->mBottomBorderWidth, ownerWidth)); // update lastBottomBorders lastBottomBorder.index = cellEndRowIndex + 1; lastBottomBorder.span = info.rowSpan; lastBottomBorders[colX] = lastBottomBorder; - } + //get col continuous border + CalcDominantBorder(this, cgFrame, colFrame, info.rg, info.bottomRow, + nsnull, PR_TRUE, NS_SIDE_BOTTOM, PR_TRUE, t2p, + owner, ownerBStyle, ownerWidth, ownerColor); + ((nsTableColFrame*)colFrame)->SetContinuousBCBorderWidth(NS_SIDE_BOTTOM, + ownerWidth); + } + //get row group/col group continuous border + CalcDominantBorder(this, nsnull, nsnull, info.rg, info.bottomRow, + nsnull, PR_TRUE, NS_SIDE_BOTTOM, PR_TRUE, t2p, + owner, ownerBStyle, ownerWidth, ownerColor); + info.rg->SetContinuousBCBorderWidth(NS_SIDE_BOTTOM, ownerWidth); + CalcDominantBorder(this, info.cg, nsnull, info.rg, info.bottomRow, + nsnull, PR_TRUE, NS_SIDE_BOTTOM, PR_TRUE, t2p, + owner, ownerBStyle, ownerWidth, ownerColor); + info.cg->SetContinuousBCBorderWidth(NS_SIDE_BOTTOM, ownerWidth); } else { PRInt32 segLength = 0; for (PRInt32 colX = info.colIndex; colX <= cellEndColIndex; colX += segLength) { iter.PeekBottom(info, colX, ajaInfo); const nsIFrame* rg = (info.rgBottom) ? info.rg : nsnull; - CalcDominantBorder(nsnull, nsnull, nsnull, rg, info.bottomRow, info.cell, PR_FALSE, NS_SIDE_BOTTOM, + CalcDominantBorder(nsnull, nsnull, nsnull, rg, info.bottomRow, info.cell, PR_FALSE, NS_SIDE_BOTTOM, PR_TRUE, t2p, owner, ownerBStyle, ownerWidth, ownerColor); rg = (ajaInfo.rgTop) ? ajaInfo.rg : nsnull; - CalcDominantBorder(nsnull, nsnull, nsnull, rg, ajaInfo.topRow, ajaInfo.cell, PR_FALSE, NS_SIDE_TOP, + CalcDominantBorder(nsnull, nsnull, nsnull, rg, ajaInfo.topRow, ajaInfo.cell, PR_FALSE, NS_SIDE_TOP, PR_FALSE, t2p, ajaOwner, ajaBStyle, ajaWidth, ajaColor); CalcDominantBorder(PR_FALSE, owner, ownerBStyle, ownerWidth, ownerColor, ajaOwner, ajaBStyle, ajaWidth, ajaColor, owner, ownerBStyle, ownerWidth, ownerColor, PR_TRUE); segLength = PR_MAX(1, ajaInfo.colIndex + ajaInfo.colSpan - colX); segLength = PR_MIN(segLength, info.colIndex + info.colSpan - colX); // update, store the bottom left corner BCCornerInfo& blCorner = bottomCorners[colX]; // bottom left @@ -5981,33 +6076,33 @@ nsTableFrame::CalcBCBorders(nsIPresConte PRBool update = PR_TRUE; if ((colX == info.colIndex) && (colX > damageArea.x)) { PRInt32 prevRowIndex = lastBottomBorders[colX - 1].index; if (prevRowIndex > cellEndRowIndex + 1) { // hits a rowspan on the right update = PR_FALSE; // the corner was taken care of during the cell on the left } else if (prevRowIndex < cellEndRowIndex + 1) { // spans below the cell to the left topCorners[colX] = blCorner; - blCorner.Set(NS_SIDE_RIGHT, owner, ownerBStyle, ownerWidth, ownerColor); + blCorner.Set(NS_SIDE_RIGHT, owner, ownerBStyle, ownerWidth, ownerColor); update = PR_FALSE; } } if (update) { - blCorner.Update(NS_SIDE_RIGHT, owner, ownerBStyle, ownerWidth, ownerColor); + blCorner.Update(NS_SIDE_RIGHT, owner, ownerBStyle, ownerWidth, ownerColor); } if (BOTTOM_DAMAGED(cellEndRowIndex) && LEFT_DAMAGED(colX)) { if (hitsSpanBelow) { - tableCellMap->SetBCBorderCorner(eBottomLeft, *info.cellMap, iter.mRowGroupStart, cellEndRowIndex, colX, + tableCellMap->SetBCBorderCorner(eBottomLeft, *info.cellMap, iter.mRowGroupStart, cellEndRowIndex, colX, blCorner.ownerSide, blCorner.subWidth, blCorner.bevel); } // store any corners this cell spans together with the aja cell for (PRInt32 cX = colX + 1; cX < colX + segLength; cX++) { - BCCornerInfo& corner = bottomCorners[cX]; + BCCornerInfo& corner = bottomCorners[cX]; corner.Set(NS_SIDE_RIGHT, owner, ownerBStyle, ownerWidth, ownerColor); - tableCellMap->SetBCBorderCorner(eBottomLeft, *info.cellMap, iter.mRowGroupStart, cellEndRowIndex, + tableCellMap->SetBCBorderCorner(eBottomLeft, *info.cellMap, iter.mRowGroupStart, cellEndRowIndex, cX, corner.ownerSide, corner.subWidth, PR_FALSE); } } // update lastBottomBorders and see if a new segment starts startSeg = SetHorBorder(ownerBStyle, ownerWidth, ownerColor, blCorner, lastBottomBorder); if (!startSeg) { // make sure that we did not compare apples to oranges i.e. the current border // should be a continuation of the lastBottomBorder, as it is a bottom border @@ -6017,17 +6112,17 @@ nsTableFrame::CalcBCBorders(nsIPresConte lastBottomBorder.index = cellEndRowIndex + 1; lastBottomBorder.span = info.rowSpan; for (PRInt32 cX = colX; cX < colX + segLength; cX++) { lastBottomBorders[cX] = lastBottomBorder; } // store the border segment the cell map and update cellBorders if (BOTTOM_DAMAGED(cellEndRowIndex) && LEFT_DAMAGED(colX) && RIGHT_DAMAGED(colX)) { - tableCellMap->SetBCBorderEdge(NS_SIDE_BOTTOM, *info.cellMap, iter.mRowGroupStart, cellEndRowIndex, + tableCellMap->SetBCBorderEdge(NS_SIDE_BOTTOM, *info.cellMap, iter.mRowGroupStart, cellEndRowIndex, colX, segLength, owner, ownerWidth, startSeg); // update the borders of the affected cells and rows DivideBCBorderSize(ownerWidth, smallHalf, largeHalf); if (info.cell) { info.cell->SetBorderWidth(NS_SIDE_BOTTOM, PR_MAX(largeHalf, info.cell->GetBorderWidth(NS_SIDE_BOTTOM))); } if (info.bottomRow) { info.bottomRow->SetBottomBCBorderWidth(PR_MAX(largeHalf, info.bottomRow->GetBottomBCBorderWidth())); @@ -6036,26 +6131,46 @@ nsTableFrame::CalcBCBorders(nsIPresConte ajaInfo.cell->SetBorderWidth(NS_SIDE_TOP, PR_MAX(smallHalf, ajaInfo.cell->GetBorderWidth(NS_SIDE_TOP))); } if (ajaInfo.topRow) { ajaInfo.topRow->SetTopBCBorderWidth(PR_MAX(smallHalf, ajaInfo.topRow->GetTopBCBorderWidth())); } } // update bottom right corner BCCornerInfo& brCorner = bottomCorners[colX + segLength]; - brCorner.Update(NS_SIDE_LEFT, owner, ownerBStyle, ownerWidth, ownerColor); + brCorner.Update(NS_SIDE_LEFT, owner, ownerBStyle, ownerWidth, ownerColor); + } + if (!gotRowBorder && 1 == info.rowSpan) { + //get continuous row/row group border + const nsIFrame* rg = (info.rgBottom) ? info.rg : nsnull; + CalcDominantBorder(nsnull, nsnull, nsnull, rg, info.bottomRow, + nsnull, PR_FALSE, NS_SIDE_BOTTOM, PR_TRUE, t2p, + owner, ownerBStyle, ownerWidth, ownerColor); + rg = (ajaInfo.rgTop) ? ajaInfo.rg : nsnull; + CalcDominantBorder(nsnull, nsnull, nsnull, rg, ajaInfo.topRow, + nsnull, PR_FALSE, NS_SIDE_TOP, PR_FALSE, t2p, + ajaOwner, ajaBStyle, ajaWidth, ajaColor); + CalcDominantBorder(PR_FALSE, owner, ownerBStyle, ownerWidth, + ownerColor, ajaOwner, ajaBStyle, ajaWidth, + ajaColor, owner, ownerBStyle, ownerWidth, + ownerColor, PR_TRUE); + ajaInfo.topRow->SetContinuousBCBorderWidth(NS_SIDE_TOP, ownerWidth); + if (info.rgBottom) { + info.rg->SetContinuousBCBorderWidth(NS_SIDE_BOTTOM, ownerWidth); + } + gotRowBorder = PR_TRUE; } } // see if the cell to the right had a rowspan and its lower left border needs be joined with this one's bottom - if ((numCols != cellEndColIndex + 1) && // there is a cell to the right + if ((numCols != cellEndColIndex + 1) && // there is a cell to the right (lastBottomBorders[cellEndColIndex + 1].span > 1)) { // cell to right was a rowspan BCCornerInfo& corner = bottomCorners[cellEndColIndex + 1]; if ((NS_SIDE_TOP != corner.ownerSide) && (NS_SIDE_BOTTOM != corner.ownerSide)) { // not a vertical owner - BCCellBorder& thisBorder = lastBottomBorder; + BCCellBorder& thisBorder = lastBottomBorder; BCCellBorder& nextBorder = lastBottomBorders[info.colIndex + 1]; if ((thisBorder.color == nextBorder.color) && (thisBorder.width == nextBorder.width) && (thisBorder.style == nextBorder.style)) { // set the flag on the next border indicating it is not the start of a new segment if (iter.mCellMap) { BCData* bcData = tableCellMap->GetBCData(NS_SIDE_BOTTOM, *iter.mCellMap, cellEndRowIndex, cellEndColIndex + 1); if (bcData) { @@ -7213,28 +7328,28 @@ void nsTableFrame::DebugReflowDone(nsIFr PRBool nsTableFrame::RowHasSpanningCells(PRInt32 aRowIndex) { PRBool result = PR_FALSE; nsTableCellMap* cellMap = GetCellMap(); NS_PRECONDITION (cellMap, "bad call, cellMap not yet allocated."); if (cellMap) { - result = cellMap->RowHasSpanningCells(aRowIndex); + result = cellMap->RowHasSpanningCells(aRowIndex); } return result; } PRBool nsTableFrame::RowIsSpannedInto(PRInt32 aRowIndex) { PRBool result = PR_FALSE; nsTableCellMap* cellMap = GetCellMap(); NS_PRECONDITION (cellMap, "bad call, cellMap not yet allocated."); if (cellMap) { - result = cellMap->RowIsSpannedInto(aRowIndex); + result = cellMap->RowIsSpannedInto(aRowIndex); } return result; } PRBool nsTableFrame::ColHasSpanningCells(PRInt32 aColIndex) { PRBool result = PR_FALSE; nsTableCellMap * cellMap = GetCellMap(); Index: mozilla/layout/html/table/src/nsTableRowGroupFrame.h =================================================================== RCS file: /cvsroot/mozilla/layout/html/table/src/nsTableRowGroupFrame.h,v retrieving revision 3.105 diff -p -u -8 -r3.105 nsTableRowGroupFrame.h --- mozilla/layout/html/table/src/nsTableRowGroupFrame.h 18 Jan 2004 10:28:39 -0000 3.105 +++ mozilla/layout/html/table/src/nsTableRowGroupFrame.h 11 Feb 2004 03:08:58 -0000 @@ -36,16 +36,17 @@ * ***** END LICENSE BLOCK ***** */ #ifndef nsTableRowGroupFrame_h__ #define nsTableRowGroupFrame_h__ #include "nscore.h" #include "nsHTMLContainerFrame.h" #include "nsIAtom.h" #include "nsILineIterator.h" +#include "nsTablePainter.h" class nsTableFrame; class nsTableRowFrame; class nsTableCellFrame; #ifdef DEBUG_TABLE_REFLOW_TIMING class nsReflowTimer; #endif @@ -212,16 +213,32 @@ public: /** * Get the total height of all the row rects */ nscoord GetHeightOfRows(); nscoord GetHeightBasis(const nsHTMLReflowState& aReflowState); nsMargin* GetBCBorderWidth(float aPixelsToTwips, nsMargin& aBorder); + + /** + * Gets inner border widths before collapsing with cell borders + * Caller must get top border from previous row group or from table + * GetContinuousBCBorderWidth will not overwrite aBorder.top + * see nsTablePainter about continuous borders + */ + void GetContinuousBCBorderWidth(float aPixelsToTwips, + nsMargin& aBorder); + /** + * Sets full border widths before collapsing with cell borders + * @param aForSide - side to set; only right, left, and bottom valid + */ + void SetContinuousBCBorderWidth(PRUint8 aForSide, + nscoord aPixelValue); + // nsILineIterator methods public: NS_IMETHOD GetNumLines(PRInt32* aResult); NS_IMETHOD GetDirection(PRBool* aIsRightToLeft); NS_IMETHOD GetLine(PRInt32 aLineNumber, nsIFrame** aFirstFrameOnLine, PRInt32* aNumFramesOnLine, @@ -351,16 +368,23 @@ protected: PRBool IsSimpleRowFrame(nsTableFrame* aTableFrame, nsIFrame* aFrame); void GetNextRowSibling(nsIFrame** aRowFrame); void UndoContinuedRow(nsIPresContext* aPresContext, nsTableRowFrame* aRow); + +private: + // border widths in pixels in the collapsing border model + PRUint8 mRightContBorderWidth; + PRUint8 mBottomContBorderWidth; + PRUint8 mLeftContBorderWidth; + public: virtual nsIFrame* GetFirstFrame() { return mFrames.FirstChild(); }; virtual nsIFrame* GetLastFrame() { return mFrames.LastChild(); }; virtual void GetNextFrame(nsIFrame* aFrame, nsIFrame** aResult) { *aResult = aFrame->GetNextSibling(); }; PRBool IsRepeatable() const; void SetRepeatable(PRBool aRepeatable); PRBool HasStyleHeight() const; @@ -410,10 +434,23 @@ inline PRBool nsTableRowGroupFrame::HasS inline void nsTableRowGroupFrame::SetHasStyleHeight(PRBool aValue) { if (aValue) { mState |= NS_ROWGROUP_HAS_STYLE_HEIGHT; } else { mState &= ~NS_ROWGROUP_HAS_STYLE_HEIGHT; } +} + +inline void +nsTableRowGroupFrame::GetContinuousBCBorderWidth(float aPixelsToTwips, + nsMargin& aBorder) +{ + aBorder.right = BC_BORDER_LEFT_HALF_COORD(aPixelsToTwips, + mRightContBorderWidth); + aBorder.bottom = BC_BORDER_TOP_HALF_COORD(aPixelsToTwips, + mBottomContBorderWidth); + aBorder.left = BC_BORDER_RIGHT_HALF_COORD(aPixelsToTwips, + mLeftContBorderWidth); + return; } #endif Index: mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp =================================================================== RCS file: /cvsroot/mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp,v retrieving revision 3.314 diff -p -u -8 -r3.314 nsTableRowGroupFrame.cpp --- mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp 28 Jan 2004 18:44:41 -0000 3.314 +++ mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp 11 Feb 2004 03:09:00 -0000 @@ -89,17 +89,17 @@ nsTableRowGroupFrame::QueryInterface(con if (NULL == aInstancePtr) { return NS_ERROR_NULL_POINTER; } static NS_DEFINE_IID(kITableRowGroupIID, NS_ITABLEROWGROUPFRAME_IID); if (aIID.Equals(kITableRowGroupIID)) { *aInstancePtr = (void*)this; return NS_OK; } - else if (aIID.Equals(NS_GET_IID(nsILineIteratorNavigator))) + else if (aIID.Equals(NS_GET_IID(nsILineIteratorNavigator))) { // note there is no addref here, frames are not addref'd *aInstancePtr = (void*)(nsILineIteratorNavigator*)this; return NS_OK; } else { return nsHTMLContainerFrame::QueryInterface(aIID, aInstancePtr); } } @@ -199,26 +199,45 @@ NS_METHOD nsTableRowGroupFrame::Paint(ns #ifdef DEBUG // for debug... if ((NS_FRAME_PAINT_LAYER_DEBUG == aWhichLayer) && GetShowFrameBorders()) { aRenderingContext.SetColor(NS_RGB(0,255,0)); aRenderingContext.DrawRect(0, 0, mRect.width, mRect.height); } #endif - // Standards mode background painting removed. See bug 4510 + + if (NS_FRAME_PAINT_LAYER_BACKGROUND == aWhichLayer && + //direct (not table-called) background paint + !(aFlags & (NS_PAINT_FLAG_TABLE_BG_PAINT | NS_PAINT_FLAG_TABLE_CELL_BG_PASS))) { + //Quirks inherits bg into cells & paints them there + if (eCompatibility_NavQuirks != aPresContext->CompatibilityMode() && + GetStyleVisibility()->IsVisible()) { + nsTableFrame* tableFrame; + nsTableFrame::GetTableFrame(this, tableFrame); + NS_ASSERTION(tableFrame, "null table frame"); + + TableBackgroundPainter painter(tableFrame, + TableBackgroundPainter::eOrigin_TableRowGroup, + aPresContext, aRenderingContext, + aDirtyRect); + nsresult rv = painter.PaintRowGroup(this); + if (NS_FAILED(rv)) return rv; + } + } PRUint8 overflow = GetStyleDisplay()->mOverflow; PRBool clip = overflow == NS_STYLE_OVERFLOW_HIDDEN || overflow == NS_STYLE_OVERFLOW_SCROLLBARS_NONE; if (clip) { aRenderingContext.PushState(); SetOverflowClipRect(aRenderingContext); } - PaintChildren(aPresContext, aRenderingContext, aDirtyRect, aWhichLayer, aFlags); + PaintChildren(aPresContext, aRenderingContext, aDirtyRect, + aWhichLayer, aFlags); if (clip) { PRBool clipState; aRenderingContext.PopState(clipState); } return NS_OK; /*nsFrame::Paint(aPresContext, aRenderingContext, aDirtyRect, aWhichLayer);*/ } @@ -281,19 +300,19 @@ nsTableRowGroupFrame::GetFrameForPoint(n // this should act like a block, so we need to override return GetFrameForPointUsing(aPresContext, aPoint, nsnull, aWhichLayer, PR_FALSE, aFrame); } // Position and size aKidFrame and update our reflow state. The origin of // aKidRect is relative to the upper-left origin of our frame void nsTableRowGroupFrame::PlaceChild(nsIPresContext* aPresContext, - nsRowGroupReflowState& aReflowState, - nsIFrame* aKidFrame, - nsHTMLReflowMetrics& aDesiredSize) + nsRowGroupReflowState& aReflowState, + nsIFrame* aKidFrame, + nsHTMLReflowMetrics& aDesiredSize) { // Place and size the child FinishReflowChild(aKidFrame, aPresContext, nsnull, aDesiredSize, 0, aReflowState.y, 0); // Adjust the running y-offset aReflowState.y += aDesiredSize.height; // If our height is constrained then update the available height @@ -1850,16 +1869,34 @@ nsTableRowGroupFrame::GetBCBorderWidth(f lastRowFrame = rowFrame; } if (firstRowFrame) { aBorder.top = firstRowFrame->GetTopBCBorderWidth(&aPixelsToTwips); aBorder.bottom = lastRowFrame->GetBottomBCBorderWidth(&aPixelsToTwips); } return &aBorder; +} + +void nsTableRowGroupFrame::SetContinuousBCBorderWidth(PRUint8 aForSide, + nscoord aPixelValue) +{ + switch (aForSide) { + case NS_SIDE_RIGHT: + mRightContBorderWidth = aPixelValue; + return; + case NS_SIDE_BOTTOM: + mBottomContBorderWidth = aPixelValue; + return; + case NS_SIDE_LEFT: + mLeftContBorderWidth = aPixelValue; + return; + default: + NS_ERROR("invalid NS_SIDE argument"); + } } //nsILineIterator methods for nsTableFrame NS_IMETHODIMP nsTableRowGroupFrame::GetNumLines(PRInt32* aResult) { NS_ENSURE_ARG_POINTER(aResult); *aResult = GetRowCount(); Index: mozilla/layout/html/table/src/nsTableRowFrame.h =================================================================== RCS file: /cvsroot/mozilla/layout/html/table/src/nsTableRowFrame.h,v retrieving revision 3.106 diff -p -u -8 -r3.106 nsTableRowFrame.h --- mozilla/layout/html/table/src/nsTableRowFrame.h 18 Jan 2004 10:28:39 -0000 3.106 +++ mozilla/layout/html/table/src/nsTableRowFrame.h 11 Feb 2004 03:09:00 -0000 @@ -34,16 +34,17 @@ * the terms of any one of the NPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ #ifndef nsTableRowFrame_h__ #define nsTableRowFrame_h__ #include "nscore.h" #include "nsHTMLContainerFrame.h" +#include "nsTablePainter.h" class nsTableFrame; class nsTableCellFrame; struct nsTableCellReflowState; #ifdef DEBUG_TABLE_REFLOW_TIMING class nsReflowTimer; #endif @@ -223,24 +224,44 @@ public: void SetUnpaginatedHeight(nsIPresContext* aPresContext, nscoord aValue); nscoord GetTopBCBorderWidth(float* aPixelsToTwips = nsnull); void SetTopBCBorderWidth(nscoord aWidth); nscoord GetBottomBCBorderWidth(float* aPixelsToTwips = nsnull); void SetBottomBCBorderWidth(nscoord aWidth); nsMargin* GetBCBorderWidth(float aPixelsToTwips, nsMargin& aBorder); + + /** + * Gets inner border widths before collapsing with cell borders + * Caller must get bottom border from next row or from table + * GetContinuousBCBorderWidth will not overwrite aBorder.bottom + * see nsTablePainter about continuous borders + */ + void GetContinuousBCBorderWidth(float aPixelsToTwips, + nsMargin& aBorder); + /** + * @returns outer top bc border == prev row's bottom inner + */ + nscoord GetOuterTopContBCBorderWidth(float aPixelsToTwips); + /** + * Sets full border widths before collapsing with cell borders + * @param aForSide - side to set; only accepts right, left, and top + */ + void SetContinuousBCBorderWidth(PRUint8 aForSide, + nscoord aPixelValue); + protected: /** protected constructor. * @see NewFrame */ nsTableRowFrame(); - void InitChildReflowState(nsIPresContext& aPresContext, + void InitChildReflowState(nsIPresContext& aPresContext, const nsSize& aAvailSize, PRBool aBorderCollapse, float aPixelsToTwips, nsTableCellReflowState& aReflowState, PRBool aResetComputedWidth = PR_FALSE); /** implement abstract method on nsHTMLContainerFrame */ virtual PRIntn GetSkipSides() const; @@ -310,18 +331,21 @@ private: // cell if mHasFixedHeight is set nscoord mStyleFixedHeight; // max-ascent and max-descent amongst all cells that have 'vertical-align: baseline' nscoord mMaxCellAscent; // does include cells with rowspan > 1 nscoord mMaxCellDescent; // does *not* include cells with rowspan > 1 // border widths in pixels in the collapsing border model - unsigned mTopBorderWidth:8; - unsigned mBottomBorderWidth:8; + PRUint8 mTopBorderWidth; + PRUint8 mBottomBorderWidth; + PRUint8 mRightContBorderWidth; + PRUint8 mTopContBorderWidth; + PRUint8 mLeftContBorderWidth; #ifdef DEBUG_TABLE_REFLOW_TIMING public: nsReflowTimer* mTimer; #endif }; inline PRInt32 nsTableRowFrame::GetRowIndex() const @@ -450,11 +474,28 @@ inline nsMargin* nsTableRowFrame::GetBCB nsMargin& aBorder) { aBorder.left = aBorder.right = 0; aBorder.top = NSToCoordRound(aPixelsToTwips * mTopBorderWidth); aBorder.bottom = NSToCoordRound(aPixelsToTwips * mBottomBorderWidth); return &aBorder; +} + +inline void +nsTableRowFrame::GetContinuousBCBorderWidth(float aPixelsToTwips, + nsMargin& aBorder) +{ + aBorder.right = BC_BORDER_LEFT_HALF_COORD(aPixelsToTwips, + mLeftContBorderWidth); + aBorder.top = BC_BORDER_BOTTOM_HALF_COORD(aPixelsToTwips, + mTopContBorderWidth); + aBorder.left = BC_BORDER_RIGHT_HALF_COORD(aPixelsToTwips, + mRightContBorderWidth); +} + +inline nscoord nsTableRowFrame::GetOuterTopContBCBorderWidth(float aPixelsToTwips) +{ + return BC_BORDER_TOP_HALF_COORD(aPixelsToTwips, mTopContBorderWidth); } #endif Index: mozilla/layout/html/table/src/nsTableRowFrame.cpp =================================================================== RCS file: /cvsroot/mozilla/layout/html/table/src/nsTableRowFrame.cpp,v retrieving revision 3.337 diff -p -u -8 -r3.337 nsTableRowFrame.cpp --- mozilla/layout/html/table/src/nsTableRowFrame.cpp 28 Jan 2004 18:44:41 -0000 3.337 +++ mozilla/layout/html/table/src/nsTableRowFrame.cpp 11 Feb 2004 03:09:01 -0000 @@ -533,26 +533,45 @@ NS_METHOD nsTableRowFrame::Paint(nsIPres #ifdef DEBUG // for debug... if ((NS_FRAME_PAINT_LAYER_DEBUG == aWhichLayer) && GetShowFrameBorders()) { aRenderingContext.SetColor(NS_RGB(0,255,0)); aRenderingContext.DrawRect(0, 0, mRect.width, mRect.height); } #endif - // Standards mode background painting removed. See bug 4510 + + if (NS_FRAME_PAINT_LAYER_BACKGROUND == aWhichLayer && + //direct (not table-called) background paint + !(aFlags & (NS_PAINT_FLAG_TABLE_BG_PAINT | NS_PAINT_FLAG_TABLE_CELL_BG_PASS))) { + //Quirks inherits bg into cells & paints them there + if (eCompatibility_NavQuirks != aPresContext->CompatibilityMode() && + GetStyleVisibility()->IsVisible()) { + nsTableFrame* tableFrame; + nsTableFrame::GetTableFrame(this, tableFrame); + NS_ASSERTION(tableFrame, "null table frame"); + + TableBackgroundPainter painter(tableFrame, + TableBackgroundPainter::eOrigin_TableRow, + aPresContext, aRenderingContext, + aDirtyRect); + nsresult rv = painter.PaintRow(this); + if (NS_FAILED(rv)) return rv; + } + } PRUint8 overflow = GetStyleDisplay()->mOverflow; PRBool clip = overflow == NS_STYLE_OVERFLOW_HIDDEN || overflow == NS_STYLE_OVERFLOW_SCROLLBARS_NONE; if (clip) { aRenderingContext.PushState(); SetOverflowClipRect(aRenderingContext); } - PaintChildren(aPresContext, aRenderingContext, aDirtyRect, aWhichLayer, aFlags); + PaintChildren(aPresContext, aRenderingContext, aDirtyRect, + aWhichLayer, aFlags); if (clip) { PRBool clipState; aRenderingContext.PopState(clipState); } return NS_OK; } @@ -858,18 +877,17 @@ nsTableRowFrame::ReflowChildren(nsIPresC // Reflow the child frame if (doReflowChild) { if (IS_TABLE_CELL(frameType)) { nsTableCellFrame* cellFrame = (nsTableCellFrame*)kidFrame; PRInt32 cellColIndex; cellFrame->GetColIndex(cellColIndex); cellColSpan = aTableFrame.GetEffectiveColSpan(*cellFrame); - - x += cellSpacingX; + // If the adjacent cell is in a prior row (because of a rowspan) add in the space if ((iter.IsLeftToRight() && (prevColIndex != (cellColIndex - 1))) || (!iter.IsLeftToRight() && (prevColIndex != cellColIndex + cellColSpan))) { x += GetSpaceBetween(prevColIndex, cellColIndex, cellColSpan, aTableFrame, cellSpacingX, iter.IsLeftToRight()); } // Calculate the available width for the table cell using the known column widths nscoord availColWidth, availCellWidth; @@ -1030,20 +1048,17 @@ nsTableRowFrame::ReflowChildren(nsIPresC } } else if (IS_TABLE_CELL(frameType)) { // we need to account for the cell's width even if it isn't reflowed x += kidFrame->GetSize().width; } ConsiderChildOverflow(aPresContext, aDesiredSize.mOverflowArea, kidFrame); kidFrame = iter.Next(); // Get the next child - // if this was the last child, and it had a colspan>1, add in the cellSpacing for the colspan - // if the last kid wasn't a colspan, then we still have the colspan of the last real cell - if (!kidFrame && (cellColSpan > 1)) - x += cellSpacingX; + x += cellSpacingX; } // just set our width to what was available. The table will calculate the width and not use our value. aDesiredSize.width = aReflowState.availableWidth; if (aReflowState.mFlags.mSpecialHeightReflow) { aDesiredSize.height = mRect.height; } @@ -1518,16 +1533,34 @@ nscoord nsTableRowFrame::GetUnpaginatedHeight(nsIPresContext* aPresContext) { // See if the property is set nscoord* value = (nscoord*)nsTableFrame::GetProperty(aPresContext, GetFirstInFlow(), nsLayoutAtoms::rowUnpaginatedHeightProperty); if (value) return *value; else return 0; +} + +void nsTableRowFrame::SetContinuousBCBorderWidth(PRUint8 aForSide, + nscoord aPixelValue) +{ + switch (aForSide) { + case NS_SIDE_RIGHT: + mRightContBorderWidth = aPixelValue; + return; + case NS_SIDE_TOP: + mTopContBorderWidth = aPixelValue; + return; + case NS_SIDE_LEFT: + mLeftContBorderWidth = aPixelValue; + return; + default: + NS_ERROR("invalid NS_SIDE arg"); + } } /* ----- global methods ----- */ nsresult NS_NewTableRowFrame(nsIPresShell* aPresShell, nsIFrame** aNewFrame) { NS_PRECONDITION(aNewFrame, "null OUT ptr"); Index: mozilla/layout/html/table/src/nsTableColGroupFrame.h =================================================================== RCS file: /cvsroot/mozilla/layout/html/table/src/nsTableColGroupFrame.h,v retrieving revision 3.55 diff -p -u -8 -r3.55 nsTableColGroupFrame.h --- mozilla/layout/html/table/src/nsTableColGroupFrame.h 18 Jan 2004 10:28:33 -0000 3.55 +++ mozilla/layout/html/table/src/nsTableColGroupFrame.h 11 Feb 2004 03:09:01 -0000 @@ -35,19 +35,19 @@ * * ***** END LICENSE BLOCK ***** */ #ifndef nsTableColGroupFrame_h__ #define nsTableColGroupFrame_h__ #include "nscore.h" #include "nsHTMLContainerFrame.h" #include "nsTableColFrame.h" +#include "nsTablePainter.h" class nsTableColFrame; -class nsTableFrame; enum nsTableColGroupType { eColGroupContent = 0, // there is real col group content associated eColGroupAnonymousCol = 1, // the result of a col eColGroupAnonymousCell = 2 // the result of a cell alone }; /** @@ -175,16 +175,31 @@ public: void DeleteColFrame(nsIPresContext* aPresContext, nsTableColFrame* aColFrame); nsFrameList& GetChildList(); static void ResetColIndices(nsIFrame* aFirstColGroup, PRInt32 aFirstColIndex, nsIFrame* aStartColFrame = nsnull); + + /** + * Gets inner border widths before collapsing with cell borders + * Caller must get left border from previous column + * GetContinuousBCBorderWidth will not overwrite aBorder.left + * see nsTablePainter about continuous borders + */ + void GetContinuousBCBorderWidth(float aPixelsToTwips, + nsMargin& aBorder); + /** + * Set full border widths before collapsing with cell borders + * @param aForSide - side to set; only accepts top and bottom + */ + void SetContinuousBCBorderWidth(PRUint8 aForSide, + nscoord aPixelValue); protected: nsTableColGroupFrame(); void InsertColsReflow(nsIPresContext& aPresContext, nsIPresShell& aPresShell, PRInt32 aColIndex, nsIFrame* aFirstFrame, nsIFrame* aLastFrame = nsnull); @@ -213,16 +228,20 @@ protected: const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus, nsIFrame * aNextFrame); // data members PRInt32 mColCount; // the starting column index this col group represents. Must be >= 0. PRInt32 mStartColIndex; + + // border width in pixels + PRUint8 mTopContBorderWidth; + PRUint8 mBottomContBorderWidth; }; inline nsTableColGroupFrame::nsTableColGroupFrame() : mColCount(0), mStartColIndex(0) { SetColType(eColGroupContent); } Index: mozilla/layout/html/table/src/nsTableColGroupFrame.cpp =================================================================== RCS file: /cvsroot/mozilla/layout/html/table/src/nsTableColGroupFrame.cpp,v retrieving revision 3.133 diff -p -u -8 -r3.133 nsTableColGroupFrame.cpp --- mozilla/layout/html/table/src/nsTableColGroupFrame.cpp 18 Jan 2004 10:42:52 -0000 3.133 +++ mozilla/layout/html/table/src/nsTableColGroupFrame.cpp 11 Feb 2004 03:09:02 -0000 @@ -386,18 +386,16 @@ nsTableColGroupFrame::Paint(nsIPresConte nsFramePaintLayer aWhichLayer, PRUint32 aFlags) { PRBool isVisible; if (NS_SUCCEEDED(IsVisibleForPainting(aPresContext, aRenderingContext, PR_FALSE, &isVisible)) && !isVisible) { return NS_OK; } - // Standards mode background painting removed. See bug 4510 - PaintChildren(aPresContext, aRenderingContext, aDirtyRect, aWhichLayer); return NS_OK; } PRIntn nsTableColGroupFrame::GetSkipSides() const { PRIntn skip = 0; @@ -639,16 +637,48 @@ PRInt32 nsTableColGroupFrame::SetStartCo result = GetColCount(); } return result; } void nsTableColGroupFrame::DeleteColFrame(nsIPresContext* aPresContext, nsTableColFrame* aColFrame) { mFrames.DestroyFrame(aPresContext, aColFrame); +} + + +void nsTableColGroupFrame::SetContinuousBCBorderWidth(PRUint8 aForSide, + nscoord aPixelValue) +{ + switch (aForSide) { + case NS_SIDE_TOP: + mTopContBorderWidth = aPixelValue; + return; + case NS_SIDE_BOTTOM: + mBottomContBorderWidth = aPixelValue; + return; + default: + NS_ERROR("invalid side arg"); + } +} + +void nsTableColGroupFrame::GetContinuousBCBorderWidth(float aPixelsToTwips, + nsMargin& aBorder) +{ + nscoord left = aBorder.left; + nsTableFrame* table; + nsTableFrame::GetTableFrame(this, table); + nsTableColFrame* col = table->GetColFrame(mStartColIndex + mColCount - 1); + col->GetContinuousBCBorderWidth(aPixelsToTwips, aBorder); + aBorder.top = BC_BORDER_BOTTOM_HALF_COORD(aPixelsToTwips, + mTopContBorderWidth); + aBorder.bottom = BC_BORDER_TOP_HALF_COORD(aPixelsToTwips, + mBottomContBorderWidth); + aBorder.left = left; + return; } /* ----- global methods ----- */ nsresult NS_NewTableColGroupFrame(nsIPresShell* aPresShell, nsIFrame** aNewFrame) { NS_PRECONDITION(aNewFrame, "null OUT ptr"); Index: mozilla/layout/html/table/src/nsTableColFrame.h =================================================================== RCS file: /cvsroot/mozilla/layout/html/table/src/nsTableColFrame.h,v retrieving revision 3.50 diff -p -u -8 -r3.50 nsTableColFrame.h --- mozilla/layout/html/table/src/nsTableColFrame.h 31 Oct 2003 20:19:15 -0000 3.50 +++ mozilla/layout/html/table/src/nsTableColFrame.h 11 Feb 2004 03:09:02 -0000 @@ -34,16 +34,17 @@ * the terms of any one of the NPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ #ifndef nsTableColFrame_h__ #define nsTableColFrame_h__ #include "nscore.h" #include "nsContainerFrame.h" +#include "nsTablePainter.h" class nsVoidArray; class nsTableCellFrame; // this is used to index arrays of widths in nsColFrame and to group important widths // for calculations. It is important that the order: min, desired, fixed be maintained // for each category (con, adj). #define WIDTH_NOT_SET -1 @@ -165,27 +166,49 @@ public: void ResetSizingInfo(); nscoord GetLeftBorderWidth(float* aPixelsToTwips = nsnull); void SetLeftBorderWidth(nscoord aWidth); nscoord GetRightBorderWidth(float* aPixelsToTwips = nsnull); void SetRightBorderWidth(nscoord aWidth); + /** + * Gets inner border widths before collapsing with cell borders + * Caller must get left border from previous column or from table + * GetContinuousBCBorderWidth will not overwrite aBorder.left + * see nsTablePainter about continuous borders + * + * @return outer bottom border width (left inner for next column) + */ + nscoord GetContinuousBCBorderWidth(float aPixelsToTwips, + nsMargin& aBorder); + /** + * Set full border widths before collapsing with cell borders + * @param aForSide - side to set; only valid for top, right, and bottom + */ + void SetContinuousBCBorderWidth(PRUint8 aForSide, + nscoord aPixelValue); + void Dump(PRInt32 aIndent); protected: nsTableColFrame(); ~nsTableColFrame(); // the starting index of the column (starting at 0) that this col object represents // PRUint32 mColIndex: 16; - PRUint32 mLeftBorderWidth: 8; // stored as pixels - PRUint32 mRightBorderWidth: 8; // stored as pixels + + // border width in pixels + PRUint8 mLeftBorderWidth; + PRUint8 mRightBorderWidth; + PRUint8 mTopContBorderWidth; + PRUint8 mRightContBorderWidth; + PRUint8 mBottomContBorderWidth; // Widths including MIN_CON, DES_CON, FIX_CON, MIN_ADJ, DES_ADJ, FIX_ADJ, PCT, PCT_ADJ, MIN_PRO, FINAL // Widths including MIN_CON, DES_CON, FIX_CON, MIN_ADJ, DES_ADJ, FIX_ADJ, PCT, PCT_ADJ, MIN_PRO, FINAL // XXX these could be stored as pixels and converted to twips for a savings of 10 x 2 bytes. nscoord mWidths[NUM_WIDTHS]; }; inline PRInt32 nsTableColFrame::GetColIndex() const { @@ -212,12 +235,25 @@ inline nscoord nsTableColFrame::GetRight { nscoord width = (aPixelsToTwips) ? NSToCoordRound(*aPixelsToTwips * mRightBorderWidth) : mRightBorderWidth; return width; } inline void nsTableColFrame::SetRightBorderWidth(nscoord aWidth) { mRightBorderWidth = aWidth; +} + +inline nscoord +nsTableColFrame::GetContinuousBCBorderWidth(float aPixelsToTwips, + nsMargin& aBorder) +{ + aBorder.top = BC_BORDER_BOTTOM_HALF_COORD(aPixelsToTwips, + mTopContBorderWidth); + aBorder.right = BC_BORDER_LEFT_HALF_COORD(aPixelsToTwips, + mRightContBorderWidth); + aBorder.bottom = BC_BORDER_TOP_HALF_COORD(aPixelsToTwips, + mBottomContBorderWidth); + return BC_BORDER_RIGHT_HALF_COORD(aPixelsToTwips, mRightContBorderWidth); } #endif Index: mozilla/layout/html/table/src/nsTableColFrame.cpp =================================================================== RCS file: /cvsroot/mozilla/layout/html/table/src/nsTableColFrame.cpp,v retrieving revision 3.76 diff -p -u -8 -r3.76 nsTableColFrame.cpp --- mozilla/layout/html/table/src/nsTableColFrame.cpp 24 Nov 2003 19:46:25 -0000 3.76 +++ mozilla/layout/html/table/src/nsTableColFrame.cpp 11 Feb 2004 03:09:02 -0000 @@ -113,16 +113,34 @@ nsStyleCoord nsTableColFrame::GetStyleWi } nsStyleCoord returnWidth; returnWidth.mUnit = styleWidth.mUnit; returnWidth.mValue = styleWidth.mValue; return returnWidth; } +void nsTableColFrame::SetContinuousBCBorderWidth(PRUint8 aForSide, + nscoord aPixelValue) +{ + switch (aForSide) { + case NS_SIDE_TOP: + mTopContBorderWidth = aPixelValue; + return; + case NS_SIDE_RIGHT: + mRightContBorderWidth = aPixelValue; + return; + case NS_SIDE_BOTTOM: + mBottomContBorderWidth = aPixelValue; + return; + default: + NS_ERROR("invalid side arg"); + } +} + void nsTableColFrame::ResetSizingInfo() { memset(mWidths, WIDTH_NOT_SET, NUM_WIDTHS * sizeof(PRInt32)); SetConstraint(eNoConstraint); } NS_METHOD nsTableColFrame::Paint(nsIPresContext* aPresContext, @@ -130,18 +148,16 @@ nsTableColFrame::Paint(nsIPresContext* const nsRect& aDirtyRect, nsFramePaintLayer aWhichLayer, PRUint32 aFlags) { PRBool isVisible; if (NS_SUCCEEDED(IsVisibleForPainting(aPresContext, aRenderingContext, PR_FALSE, &isVisible)) && !isVisible) { return NS_OK; } - - // Standards mode background painting removed. See bug 4510 return NS_OK; } // override, since we want to act like a block NS_IMETHODIMP nsTableColFrame::GetFrameForPoint(nsIPresContext* aPresContext, const nsPoint& aPoint, Index: mozilla/layout/html/table/src/nsTableCellFrame.h =================================================================== RCS file: /cvsroot/mozilla/layout/html/table/src/nsTableCellFrame.h,v retrieving revision 3.129 diff -p -u -8 -r3.129 nsTableCellFrame.h --- mozilla/layout/html/table/src/nsTableCellFrame.h 31 Oct 2003 20:19:15 -0000 3.129 +++ mozilla/layout/html/table/src/nsTableCellFrame.h 11 Feb 2004 03:09:03 -0000 @@ -284,25 +284,22 @@ private: // All these methods are support methods for RecalcLayoutData nsIFrame* GetFrameAt(nsVoidArray* aList, PRInt32 aIndex); protected: friend class nsTableRowFrame; - // paint backgrounds and borders (in separate border model) if aVisibleBackground, always set aPaintChildren virtual void PaintUnderlay(nsIPresContext& aPresContext, nsIRenderingContext& aRenderingContext, const nsRect& aDirtyRect, PRUint32& aFlags, - const nsStyleTableBorder& aCellTableStyle, const nsStyleBorder& aStyleBorder, const nsStylePadding& aStylePadding, - PRBool aVisibleBackground, PRBool& aPaintChildren); PRBool ConvertToPixelValue(nsHTMLValue& aValue, PRInt32 aDefault, PRInt32& aResult); nsresult DecorateForSelection(nsIPresContext* aPresContext, nsIRenderingContext& aRenderingContext, const nsStyleBackground* aStyleColor); protected: @@ -467,20 +464,18 @@ public: #endif protected: virtual void PaintUnderlay(nsIPresContext& aPresContext, nsIRenderingContext& aRenderingContext, const nsRect& aDirtyRect, PRUint32& aFlags, - const nsStyleTableBorder& aCellTableStyle, const nsStyleBorder& aStyleBorder, const nsStylePadding& aStylePadding, - PRBool aVisibleBackground, PRBool& aPaintChildren); private: PRUint32 mTopBorder: 8; PRUint32 mRightBorder: 8; PRUint32 mBottomBorder: 8; PRUint32 mLeftBorder: 8; Index: mozilla/layout/html/table/src/nsTableCellFrame.cpp =================================================================== RCS file: /cvsroot/mozilla/layout/html/table/src/nsTableCellFrame.cpp,v retrieving revision 3.321 diff -p -u -8 -r3.321 nsTableCellFrame.cpp --- mozilla/layout/html/table/src/nsTableCellFrame.cpp 21 Jan 2004 09:35:57 -0000 3.321 +++ mozilla/layout/html/table/src/nsTableCellFrame.cpp 11 Feb 2004 03:09:04 -0000 @@ -35,16 +35,17 @@ * the terms of any one of the NPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ #include "nsTableFrame.h" #include "nsTableColFrame.h" #include "nsTableCellFrame.h" #include "nsTableFrame.h" #include "nsTableRowGroupFrame.h" +#include "nsTablePainter.h" #include "nsReflowPath.h" #include "nsStyleContext.h" #include "nsStyleConsts.h" #include "nsIPresContext.h" #include "nsIRenderingContext.h" #include "nsCSSRendering.h" #include "nsIContent.h" #include "nsIHTMLContent.h" @@ -376,75 +377,65 @@ nsTableCellFrame::DecorateForSelection(n return NS_OK; } void nsTableCellFrame::PaintUnderlay(nsIPresContext& aPresContext, nsIRenderingContext& aRenderingContext, const nsRect& aDirtyRect, PRUint32& aFlags, - const nsStyleTableBorder& aCellTableStyle, const nsStyleBorder& aStyleBorder, const nsStylePadding& aStylePadding, - PRBool aVisibleBackground, PRBool& aPaintChildren) { - if (aVisibleBackground) { - nsRect rect(0, 0, mRect.width, mRect.height); - nsCSSRendering::PaintBackground(&aPresContext, aRenderingContext, this, - aDirtyRect, rect, aStyleBorder, aStylePadding, - PR_TRUE); - // draw the border only when there is content or showing empty cells - if (!GetContentEmpty() || NS_STYLE_TABLE_EMPTY_CELLS_SHOW == aCellTableStyle.mEmptyCells) { - PRIntn skipSides = GetSkipSides(); - nsCSSRendering::PaintBorder(&aPresContext, aRenderingContext, this, - aDirtyRect, rect, aStyleBorder, mStyleContext, skipSides); - } - } + nsRect rect(0, 0, mRect.width, mRect.height); + nsCSSRendering::PaintBackground(&aPresContext, aRenderingContext, this, + aDirtyRect, rect, aStyleBorder, aStylePadding, + PR_TRUE); + PRIntn skipSides = GetSkipSides(); + nsCSSRendering::PaintBorder(&aPresContext, aRenderingContext, this, + aDirtyRect, rect, aStyleBorder, mStyleContext, skipSides); // tell Paint to paint the children aPaintChildren = PR_TRUE; } -NS_METHOD +NS_METHOD nsTableCellFrame::Paint(nsIPresContext* aPresContext, nsIRenderingContext& aRenderingContext, const nsRect& aDirtyRect, nsFramePaintLayer aWhichLayer, PRUint32 aFlags) { NS_ENSURE_TRUE(aPresContext, NS_ERROR_NULL_POINTER); PRBool isVisible; if (NS_SUCCEEDED(IsVisibleForPainting(aPresContext, aRenderingContext, PR_FALSE, &isVisible)) && !isVisible) { return NS_OK; } - PRBool paintChildren = PR_TRUE; + PRBool paintChildren = PR_TRUE; if (NS_FRAME_PAINT_LAYER_BACKGROUND == aWhichLayer) { - PRBool paintBackground = PR_FALSE; const nsStyleBorder* myBorder = nsnull; const nsStylePadding* myPadding = nsnull; const nsStyleTableBorder* cellTableStyle = nsnull; const nsStyleVisibility* vis = GetStyleVisibility(); if (vis->IsVisible()) { myBorder = GetStyleBorder(); myPadding = GetStylePadding(); cellTableStyle = GetStyleTableBorder(); - // paint the background when the cell is not empty or when showing empty cells or background - paintBackground = (!GetContentEmpty() || - NS_STYLE_TABLE_EMPTY_CELLS_SHOW == cellTableStyle->mEmptyCells || - NS_STYLE_TABLE_EMPTY_CELLS_SHOW_BACKGROUND == cellTableStyle->mEmptyCells); - } - - PaintUnderlay(*aPresContext, aRenderingContext, aDirtyRect, aFlags, *cellTableStyle, - *myBorder, *myPadding, paintBackground, paintChildren); + // draw the border & background only when there is content or showing empty cells + if (!GetContentEmpty() || NS_STYLE_TABLE_EMPTY_CELLS_SHOW == cellTableStyle->mEmptyCells) { + PaintUnderlay(*aPresContext, aRenderingContext, aDirtyRect, aFlags, + *myBorder, *myPadding, paintChildren); + } + //flags were for us; remove them for our children + aFlags &= ~ (NS_PAINT_FLAG_TABLE_CELL_BG_PASS | NS_PAINT_FLAG_TABLE_BG_PAINT); - if (vis->IsVisible()) { const nsStyleBackground* myColor = GetStyleBackground(); DecorateForSelection(aPresContext, aRenderingContext,myColor); //ignore return value } } #ifdef DEBUG // for debug... if ((NS_FRAME_PAINT_LAYER_DEBUG == aWhichLayer) && GetShowFrameBorders()) { @@ -1347,24 +1338,24 @@ nsBCTableCellFrame::SetBorderWidth(PRUin } } void nsBCTableCellFrame::PaintUnderlay(nsIPresContext& aPresContext, nsIRenderingContext& aRenderingContext, const nsRect& aDirtyRect, PRUint32& aFlags, - const nsStyleTableBorder& aCellTableStyle, const nsStyleBorder& aStyleBorder, const nsStylePadding& aStylePadding, - PRBool aVisibleBackground, PRBool& aPaintChildren) { - // Draw the background only during pass1. - if (aVisibleBackground && !(aFlags & BORDER_COLLAPSE_BACKGROUNDS)) { + if (!(aFlags & NS_PAINT_FLAG_TABLE_BG_PAINT) + /*table cell background only pass*/ || + (aFlags & NS_PAINT_FLAG_TABLE_CELL_BG_PASS) + /*direct call; not table-based paint*/ ) { // make border-width reflect border-collapse assigned border GET_PIXELS_TO_TWIPS(&aPresContext, p2t); nsMargin borderWidth; GetBorderWidth(p2t, borderWidth); nsStyleBorder myBorder = aStyleBorder; nsStyleCoord coord(borderWidth.top); @@ -1379,11 +1370,10 @@ nsBCTableCellFrame::PaintUnderlay(nsIPre nsRect rect(0, 0, mRect.width, mRect.height); nsCSSRendering::PaintBackground(&aPresContext, aRenderingContext, this, aDirtyRect, rect, myBorder, aStylePadding, PR_TRUE); // borders are painted by nsTableFrame } - // don't paint the children if it's pass1 - aPaintChildren = (aFlags & BORDER_COLLAPSE_BACKGROUNDS); + aPaintChildren = !(aFlags & NS_PAINT_FLAG_TABLE_CELL_BG_PASS); } Index: mozilla/layout/html/table/src/nsCellMap.cpp =================================================================== RCS file: /cvsroot/mozilla/layout/html/table/src/nsCellMap.cpp,v retrieving revision 3.84 diff -p -u -8 -r3.84 nsCellMap.cpp --- mozilla/layout/html/table/src/nsCellMap.cpp 18 Jan 2004 10:28:32 -0000 3.84 +++ mozilla/layout/html/table/src/nsCellMap.cpp 11 Feb 2004 03:09:06 -0000 @@ -83,21 +83,21 @@ nsTableCellMap::nsTableCellMap(nsTableFr MOZ_COUNT_CTOR(nsTableCellMap); nsAutoVoidArray orderedRowGroups; PRUint32 numRowGroups; aTableFrame.OrderRowGroups(orderedRowGroups, numRowGroups); NS_ASSERTION(orderedRowGroups.Count() == (PRInt32) numRowGroups,"problem in OrderRowGroups"); for (PRUint32 rgX = 0; rgX < numRowGroups; rgX++) { - nsTableRowGroupFrame* rgFrame = - aTableFrame.GetRowGroupFrame((nsIFrame*)orderedRowGroups.ElementAt(rgX)); + nsTableRowGroupFrame* rgFrame = + nsTableFrame::GetRowGroupFrame((nsIFrame*)orderedRowGroups.ElementAt(rgX)); if (rgFrame) { - nsTableRowGroupFrame* prior = (0 == rgX) - ? nsnull : aTableFrame.GetRowGroupFrame((nsIFrame*)orderedRowGroups.ElementAt(rgX - 1)); + nsTableRowGroupFrame* prior = (0 == rgX) + ? nsnull : nsTableFrame::GetRowGroupFrame((nsIFrame*)orderedRowGroups.ElementAt(rgX - 1)); InsertGroupCellMap(*rgFrame, prior); } } if (aBorderCollapse) { mBCInfo = new BCInfo(); } } Index: mozilla/layout/html/table/src/Makefile.in =================================================================== RCS file: /cvsroot/mozilla/layout/html/table/src/Makefile.in,v retrieving revision 1.31 diff -p -u -8 -r1.31 Makefile.in --- mozilla/layout/html/table/src/Makefile.in 28 Jan 2004 00:18:19 -0000 1.31 +++ mozilla/layout/html/table/src/Makefile.in 11 Feb 2004 03:09:06 -0000 @@ -47,16 +47,17 @@ CPPSRCS = \ nsCellMap.cpp \ nsTableCellFrame.cpp \ nsTableColFrame.cpp \ nsTableColGroupFrame.cpp \ nsTableFrame.cpp \ nsTableOuterFrame.cpp \ nsTableRowFrame.cpp \ nsTableRowGroupFrame.cpp \ + nsTablePainter.cpp \ $(NULL) # we don't want the shared lib, but we want to force the creation of a static lib. FORCE_STATIC_LIB = 1 include $(topsrcdir)/config/rules.mk DEFINES += -DDEBUG_TABLE_REFLOW_TIMING_off -DDEBUG_TABLE_STRATEGY_off -D_IMPL_NS_LAYOUT