From 5caea3311055715df2dc6e5c5b4ff65ffdf25dea Mon Sep 17 00:00:00 2001 From: "troy%netscape.com" Date: Thu, 14 Jan 1999 05:14:11 +0000 Subject: [PATCH] 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 --- .../content/html/content/src/nsHTMLBodyElement.cpp | 11 +++++++++-- mozilla/layout/html/content/src/nsHTMLBodyElement.cpp | 11 +++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/mozilla/content/html/content/src/nsHTMLBodyElement.cpp b/mozilla/content/html/content/src/nsHTMLBodyElement.cpp index cb53e8ba431..29d2646113e 100644 --- a/mozilla/content/html/content/src/nsHTMLBodyElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLBodyElement.cpp @@ -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()) { diff --git a/mozilla/layout/html/content/src/nsHTMLBodyElement.cpp b/mozilla/layout/html/content/src/nsHTMLBodyElement.cpp index cb53e8ba431..29d2646113e 100644 --- a/mozilla/layout/html/content/src/nsHTMLBodyElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLBodyElement.cpp @@ -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()) {