|Summary:||NPP_Print is never called on Print, but NPP_SetWindow is with surprising parameters|
|Product:||WebKit||Reporter:||Rudi Sherry <rsherry>|
|Severity:||Normal||CC:||andersca, ap, rsherry|
|Version:||528+ (Nightly build)|
|OS:||OS X 10.6|
Description Rudi Sherry 2012-02-06 14:28:20 PST
I am seeing no calls to NPP_Print when printing. I am using the WebKit nightly from about a month ago, but we are also seeing this in Safari 5.1.2, both on 10.6 and 10.7. When the user is in a document controlled by a plug-in and chooses "Print", the plugin gets the call NPP_SetWindow() with page-size window... that causes us to resize our view to be page ratio, which is surprising our users. The Print sheet appears, then printing doesn't print anything of our content. Then we get another NPP_SetWindow() that restores us to the Safari window size. NPP_Print() is never called. We are using the Cocoa Event model and the Core Animation drawing model.
Comment 1 Alexey Proskuryakov 2012-02-07 10:05:27 PST
What do you expect to be passed as printInfo->print.embedPrint.platformPrint?
Comment 2 Rudi Sherry 2012-02-07 11:40:15 PST
(In reply to comment #1) > What do you expect to be passed as printInfo->print.embedPrint.platformPrint? I think it would depend on the negotiated drawing model. If we've negotiated a CoreAnimation layer, I would expect a CALayer. I can put whatever I want on that layer and return. I would not expect it to be the same layer I provided to the browser, since that is being used to display on the window. The browser would own the printed layer. I'm not familiar enough with the other drawing models to know, but I expect it would be similar.