From de5c74a5c813dd8c5f409ca6b48e33ce2e418b34 Mon Sep 17 00:00:00 2001 From: "attinasi%netscape.com" Date: Wed, 2 Feb 2000 01:15:04 +0000 Subject: [PATCH] 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 --- content/html/content/src/nsHTMLTableElement.cpp | 2 +- layout/html/content/src/nsHTMLTableElement.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/content/html/content/src/nsHTMLTableElement.cpp b/content/html/content/src/nsHTMLTableElement.cpp index 35b74089c2a..683a08d10a2 100644 --- a/content/html/content/src/nsHTMLTableElement.cpp +++ b/content/html/content/src/nsHTMLTableElement.cpp @@ -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); diff --git a/layout/html/content/src/nsHTMLTableElement.cpp b/layout/html/content/src/nsHTMLTableElement.cpp index 35b74089c2a..683a08d10a2 100644 --- a/layout/html/content/src/nsHTMLTableElement.cpp +++ b/layout/html/content/src/nsHTMLTableElement.cpp @@ -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);