From 0ec574a5c1beae0ea8753e49756678da1e238f05 Mon Sep 17 00:00:00 2001 From: "troy%netscape.com" Date: Mon, 11 Jan 1999 19:44:22 +0000 Subject: [PATCH] Fix for bug #2285. Just reseting the mFlags isn't enough, because the PaintBackground() member function ignores the flags and checks for a non-empty URL. This way is safer and should work in all cases --- content/html/content/src/nsHTMLBodyElement.cpp | 1 + layout/html/content/src/nsHTMLBodyElement.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/content/html/content/src/nsHTMLBodyElement.cpp b/content/html/content/src/nsHTMLBodyElement.cpp index bca25474389c..cb53e8ba4319 100644 --- a/content/html/content/src/nsHTMLBodyElement.cpp +++ b/content/html/content/src/nsHTMLBodyElement.cpp @@ -474,6 +474,7 @@ BodyFixupRule::MapStyleInto(nsIStyleContext* aContext, nsIPresContext* aPresCont mutableStyleColor = (nsStyleColor*)aContext->GetMutableStyleData(eStyleStruct_Color); mutableStyleColor->mBackgroundFlags = NS_STYLE_BG_COLOR_TRANSPARENT | NS_STYLE_BG_IMAGE_NONE; + mutableStyleColor->mBackgroundImage.SetLength(0); } NS_RELEASE(parentContext); } diff --git a/layout/html/content/src/nsHTMLBodyElement.cpp b/layout/html/content/src/nsHTMLBodyElement.cpp index bca25474389c..cb53e8ba4319 100644 --- a/layout/html/content/src/nsHTMLBodyElement.cpp +++ b/layout/html/content/src/nsHTMLBodyElement.cpp @@ -474,6 +474,7 @@ BodyFixupRule::MapStyleInto(nsIStyleContext* aContext, nsIPresContext* aPresCont mutableStyleColor = (nsStyleColor*)aContext->GetMutableStyleData(eStyleStruct_Color); mutableStyleColor->mBackgroundFlags = NS_STYLE_BG_COLOR_TRANSPARENT | NS_STYLE_BG_IMAGE_NONE; + mutableStyleColor->mBackgroundImage.SetLength(0); } NS_RELEASE(parentContext); }