layout/html/base/src/nsObjectFrame.cpp,1.288 | . | Disk File |
Skipping to line 92 | . | |
#include "nsGUIEvent.h" |
. |
#include "nsGUIEvent.h" |
#include "nsIRenderingContext.h" |
. |
#include "nsIRenderingContext.h" |
#include "nsIContentViewer.h" |
. |
#include "nsIContentViewer.h" |
#include "nsIDocShell.h" |
. |
#include "nsIDocShell.h" |
#include "npapi.h" |
. |
#include "npapi.h" |
#include "nsIPrintOptions.h" |
. |
#include "nsIPrintSettings.h" |
#include "nsGfxCIID.h" |
. |
#include "nsGfxCIID.h" |
#include "nsHTMLUtils.h" |
. |
#include "nsHTMLUtils.h" |
#include "nsUnicharUtils.h" |
. |
#include "nsUnicharUtils.h" |
static NS_DEFINE_CID(kPrintOptionsCID, NS_PRINTOPTIONS_CID); |
. |
  |
|
. |
|
// headers for plugin scriptability |
. |
// headers for plugin scriptability |
#include "nsIScriptGlobalObject.h" |
. |
#include "nsIScriptGlobalObject.h" |
#include "nsIScriptContext.h" |
. |
#include "nsIScriptContext.h" |
#include "nsIXPConnect.h" |
. |
#include "nsIXPConnect.h" |
Skipping to line 1630 | . | |
PRBool windowless; |
. |
PRBool windowless; |
pi->GetValue(nsPluginInstanceVariable_WindowlessBool, (void *)&windowless)
; |
. |
pi->GetValue(nsPluginInstanceVariable_WindowlessBool, (void *)&windowless)
; |
window.type = windowless ? nsPluginWindowType_Drawable : nsPluginWindowT
ype_Window; |
. |
window.type = windowless ? nsPluginWindowType_Drawable : nsPluginWindowT
ype_Window; |
|
. |
|
// get a few things |
. |
// get a few things |
nsCOMPtr<nsIPrintOptions> printService = do_GetService(kPrintOptionsCID, &
rv); |
. |
nsCOMPtr<nsIPrintSettings> printSettings;
|
NS_ENSURE_TRUE(printService, NS_ERROR_FAILURE); |
. |
thePrinterContext->GetPrintSettings(getter_AddRefs(printSettings)); |
printService->GetMarginInTwips(margin); |
. |
printSettings->GetMarginInTwips(margin); |
|
. |
|
aPresContext->GetTwipsToPixels(&t2p); |
. |
aPresContext->GetTwipsToPixels(&t2p); |
GetOffsetFromView(aPresContext, origin, &parentWithView); |
. |
GetOffsetFromView(aPresContext, origin, &parentWithView); |
|
. |
|
// set it all up |
. |
// set it all up |
Skipping to line 1671 | . | |
npprint.print.embedPrint.platformPrint = (void*)window.window; |
. |
npprint.print.embedPrint.platformPrint = (void*)window.window; |
|
. |
|
#elif defined (XP_UNIX) |
. |
#elif defined (XP_UNIX) |
// UNIX does things completely differently |
. |
// UNIX does things completely differently |
PRUnichar *printfile = nsnull; |
. |
PRUnichar *printfile = nsnull; |
printService->GetToFileName(&printfile); |
. |
if (printSettings) { |
  |
. |
printSettings->GetToFileName(&printfile); |
  |
. |
} |
if (!printfile) |
. |
if (!printfile) |
return NS_OK; // XXX what to do on UNIX when we don't have a PS file????
|
. |
return NS_OK; // XXX what to do on UNIX when we don't have a PS file????
|
|
. |
|
NPPrintCallbackStruct npPrintInfo; |
. |
NPPrintCallbackStruct npPrintInfo; |
npPrintInfo.type = NP_PRINT; |
. |
npPrintInfo.type = NP_PRINT; |