зеркало из https://github.com/mozilla/gecko-dev.git
Bug 844473: Honor mozdisallowselectionprint and moznomarginboxes in print preview as well as print. r=roc
This commit is contained in:
Родитель
8e84c8c50c
Коммит
307f35b892
|
@ -3701,6 +3701,13 @@ nsDocumentViewer::PrintPreview(nsIPrintSettings* aPrintSettings,
|
|||
if (mPrintEngine->HasPrintCallbackCanvas()) {
|
||||
mBeforeAndAfterPrint = beforeAndAfterPrint;
|
||||
}
|
||||
dom::Element* root = mDocument->GetRootElement();
|
||||
if (root && root->HasAttr(kNameSpaceID_None, nsGkAtoms::mozdisallowselectionprint)) {
|
||||
mPrintEngine->SetDisallowSelectionPrint(true);
|
||||
}
|
||||
if (root && root->HasAttr(kNameSpaceID_None, nsGkAtoms::moznomarginboxes)) {
|
||||
mPrintEngine->SetNoMarginBoxes(true);
|
||||
}
|
||||
rv = mPrintEngine->PrintPreview(aPrintSettings, aChildDOMWin, aWebProgressListener);
|
||||
mPrintPreviewZoomed = false;
|
||||
if (NS_FAILED(rv)) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче