added implementation for CSS-2 style attributes border-collapse, border-spacing, empty-cells, caption-side

this is sufficient for now, but incomplete.  It doesn't handle inherit properly.
This commit is contained in:
buster%netscape.com 1998-12-09 06:24:27 +00:00
Родитель 3d1f08ff79
Коммит a8d87b8305
6 изменённых файлов: 36 добавлений и 8 удалений

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

@ -661,9 +661,13 @@ void StyleTableImpl::ResetFrom(const nsStyleTable* aParent, nsIPresContext* aPre
mCols = NS_STYLE_TABLE_COLS_NONE;
mFrame = NS_STYLE_TABLE_FRAME_NONE;
mRules = NS_STYLE_TABLE_RULES_NONE;
mBorderCollapse = NS_STYLE_TABLE_BORDER_COLLAPSE_SEPARATE; //XXX: should inherit
mEmptyCells = NS_STYLE_TABLE_EMPTY_CELLS_HIDE; //XXX: should inherit
mCaptionSide = NS_SIDE_TOP; //XXX: should inherit
mCellPadding.Reset();
mCellSpacing.Reset();
mSpanWidth.Reset();
mBorderSpacingX.Reset(); //XXX: should inherit
mBorderSpacingY.Reset(); //XXX: should inherit
mSpanWidth.Reset(); //XXX: should inherit
mSpan=1;
}

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

@ -409,6 +409,12 @@
#define NS_STYLE_TABLE_EMPTY_CELLS_HIDE 0
#define NS_STYLE_TABLE_EMPTY_CELLS_SHOW 1
#define NS_STYLE_TABLE_BORDER_COLLAPSE_SEPARATE 0
#define NS_STYLE_TABLE_BORDER_COLLAPSE_COLLAPSE 1
// CAPTION_SIDE uses NS_SIDE_*
// constants for cell "scope" attribute
#define NS_STYLE_CELL_SCOPE_ROW 0
#define NS_STYLE_CELL_SCOPE_COL 1

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

@ -175,11 +175,15 @@ struct nsStyleTable: public nsStyleStruct {
PRUint8 mLayoutStrategy;// [reset] see nsStyleConsts.h NS_STYLE_TABLE_LAYOUT_*
PRUint8 mFrame; // [reset] see nsStyleConsts.h NS_STYLE_TABLE_FRAME_*
PRUint8 mRules; // [reset] see nsStyleConsts.h NS_STYLE_TABLE_RULES_*
PRUint8 mBorderCollapse;// [inherited] XXX: inherit not implemented
nsStyleCoord mBorderSpacingX;// [inherited] XXX: inherit not implemented
nsStyleCoord mBorderSpacingY;// [inherited] XXX: inherit not implemented
nsStyleCoord mCellPadding; // [reset]
nsStyleCoord mCellSpacing; // [reset]
PRUint8 mCaptionSide; // [inherited] XXX: inherit not implemented
PRUint8 mEmptyCells; // [inherited] XXX: inherit not implemented
PRInt32 mCols; // [reset] an integer if set, or see nsStyleConsts.h NS_STYLE_TABLE_COLS_*
nsStyleCoord mSpanWidth; // [reset] the amount of width this col gets from a spanning cell, if any
PRInt32 mSpan; // [reset] the number of columns spanned by a colgroup or col
nsStyleCoord mSpanWidth; // [reset] the amount of width this col gets from a spanning cell, if any
protected:
nsStyleTable(void);

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

@ -409,6 +409,12 @@
#define NS_STYLE_TABLE_EMPTY_CELLS_HIDE 0
#define NS_STYLE_TABLE_EMPTY_CELLS_SHOW 1
#define NS_STYLE_TABLE_BORDER_COLLAPSE_SEPARATE 0
#define NS_STYLE_TABLE_BORDER_COLLAPSE_COLLAPSE 1
// CAPTION_SIDE uses NS_SIDE_*
// constants for cell "scope" attribute
#define NS_STYLE_CELL_SCOPE_ROW 0
#define NS_STYLE_CELL_SCOPE_COL 1

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

@ -661,9 +661,13 @@ void StyleTableImpl::ResetFrom(const nsStyleTable* aParent, nsIPresContext* aPre
mCols = NS_STYLE_TABLE_COLS_NONE;
mFrame = NS_STYLE_TABLE_FRAME_NONE;
mRules = NS_STYLE_TABLE_RULES_NONE;
mBorderCollapse = NS_STYLE_TABLE_BORDER_COLLAPSE_SEPARATE; //XXX: should inherit
mEmptyCells = NS_STYLE_TABLE_EMPTY_CELLS_HIDE; //XXX: should inherit
mCaptionSide = NS_SIDE_TOP; //XXX: should inherit
mCellPadding.Reset();
mCellSpacing.Reset();
mSpanWidth.Reset();
mBorderSpacingX.Reset(); //XXX: should inherit
mBorderSpacingY.Reset(); //XXX: should inherit
mSpanWidth.Reset(); //XXX: should inherit
mSpan=1;
}

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

@ -661,9 +661,13 @@ void StyleTableImpl::ResetFrom(const nsStyleTable* aParent, nsIPresContext* aPre
mCols = NS_STYLE_TABLE_COLS_NONE;
mFrame = NS_STYLE_TABLE_FRAME_NONE;
mRules = NS_STYLE_TABLE_RULES_NONE;
mBorderCollapse = NS_STYLE_TABLE_BORDER_COLLAPSE_SEPARATE; //XXX: should inherit
mEmptyCells = NS_STYLE_TABLE_EMPTY_CELLS_HIDE; //XXX: should inherit
mCaptionSide = NS_SIDE_TOP; //XXX: should inherit
mCellPadding.Reset();
mCellSpacing.Reset();
mSpanWidth.Reset();
mBorderSpacingX.Reset(); //XXX: should inherit
mBorderSpacingY.Reset(); //XXX: should inherit
mSpanWidth.Reset(); //XXX: should inherit
mSpan=1;
}