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()) {