Fix use of incorrect variable, and harmless but valgrind-noisy use of variables in incorrect order. (Bug 455093)

This commit is contained in:
L. David Baron 2008-09-12 20:45:37 -07:00
Родитель 405676cf4b
Коммит e41a414695
1 изменённых файлов: 3 добавлений и 2 удалений

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

@ -189,11 +189,12 @@ ProcessTableRulesAttribute(void* aStyleStruct,
nscolor borderColor; nscolor borderColor;
PRBool foreground; PRBool foreground;
borderData->GetBorderColor(aSide, borderColor, 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 // use the table's border color if it is set, otherwise use black
nscolor tableBorderColor; nscolor tableBorderColor;
tableBorderData->GetBorderColor(aSide, tableBorderColor, foreground); 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); borderData->SetBorderColor(aSide, borderColor);
} }
// set the border width to be 1 pixel // set the border width to be 1 pixel