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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user