Bug 360485 - Factor out nsIDeviceContextSpecFactory. Part 1: changed files. r=pavlov, sr=roc.
git-svn-id: svn://10.0.0.236/trunk@216801 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -78,7 +78,6 @@
|
||||
#include "nsWidgetsCID.h"
|
||||
#include "nsIDeviceContext.h"
|
||||
#include "nsIDeviceContextSpec.h"
|
||||
#include "nsIDeviceContextSpecFactory.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsIView.h"
|
||||
#include "nsView.h" // For nsView::GetViewFor
|
||||
@@ -194,10 +193,7 @@ static const char sPrintOptionsContractID[] = "@mozilla.org/gfx/printset
|
||||
#include <stdio.h>
|
||||
|
||||
//switch to page layout
|
||||
#include "nsIDeviceContextSpecFactory.h"
|
||||
#include "nsIDeviceContextSpec.h"
|
||||
#include "nsGfxCIID.h"
|
||||
static NS_DEFINE_IID(kDeviceContextSpecFactoryCID, NS_DEVICE_CONTEXT_SPEC_FACTORY_CID);
|
||||
|
||||
#ifdef NS_DEBUG
|
||||
|
||||
@@ -852,15 +848,15 @@ DocumentViewerImpl::InitInternal(nsIWidget* aParentWidget,
|
||||
#ifdef NS_PRINT_PREVIEW
|
||||
if (mIsPageMode) {
|
||||
nsCOMPtr<nsIDeviceContext> devctx;
|
||||
nsCOMPtr<nsIDeviceContextSpec> devspec;
|
||||
nsCOMPtr<nsIDeviceContextSpecFactory> factory = do_CreateInstance(kDeviceContextSpecFactoryCID);
|
||||
nsCOMPtr<nsIDeviceContextSpec> devspec =
|
||||
do_CreateInstance("@mozilla.org/gfx/devicecontextspec;1");
|
||||
// XXX CRASHES ON OOM. YUM. WOULD SOMEONE PLEASE FIX ME.
|
||||
// PERHAPS SOMEONE SHOULD HAVE REVIEWED THIS CODE.
|
||||
// XXX I have no idea how critical this code is, so i'm not fixing it.
|
||||
// In fact I'm just adding a line that makes this block
|
||||
// get compiled *less* often.
|
||||
// mWindow has been initialized by preceding call to MakeWindow
|
||||
factory->CreateDeviceContextSpec(mWindow, mPresContext->GetPrintSettings(), *getter_AddRefs(devspec), PR_FALSE);
|
||||
devspec->Init(mWindow, mPresContext->GetPrintSettings(), PR_FALSE);
|
||||
// XXX CRASHES ON OOM under at least
|
||||
// nsPrintJobFactoryPS::CreatePrintJob. WOULD SOMEONE PLEASE FIX ME.
|
||||
// PERHAPS SOMEONE SHOULD HAVE REVIEWED THIS CODE.
|
||||
|
||||
Reference in New Issue
Block a user