Fixed problems with backgrounds when 'always use my colors' is set to true: backgrounds are now transparent instead of inherited. b=57234 r=dbaron, a=buster

This commit is contained in:
attinasi%netscape.com 2000-10-30 22:27:37 +00:00
Родитель 9ba87afb91
Коммит a9902c2506
2 изменённых файлов: 16 добавлений и 8 удалений

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

@ -1891,19 +1891,23 @@ nsresult PresShell::SetPrefColorRules(void)
// all (even author important) when put into an override stylesheet
///////////////////////////////////////////////////////////////
// - default color: '* {color:#RRGGBB !important;}'
// - default color: ':root {color:#RRGGBB !important;}'
ColorToString(textColor,strColor);
strRule.Append(NS_LITERAL_STRING("* {color:"));
strRule.Append(NS_LITERAL_STRING(":root {color:"));
strRule.Append(strColor);
strRule.Append(NS_LITERAL_STRING(" !important;} "));
///////////////////////////////////////////////////////////////
// - default background color: '* {background-color:#RRGGBB !important;}'
// - default background color: ':root {background:#RRGGBB !important;}'
ColorToString(bgColor,strColor);
strRule.Append(NS_LITERAL_STRING("* {background-color:"));
strRule.Append(NS_LITERAL_STRING(":root {background:"));
strRule.Append(strColor);
strRule.Append(NS_LITERAL_STRING(" !important;} "));
///////////////////////////////////////////////////////////////
// - everything else inherits the color, and has transparent background
strRule.Append(NS_LITERAL_STRING("* {color: inherit !important; background: transparent !important;} "));
// now insert the rule
result = sheet->InsertRule(strRule,0,&index);
}

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

@ -1891,19 +1891,23 @@ nsresult PresShell::SetPrefColorRules(void)
// all (even author important) when put into an override stylesheet
///////////////////////////////////////////////////////////////
// - default color: '* {color:#RRGGBB !important;}'
// - default color: ':root {color:#RRGGBB !important;}'
ColorToString(textColor,strColor);
strRule.Append(NS_LITERAL_STRING("* {color:"));
strRule.Append(NS_LITERAL_STRING(":root {color:"));
strRule.Append(strColor);
strRule.Append(NS_LITERAL_STRING(" !important;} "));
///////////////////////////////////////////////////////////////
// - default background color: '* {background-color:#RRGGBB !important;}'
// - default background color: ':root {background:#RRGGBB !important;}'
ColorToString(bgColor,strColor);
strRule.Append(NS_LITERAL_STRING("* {background-color:"));
strRule.Append(NS_LITERAL_STRING(":root {background:"));
strRule.Append(strColor);
strRule.Append(NS_LITERAL_STRING(" !important;} "));
///////////////////////////////////////////////////////////////
// - everything else inherits the color, and has transparent background
strRule.Append(NS_LITERAL_STRING("* {color: inherit !important; background: transparent !important;} "));
// now insert the rule
result = sheet->InsertRule(strRule,0,&index);
}