From 91804a7b1db15c6fe6cd9533850d664bab8194ee Mon Sep 17 00:00:00 2001 From: "buster%netscape.com" Date: Wed, 9 Dec 1998 06:24:50 +0000 Subject: [PATCH] added implementation for CSS-2 style attributes border-collapse, border-spacing, empty-cells, caption-side git-svn-id: svn://10.0.0.236/trunk@16035 18797224-902f-48f8-a5cc-f745e15eee43 --- .../content/html/style/src/nsCSSStyleRule.cpp | 22 +++++++++---------- .../layout/html/style/src/nsCSSStyleRule.cpp | 22 +++++++++---------- mozilla/layout/style/nsCSSStyleRule.cpp | 22 +++++++++---------- 3 files changed, 30 insertions(+), 36 deletions(-) diff --git a/mozilla/content/html/style/src/nsCSSStyleRule.cpp b/mozilla/content/html/style/src/nsCSSStyleRule.cpp index 20da4ee6fad..e612fcfdce4 100644 --- a/mozilla/content/html/style/src/nsCSSStyleRule.cpp +++ b/mozilla/content/html/style/src/nsCSSStyleRule.cpp @@ -1633,46 +1633,44 @@ void MapDeclarationInto(nsICSSDeclaration* aDeclaration, } nsStyleCoord coord; -#if 0 // border-collapse: enum, inherit if (eCSSUnit_Enumerated == ourTable->mBorderCollapse.GetUnit()) { - table->m = ourTable->mBorderCollapse.GetIntValue(); + table->mBorderCollapse = ourTable->mBorderCollapse.GetIntValue(); } else if (eCSSUnit_Inherit == ourTable->mBorderCollapse.GetUnit()) { - table->m = parentTable->m; + table->mBorderCollapse = parentTable->mBorderCollapse; } // border-spacing-x: length, inherit if (SetCoord(ourTable->mBorderSpacingX, coord, SETCOORD_LENGTH, font, aPresContext)) { - table->m = coord.GetCoordValue(); + table->mBorderSpacingX = coord.GetCoordValue(); } else if (eCSSUnit_Inherit == ourTable->mBorderSpacingX.GetUnit()) { - table->m = parentTable->m; + table->mBorderSpacingX = parentTable->mBorderSpacingX; } // border-spacing-y: length, inherit if (SetCoord(ourTable->mBorderSpacingY, coord, SETCOORD_LENGTH, font, aPresContext)) { - table->m = coord.GetCoordValue(); + table->mBorderSpacingY = coord.GetCoordValue(); } else if (eCSSUnit_Inherit == ourTable->mBorderSpacingY.GetUnit()) { - table->m = parentTable->m; + table->mBorderSpacingY = parentTable->mBorderSpacingY; } // caption-side: enum, inherit if (eCSSUnit_Enumerated == ourTable->mCaptionSide.GetUnit()) { - table->m = ourTable->mCaptionSide.GetIntValue(); + table->mCaptionSide = ourTable->mCaptionSide.GetIntValue(); } else if (eCSSUnit_Inherit == ourTable->mCaptionSide.GetUnit()) { - table->m = parentTable->m; + table->mCaptionSide = parentTable->mCaptionSide; } // empty-cells: enum, inherit if (eCSSUnit_Enumerated == ourTable->mEmptyCells.GetUnit()) { - table->m = ourTable->mEmptyCells.GetIntValue(); + table->mEmptyCells = ourTable->mEmptyCells.GetIntValue(); } else if (eCSSUnit_Inherit == ourTable->mEmptyCells.GetUnit()) { - table->m = parentTable->m; + table->mEmptyCells = parentTable->mEmptyCells; } -#endif // table-layout: auto, enum, inherit if (eCSSUnit_Enumerated == ourTable->mLayout.GetUnit()) { diff --git a/mozilla/layout/html/style/src/nsCSSStyleRule.cpp b/mozilla/layout/html/style/src/nsCSSStyleRule.cpp index 20da4ee6fad..e612fcfdce4 100644 --- a/mozilla/layout/html/style/src/nsCSSStyleRule.cpp +++ b/mozilla/layout/html/style/src/nsCSSStyleRule.cpp @@ -1633,46 +1633,44 @@ void MapDeclarationInto(nsICSSDeclaration* aDeclaration, } nsStyleCoord coord; -#if 0 // border-collapse: enum, inherit if (eCSSUnit_Enumerated == ourTable->mBorderCollapse.GetUnit()) { - table->m = ourTable->mBorderCollapse.GetIntValue(); + table->mBorderCollapse = ourTable->mBorderCollapse.GetIntValue(); } else if (eCSSUnit_Inherit == ourTable->mBorderCollapse.GetUnit()) { - table->m = parentTable->m; + table->mBorderCollapse = parentTable->mBorderCollapse; } // border-spacing-x: length, inherit if (SetCoord(ourTable->mBorderSpacingX, coord, SETCOORD_LENGTH, font, aPresContext)) { - table->m = coord.GetCoordValue(); + table->mBorderSpacingX = coord.GetCoordValue(); } else if (eCSSUnit_Inherit == ourTable->mBorderSpacingX.GetUnit()) { - table->m = parentTable->m; + table->mBorderSpacingX = parentTable->mBorderSpacingX; } // border-spacing-y: length, inherit if (SetCoord(ourTable->mBorderSpacingY, coord, SETCOORD_LENGTH, font, aPresContext)) { - table->m = coord.GetCoordValue(); + table->mBorderSpacingY = coord.GetCoordValue(); } else if (eCSSUnit_Inherit == ourTable->mBorderSpacingY.GetUnit()) { - table->m = parentTable->m; + table->mBorderSpacingY = parentTable->mBorderSpacingY; } // caption-side: enum, inherit if (eCSSUnit_Enumerated == ourTable->mCaptionSide.GetUnit()) { - table->m = ourTable->mCaptionSide.GetIntValue(); + table->mCaptionSide = ourTable->mCaptionSide.GetIntValue(); } else if (eCSSUnit_Inherit == ourTable->mCaptionSide.GetUnit()) { - table->m = parentTable->m; + table->mCaptionSide = parentTable->mCaptionSide; } // empty-cells: enum, inherit if (eCSSUnit_Enumerated == ourTable->mEmptyCells.GetUnit()) { - table->m = ourTable->mEmptyCells.GetIntValue(); + table->mEmptyCells = ourTable->mEmptyCells.GetIntValue(); } else if (eCSSUnit_Inherit == ourTable->mEmptyCells.GetUnit()) { - table->m = parentTable->m; + table->mEmptyCells = parentTable->mEmptyCells; } -#endif // table-layout: auto, enum, inherit if (eCSSUnit_Enumerated == ourTable->mLayout.GetUnit()) { diff --git a/mozilla/layout/style/nsCSSStyleRule.cpp b/mozilla/layout/style/nsCSSStyleRule.cpp index 20da4ee6fad..e612fcfdce4 100644 --- a/mozilla/layout/style/nsCSSStyleRule.cpp +++ b/mozilla/layout/style/nsCSSStyleRule.cpp @@ -1633,46 +1633,44 @@ void MapDeclarationInto(nsICSSDeclaration* aDeclaration, } nsStyleCoord coord; -#if 0 // border-collapse: enum, inherit if (eCSSUnit_Enumerated == ourTable->mBorderCollapse.GetUnit()) { - table->m = ourTable->mBorderCollapse.GetIntValue(); + table->mBorderCollapse = ourTable->mBorderCollapse.GetIntValue(); } else if (eCSSUnit_Inherit == ourTable->mBorderCollapse.GetUnit()) { - table->m = parentTable->m; + table->mBorderCollapse = parentTable->mBorderCollapse; } // border-spacing-x: length, inherit if (SetCoord(ourTable->mBorderSpacingX, coord, SETCOORD_LENGTH, font, aPresContext)) { - table->m = coord.GetCoordValue(); + table->mBorderSpacingX = coord.GetCoordValue(); } else if (eCSSUnit_Inherit == ourTable->mBorderSpacingX.GetUnit()) { - table->m = parentTable->m; + table->mBorderSpacingX = parentTable->mBorderSpacingX; } // border-spacing-y: length, inherit if (SetCoord(ourTable->mBorderSpacingY, coord, SETCOORD_LENGTH, font, aPresContext)) { - table->m = coord.GetCoordValue(); + table->mBorderSpacingY = coord.GetCoordValue(); } else if (eCSSUnit_Inherit == ourTable->mBorderSpacingY.GetUnit()) { - table->m = parentTable->m; + table->mBorderSpacingY = parentTable->mBorderSpacingY; } // caption-side: enum, inherit if (eCSSUnit_Enumerated == ourTable->mCaptionSide.GetUnit()) { - table->m = ourTable->mCaptionSide.GetIntValue(); + table->mCaptionSide = ourTable->mCaptionSide.GetIntValue(); } else if (eCSSUnit_Inherit == ourTable->mCaptionSide.GetUnit()) { - table->m = parentTable->m; + table->mCaptionSide = parentTable->mCaptionSide; } // empty-cells: enum, inherit if (eCSSUnit_Enumerated == ourTable->mEmptyCells.GetUnit()) { - table->m = ourTable->mEmptyCells.GetIntValue(); + table->mEmptyCells = ourTable->mEmptyCells.GetIntValue(); } else if (eCSSUnit_Inherit == ourTable->mEmptyCells.GetUnit()) { - table->m = parentTable->m; + table->mEmptyCells = parentTable->mEmptyCells; } -#endif // table-layout: auto, enum, inherit if (eCSSUnit_Enumerated == ourTable->mLayout.GetUnit()) {