Checking for border width > 0 before setting the border style to NS_STYLE_BORDER_STYLE_BG_INSET.

This fixes a bug where style changes were causing table cell borders to appear when previously there
were none. b=25425 r=karnaze
This commit is contained in:
attinasi%netscape.com 2000-02-02 01:15:04 +00:00
parent e2e7c63c10
commit 3dcb1df4fd
2 changed files with 2 additions and 2 deletions

View File

@ -1087,7 +1087,7 @@ MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
if (readDisplay && (readDisplay->mDisplay == NS_STYLE_DISPLAY_TABLE_CELL)) {
// set the cell's border from the table
aAttributes->GetAttribute(nsHTMLAtoms::border, value);
if ((value.GetUnit() == eHTMLUnit_Pixel) ||
if (((value.GetUnit() == eHTMLUnit_Pixel) && (value.GetPixelValue() > 0)) ||
(value.GetUnit() == eHTMLUnit_Empty)) {
float p2t;
aPresContext->GetPixelsToTwips(&p2t);

View File

@ -1087,7 +1087,7 @@ MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
if (readDisplay && (readDisplay->mDisplay == NS_STYLE_DISPLAY_TABLE_CELL)) {
// set the cell's border from the table
aAttributes->GetAttribute(nsHTMLAtoms::border, value);
if ((value.GetUnit() == eHTMLUnit_Pixel) ||
if (((value.GetUnit() == eHTMLUnit_Pixel) && (value.GetPixelValue() > 0)) ||
(value.GetUnit() == eHTMLUnit_Empty)) {
float p2t;
aPresContext->GetPixelsToTwips(&p2t);