Replace the BodyFixupRule with code in nsCSSRendering to fix all the problems with dynamic style changes and backgrounds on the root element and the BODY element. Change the way the HTMLDocumentColorRule (for the table color quirk) is initialized since it used to depend on the BodyFixupRule. b=116161 (also fixes other bugs) r=attinasi sr=hyatt

git-svn-id: svn://10.0.0.236/trunk@111511 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
dbaron%fas.harvard.edu
2002-01-07 23:46:07 +00:00
parent 845f74be1e
commit b7194a0ea8
79 changed files with 687 additions and 1298 deletions

View File

@@ -234,11 +234,6 @@ nsSimplePageSequenceFrame::Reflow(nsIPresContext* aPresContext,
aStatus = NS_FRAME_COMPLETE; // we're always complete
if (aReflowState.reason == eReflowReason_Initial) {
CacheBackground(aPresContext);
}
nsCOMPtr<nsIPrintPreviewContext> ppContext = do_QueryInterface(aPresContext);
// *** Special Override ***
@@ -1080,25 +1075,3 @@ nsSimplePageSequenceFrame::SetPageSizes(const nsRect& aRect, const nsMargin& aMa
mPageData->mReflowRect = aRect;
mPageData->mReflowMargin = aMarginRect;
}
//------------------------------------------------------------------------------
// Get the Style Data from the first child of this frame, the nsPageFrame
// uses this to paint the background for printing
// No return code, there not much we can do if this fails
void
nsSimplePageSequenceFrame::CacheBackground(nsIPresContext* aPresContext)
{
nsIFrame* pageFrame = mFrames.FirstChild();
if (pageFrame == nsnull) {
return;
}
nsCOMPtr<nsIStyleContext> parentContext;
pageFrame->GetStyleContext(getter_AddRefs(parentContext));
mPageData->mBackground = (nsStyleBackground*)parentContext->GetStyleData(eStyleStruct_Background);
}