CSS properties set to system colors were returning inconsistent values; b=172199, r=caillon, sr=peterv

git-svn-id: svn://10.0.0.236/trunk@133139 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
glazman%netscape.com
2002-11-06 08:31:19 +00:00
parent 0eaf84927e
commit ba5cb51bf5
4 changed files with 132 additions and 4 deletions

View File

@@ -4859,7 +4859,13 @@ PRBool nsCSSDeclaration::AppendValueToString(nsCSSProperty aProperty, const nsCS
else if (eCSSUnit_Integer == unit) {
switch (aProperty) {
case eCSSProperty_color:
case eCSSProperty_background_color: {
case eCSSProperty_background_color:
case eCSSProperty_border_top_color:
case eCSSProperty_border_bottom_color:
case eCSSProperty_border_left_color:
case eCSSProperty_border_right_color:
case eCSSProperty__moz_outline_color:
case eCSSProperty_text_shadow_color: {
// we can lookup the property in the ColorTable and then
// get a string mapping the name
nsAutoString tmpStr;
@@ -5378,6 +5384,32 @@ nsCSSDeclaration::GetValue(nsCSSProperty aProperty,
}
break;
}
case eCSSProperty_border_top_colors:
case eCSSProperty_border_right_colors:
case eCSSProperty_border_bottom_colors:
case eCSSProperty_border_left_colors: {
CSS_VARONSTACK_GET(Margin);
PRUint8 index;
switch (aProperty) {
case eCSSProperty_border_top_colors: index = 0; break;
case eCSSProperty_border_right_colors: index = 1; break;
case eCSSProperty_border_bottom_colors: index = 2; break;
case eCSSProperty_border_left_colors: index = 3; break;
CSS_BOGUS_DEFAULT; // make compiler happy
}
if ((nsnull != theMargin) && (nsnull != theMargin->mBorderColors) &&
(nsnull != theMargin->mBorderColors[index])) {
nsCSSValueList* borderSideColors = theMargin->mBorderColors[index];
do {
AppendValueToString(aProperty, borderSideColors->mValue, aValue);
borderSideColors = borderSideColors->mNext;
if (nsnull != borderSideColors) {
aValue.Append(PRUnichar(' '));
}
} while (nsnull != borderSideColors);
}
break;
}
default:
AppendValueToString(aProperty, aValue);
break;