mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 504269. background color of iframe not drawn on print. r+sr=roc
This commit is contained in:
parent
c28e754020
commit
24844a2db3
@ -1083,12 +1083,24 @@ nsLayoutUtils::PaintFrame(nsIRenderingContext* aRenderingContext, nsIFrame* aFra
|
||||
}
|
||||
}
|
||||
|
||||
// For printing, this function is first called on an nsPageFrame, which
|
||||
// creates a display list with a PageContent item. The PageContent item's
|
||||
// paint function calls this function on the nsPageFrame's child which is
|
||||
// an nsPageContentFrame. We only want to add the canvas background color
|
||||
// item once, for the nsPageContentFrame.
|
||||
if (NS_SUCCEEDED(rv) && aFrame->GetType() != nsGkAtoms::pageFrame) {
|
||||
nsIAtom* frameType = aFrame->GetType();
|
||||
// For the viewport frame in print preview/page layout we want to paint
|
||||
// the grey background behind the page, not the canvas color.
|
||||
if (frameType == nsGkAtoms::viewportFrame &&
|
||||
aFrame->PresContext()->IsRootPaginatedDocument() &&
|
||||
(aFrame->PresContext()->Type() == nsPresContext::eContext_PrintPreview ||
|
||||
aFrame->PresContext()->Type() == nsPresContext::eContext_PageLayout)) {
|
||||
nsRect bounds = nsRect(builder.ToReferenceFrame(aFrame),
|
||||
aFrame->GetSize());
|
||||
rv = list.AppendNewToBottom(new (&builder) nsDisplaySolidColor(
|
||||
aFrame, bounds, NS_RGB(115, 115, 115)));
|
||||
} else if (frameType != nsGkAtoms::pageFrame) {
|
||||
// For printing, this function is first called on an nsPageFrame, which
|
||||
// creates a display list with a PageContent item. The PageContent item's
|
||||
// paint function calls this function on the nsPageFrame's child which is
|
||||
// an nsPageContentFrame. We only want to add the canvas background color
|
||||
// item once, for the nsPageContentFrame.
|
||||
|
||||
// Add the canvas background color.
|
||||
rv = aFrame->PresContext()->PresShell()->AddCanvasBackgroundColorItem(
|
||||
builder, list, aFrame, nsnull, aBackstop);
|
||||
|
@ -213,11 +213,6 @@
|
||||
cursor: default !important;
|
||||
}
|
||||
|
||||
*|*::-moz-viewport, *|*::-moz-viewport-scroll, *|*::-moz-canvas,
|
||||
*|*::-moz-scrolled-canvas {
|
||||
background-color: #737373 !important;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* XML parse error reporting */
|
||||
|
Loading…
Reference in New Issue
Block a user