From 425e04d23f23789a636ead05213022b1ecba7100 Mon Sep 17 00:00:00 2001 From: "L. David Baron" Date: Fri, 12 Sep 2008 20:45:37 -0700 Subject: [PATCH] Fix use of incorrect variable, and harmless but valgrind-noisy use of variables in incorrect order. (Bug 455093) --- layout/style/nsHTMLStyleSheet.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/layout/style/nsHTMLStyleSheet.cpp b/layout/style/nsHTMLStyleSheet.cpp index 5fc5c07450e9..f385db58f118 100644 --- a/layout/style/nsHTMLStyleSheet.cpp +++ b/layout/style/nsHTMLStyleSheet.cpp @@ -189,11 +189,12 @@ ProcessTableRulesAttribute(void* aStyleStruct, nscolor borderColor; PRBool foreground; borderData->GetBorderColor(aSide, borderColor, foreground); - if (NS_GET_A(borderColor) == 0 || foreground) { + if (foreground || NS_GET_A(borderColor) == 0) { // use the table's border color if it is set, otherwise use black nscolor tableBorderColor; tableBorderData->GetBorderColor(aSide, tableBorderColor, foreground); - borderColor = (NS_GET_A(borderColor) == 0 || foreground) ? NS_RGB(0,0,0) : tableBorderColor; + borderColor = (foreground || NS_GET_A(tableBorderColor) == 0) + ? NS_RGB(0,0,0) : tableBorderColor; borderData->SetBorderColor(aSide, borderColor); } // set the border width to be 1 pixel