зеркало из https://github.com/mozilla/gecko-dev.git
Fixing viewer so it can print again.
This commit is contained in:
Родитель
6ef0e88937
Коммит
d562b821c5
|
@ -76,6 +76,7 @@
|
|||
#include "nsGUIEvent.h"
|
||||
#include "nsIWebProgress.h"
|
||||
#include "nsIWebBrowserSetup.h"
|
||||
#include "nsIWebBrowserPrint.h"
|
||||
|
||||
#include "nsCWebBrowser.h"
|
||||
#include "nsUnicharUtils.h"
|
||||
|
@ -2206,11 +2207,13 @@ void nsBrowserWindow::DoPrint(void)
|
|||
|
||||
mDocShell->GetContentViewer(getter_AddRefs(viewer));
|
||||
|
||||
if (viewer)
|
||||
{
|
||||
nsCOMPtr<nsIContentViewerFile> viewerFile = do_QueryInterface(viewer);
|
||||
if (viewerFile) {
|
||||
//viewerFile->Print(PR_FALSE, nsnull, (nsIWebProgressListener*)nsnull);
|
||||
if (viewer) {
|
||||
nsCOMPtr<nsIWebBrowserPrint> webBrowserPrint = do_QueryInterface(viewer);
|
||||
if (webBrowserPrint) {
|
||||
if (!mPrintSettings) {
|
||||
webBrowserPrint->GetNewPrintSettings(getter_AddRefs(mPrintSettings));
|
||||
}
|
||||
webBrowserPrint->Print(mPrintSettings, (nsIWebProgressListener*)nsnull);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -65,6 +65,8 @@
|
|||
#include "nsImageInspectorDialog.h"
|
||||
#include "nsITextWidget.h"
|
||||
|
||||
#include "nsIPrintSettings.h"
|
||||
|
||||
class nsILabel;
|
||||
class nsICheckButton;
|
||||
class nsIButton;
|
||||
|
@ -276,6 +278,8 @@ protected:
|
|||
|
||||
nsWebBrowserChrome* mWebBrowserChrome;
|
||||
PRBool mHaveMenuBar;
|
||||
|
||||
nsCOMPtr<nsIPrintSettings> mPrintSettings;
|
||||
};
|
||||
|
||||
// XXX This is bad; because we can't hang a closure off of the event
|
||||
|
|
Загрузка…
Ссылка в новой задаче