mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
ensure JMDrawFrameInPort is available in printApplet().
This commit is contained in:
parent
8d8a75c577
commit
17405c284d
@ -919,12 +919,14 @@ void MRJContext::printApplet(nsPluginWindow* printingWindow)
|
||||
|
||||
do {
|
||||
// try to use the printing API, if that fails, fall back on netscape.oji.AWTUtils.printContainer().
|
||||
Point frameOrigin = { printingWindow->y, printingWindow->x };
|
||||
status = ::JMDrawFrameInPort(mViewerFrame, printingPort, frameOrigin, printingPort->clipRgn, false);
|
||||
if (status == noErr) break;
|
||||
if (&::JMDrawFrameInPort != NULL) {
|
||||
Point frameOrigin = { printingWindow->y, printingWindow->x };
|
||||
status = ::JMDrawFrameInPort(mViewerFrame, printingPort, frameOrigin, printingPort->clipRgn, false);
|
||||
if (status == noErr) break;
|
||||
}
|
||||
|
||||
// get the frame object to print.
|
||||
frameObject = JMGetAWTFrameJNIObject(mViewerFrame, env);
|
||||
frameObject = ::JMGetAWTFrameJNIObject(mViewerFrame, env);
|
||||
if (frameObject == NULL) break;
|
||||
|
||||
// call the print methods of the applet viewer's frame.
|
||||
@ -943,7 +945,7 @@ void MRJContext::printApplet(nsPluginWindow* printingWindow)
|
||||
args[2].i = jint(printingWindow->x);
|
||||
args[3].i = jint(printingWindow->y);
|
||||
args[4].l = notifier.getObject();
|
||||
OSStatus status = JMExecJNIStaticMethodInContext(mContext, env, utilsClass, printContainerMethod, 5, args);
|
||||
OSStatus status = ::JMExecJNIStaticMethodInContext(mContext, env, utilsClass, printContainerMethod, 5, args);
|
||||
|
||||
// now, wait for the print method to complete.
|
||||
if (status == noErr)
|
||||
|
Loading…
Reference in New Issue
Block a user