Fix for bug #2316. Added back some code I removed because I didn't think we

needed it, but without out it 'color' doesn't inherit properly


git-svn-id: svn://10.0.0.236/trunk@17701 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
troy%netscape.com
1999-01-14 05:14:11 +00:00
parent 1667c46952
commit 5caea33110
2 changed files with 18 additions and 4 deletions

View File

@@ -439,13 +439,20 @@ BodyFixupRule::MapStyleInto(nsIStyleContext* aContext, nsIPresContext* aPresCont
}
// XXX do any other body processing here
const nsStyleColor* styleColor;
styleColor = (const nsStyleColor*)aContext->GetStyleData(eStyleStruct_Color);
// Fixup default presentation colors (NAV QUIRK)
if (nsnull != styleColor) {
aPresContext->SetDefaultColor(styleColor->mColor);
aPresContext->SetDefaultBackgroundColor(styleColor->mBackgroundColor);
}
// Use the CSS precedence rules for dealing with BODY background: if the value
// of the 'background' property for the HTML element is different from
// 'transparent' then use it, else use the value of the 'background' property
// for the BODY element
const nsStyleColor* styleColor;
styleColor = (const nsStyleColor*)aContext->GetStyleData(eStyleStruct_Color);
// See if the BODY has a background specified
if (!styleColor->BackgroundIsTransparent()) {

View File

@@ -439,13 +439,20 @@ BodyFixupRule::MapStyleInto(nsIStyleContext* aContext, nsIPresContext* aPresCont
}
// XXX do any other body processing here
const nsStyleColor* styleColor;
styleColor = (const nsStyleColor*)aContext->GetStyleData(eStyleStruct_Color);
// Fixup default presentation colors (NAV QUIRK)
if (nsnull != styleColor) {
aPresContext->SetDefaultColor(styleColor->mColor);
aPresContext->SetDefaultBackgroundColor(styleColor->mBackgroundColor);
}
// Use the CSS precedence rules for dealing with BODY background: if the value
// of the 'background' property for the HTML element is different from
// 'transparent' then use it, else use the value of the 'background' property
// for the BODY element
const nsStyleColor* styleColor;
styleColor = (const nsStyleColor*)aContext->GetStyleData(eStyleStruct_Color);
// See if the BODY has a background specified
if (!styleColor->BackgroundIsTransparent()) {