From 078bea04faff7a30c4ff94be8a5419f56534dce6 Mon Sep 17 00:00:00 2001 From: "attinasi%netscape.com" Date: Wed, 10 May 2000 03:31:43 +0000 Subject: [PATCH] Put back in the code to propagate the background to the canvas frame at frame construction time. b=38744 --- layout/base/nsCSSFrameConstructor.cpp | 10 ++-------- layout/html/style/src/nsCSSFrameConstructor.cpp | 10 ++-------- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/layout/base/nsCSSFrameConstructor.cpp b/layout/base/nsCSSFrameConstructor.cpp index cce55ac67182..37edce85058d 100644 --- a/layout/base/nsCSSFrameConstructor.cpp +++ b/layout/base/nsCSSFrameConstructor.cpp @@ -3082,7 +3082,6 @@ IsCanvasFrame(nsIFrame* aFrame) return parentType.get() == nsLayoutAtoms::canvasFrame; } -#if 0 // unused currently static void PropagateBackgroundToParent(nsIStyleContext* aStyleContext, const nsStyleColor* aColor, @@ -3107,7 +3106,6 @@ PropagateBackgroundToParent(nsIStyleContext* aStyleContext, mutableColor->mBackgroundImage.SetLength(0); mutableColor->mBackgroundAttachment = NS_STYLE_BG_ATTACHMENT_SCROLL; } -#endif // 0 /** * New one @@ -3347,10 +3345,8 @@ nsCSSFrameConstructor::ConstructDocElementFrame(nsIPresShell* aPresShell, } } -#if 0 - // this is not sufficient nor required: if the background gets changed via DOM after - // frame construction we need to do this again, besides, it is not - // necessary since the BODY manages to paint the background correctly + // this is not sufficient: if the background gets changed via DOM after + // frame construction we need to do this again... // Section 14.2 of the CSS2 spec says that the background of the root element // covers the entire canvas. See if a background was specified for the root @@ -3364,8 +3360,6 @@ nsCSSFrameConstructor::ConstructDocElementFrame(nsIPresShell* aPresShell, PropagateBackgroundToParent(styleContext, color, parentContext); NS_RELEASE(parentContext); } -#endif // 0 - } return NS_OK; diff --git a/layout/html/style/src/nsCSSFrameConstructor.cpp b/layout/html/style/src/nsCSSFrameConstructor.cpp index cce55ac67182..37edce85058d 100644 --- a/layout/html/style/src/nsCSSFrameConstructor.cpp +++ b/layout/html/style/src/nsCSSFrameConstructor.cpp @@ -3082,7 +3082,6 @@ IsCanvasFrame(nsIFrame* aFrame) return parentType.get() == nsLayoutAtoms::canvasFrame; } -#if 0 // unused currently static void PropagateBackgroundToParent(nsIStyleContext* aStyleContext, const nsStyleColor* aColor, @@ -3107,7 +3106,6 @@ PropagateBackgroundToParent(nsIStyleContext* aStyleContext, mutableColor->mBackgroundImage.SetLength(0); mutableColor->mBackgroundAttachment = NS_STYLE_BG_ATTACHMENT_SCROLL; } -#endif // 0 /** * New one @@ -3347,10 +3345,8 @@ nsCSSFrameConstructor::ConstructDocElementFrame(nsIPresShell* aPresShell, } } -#if 0 - // this is not sufficient nor required: if the background gets changed via DOM after - // frame construction we need to do this again, besides, it is not - // necessary since the BODY manages to paint the background correctly + // this is not sufficient: if the background gets changed via DOM after + // frame construction we need to do this again... // Section 14.2 of the CSS2 spec says that the background of the root element // covers the entire canvas. See if a background was specified for the root @@ -3364,8 +3360,6 @@ nsCSSFrameConstructor::ConstructDocElementFrame(nsIPresShell* aPresShell, PropagateBackgroundToParent(styleContext, color, parentContext); NS_RELEASE(parentContext); } -#endif // 0 - } return NS_OK;