Bug 877612 - Cannot enter into fullscreen mode after print dialog is opened, r=roc

This commit is contained in:
Olli Pettay 2013-06-07 12:11:04 +03:00
Родитель c8adbd0824
Коммит 75d27ab11e
1 изменённых файлов: 6 добавлений и 4 удалений

Просмотреть файл

@ -529,10 +529,12 @@ nsPrintEngine::DoCommonPrint(bool aIsPrintPreview,
NS_ENSURE_SUCCESS(rv, rv); NS_ENSURE_SUCCESS(rv, rv);
{ {
nsCOMPtr<nsIContentViewer> viewer; if (aIsPrintPreview) {
webContainer->GetContentViewer(getter_AddRefs(viewer)); nsCOMPtr<nsIContentViewer> viewer;
if (viewer && viewer->GetDocument() && viewer->GetDocument()->IsShowing()) { webContainer->GetContentViewer(getter_AddRefs(viewer));
viewer->GetDocument()->OnPageHide(false, nullptr); if (viewer && viewer->GetDocument() && viewer->GetDocument()->IsShowing()) {
viewer->GetDocument()->OnPageHide(false, nullptr);
}
} }
nsAutoScriptBlocker scriptBlocker; nsAutoScriptBlocker scriptBlocker;