зеркало из https://github.com/mozilla/pjs.git
ensure JMDrawFrameInPort is available in printApplet().
This commit is contained in:
Родитель
f454bdbb9c
Коммит
4660a83aa3
|
@ -919,12 +919,14 @@ void MRJContext::printApplet(nsPluginWindow* printingWindow)
|
||||||
|
|
||||||
do {
|
do {
|
||||||
// try to use the printing API, if that fails, fall back on netscape.oji.AWTUtils.printContainer().
|
// try to use the printing API, if that fails, fall back on netscape.oji.AWTUtils.printContainer().
|
||||||
Point frameOrigin = { printingWindow->y, printingWindow->x };
|
if (&::JMDrawFrameInPort != NULL) {
|
||||||
status = ::JMDrawFrameInPort(mViewerFrame, printingPort, frameOrigin, printingPort->clipRgn, false);
|
Point frameOrigin = { printingWindow->y, printingWindow->x };
|
||||||
if (status == noErr) break;
|
status = ::JMDrawFrameInPort(mViewerFrame, printingPort, frameOrigin, printingPort->clipRgn, false);
|
||||||
|
if (status == noErr) break;
|
||||||
|
}
|
||||||
|
|
||||||
// get the frame object to print.
|
// get the frame object to print.
|
||||||
frameObject = JMGetAWTFrameJNIObject(mViewerFrame, env);
|
frameObject = ::JMGetAWTFrameJNIObject(mViewerFrame, env);
|
||||||
if (frameObject == NULL) break;
|
if (frameObject == NULL) break;
|
||||||
|
|
||||||
// call the print methods of the applet viewer's frame.
|
// 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[2].i = jint(printingWindow->x);
|
||||||
args[3].i = jint(printingWindow->y);
|
args[3].i = jint(printingWindow->y);
|
||||||
args[4].l = notifier.getObject();
|
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.
|
// now, wait for the print method to complete.
|
||||||
if (status == noErr)
|
if (status == noErr)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче