mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 844473 - Honor mozdisallowselectionprint and moznomarginboxes in print preview and use child document. r=roc
This commit is contained in:
parent
49183c46ed
commit
49e65de1c8
@ -3694,11 +3694,13 @@ nsDocumentViewer::PrintPreview(nsIPrintSettings* aPrintSettings,
|
||||
if (mPrintEngine->HasPrintCallbackCanvas()) {
|
||||
mBeforeAndAfterPrint = beforeAndAfterPrint;
|
||||
}
|
||||
dom::Element* root = mDocument->GetRootElement();
|
||||
dom::Element* root = doc->GetRootElement();
|
||||
if (root && root->HasAttr(kNameSpaceID_None, nsGkAtoms::mozdisallowselectionprint)) {
|
||||
PR_PL(("PrintPreview: found mozdisallowselectionprint"));
|
||||
mPrintEngine->SetDisallowSelectionPrint(true);
|
||||
}
|
||||
if (root && root->HasAttr(kNameSpaceID_None, nsGkAtoms::moznomarginboxes)) {
|
||||
PR_PL(("PrintPreview: found moznomarginboxes"));
|
||||
mPrintEngine->SetNoMarginBoxes(true);
|
||||
}
|
||||
rv = mPrintEngine->PrintPreview(aPrintSettings, aChildDOMWin, aWebProgressListener);
|
||||
|
Loading…
Reference in New Issue
Block a user