mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1156742 Part 15: Add pref for turning on printing via the parent process. r=mconley
This commit is contained in:
parent
14c806bb15
commit
c5e5f4a1cd
@ -75,6 +75,7 @@ static const char kPrintingPromptService[] = "@mozilla.org/embedcomp/printingpro
|
||||
#include "nsISelectionController.h"
|
||||
|
||||
// Misc
|
||||
#include "mozilla/gfx/DrawEventRecorder.h"
|
||||
#include "mozilla/layout/RemotePrintJobChild.h"
|
||||
#include "nsISupportsUtils.h"
|
||||
#include "nsIScriptContext.h"
|
||||
@ -91,6 +92,7 @@ static const char kPrintingPromptService[] = "@mozilla.org/embedcomp/printingpro
|
||||
|
||||
#include "nsWidgetsCID.h"
|
||||
#include "nsIDeviceContextSpec.h"
|
||||
#include "nsDeviceContextSpecProxy.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "nsView.h"
|
||||
#include "nsRenderingContext.h"
|
||||
@ -569,9 +571,13 @@ nsPrintEngine::DoCommonPrint(bool aIsPrintPreview,
|
||||
mPrt->mPrintSettings->SetPrintOptions(nsIPrintSettings::kEnableSelectionRB,
|
||||
isSelection || mPrt->mIsIFrameSelected);
|
||||
|
||||
nsCOMPtr<nsIDeviceContextSpec> devspec
|
||||
(do_CreateInstance("@mozilla.org/gfx/devicecontextspec;1", &rv));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
nsCOMPtr<nsIDeviceContextSpec> devspec;
|
||||
if (XRE_IsContentProcess() && Preferences::GetBool("print.print_via_parent")) {
|
||||
devspec = new nsDeviceContextSpecProxy();
|
||||
} else {
|
||||
devspec = do_CreateInstance("@mozilla.org/gfx/devicecontextspec;1", &rv);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
}
|
||||
|
||||
nsScriptSuppressor scriptSuppressor(this);
|
||||
if (!aIsPrintPreview) {
|
||||
|
@ -1011,6 +1011,9 @@ pref("print.print_edge_left", 0);
|
||||
pref("print.print_edge_right", 0);
|
||||
pref("print.print_edge_bottom", 0);
|
||||
|
||||
// Print via the parent process. This is only used when e10s is enabled.
|
||||
pref("print.print_via_parent", false);
|
||||
|
||||
// Pref used by the spellchecker extension to control the
|
||||
// maximum number of misspelled words that will be underlined
|
||||
// in a document.
|
||||
|
@ -95,6 +95,7 @@ EXPORTS += [
|
||||
'InputData.h',
|
||||
'nsBaseScreen.h',
|
||||
'nsBaseWidget.h',
|
||||
'nsDeviceContextSpecProxy.h',
|
||||
'nsIDeviceContextSpec.h',
|
||||
'nsIPluginWidget.h',
|
||||
'nsIRollupListener.h',
|
||||
|
Loading…
Reference in New Issue
Block a user