Bug 18892

Summary: [gtk][qt] Some NPAPI plugins need info before creating a PluginView
Product: WebKit Reporter: marcoil <marc.ordinasillopis>
Component: Plug-insAssignee: marcoil <marc.ordinasillopis>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, chris, gb.devel, hausmann, jhoneycutt, pierre-luc.beaudoin, voyageursp
Priority: P3 Keywords: Gtk, Qt
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
Preliminary patch for testing
none
Fixes loading plugins with NULL instance (r32972)
none
Modified patch for #18892 and #18882 zecke: review+

Description marcoil 2008-05-05 03:34:03 PDT
Plugins like Gnash, nspluginwrapper and Adobe Acrobat call NPN_UserAgent and NPN_GetValue (with variables NPNVxDisplay, NPNVToolkit and NPNVSupportsXEmbedBool) before a PluginView has been created.

Right now we have no way of answering those queries, so the plugins fail to load.
Comment 1 Gwenole Beauchesne 2008-05-06 04:41:00 PDT
*** Bug 18907 has been marked as a duplicate of this bug. ***
Comment 2 marcoil 2008-05-07 02:29:25 PDT
Created attachment 20998 [details]
Preliminary patch for testing

This is a preliminary attempt at fixing the bug. It adds two things:
- An static version for NPN_UserAgent and NPN_GetValue for plugins that call those before any PluginView has been created.
- More currentPluginView guards for plugins that call NPN_* functions without a proper instance when calling inside an NPP_* call, based on the existing patch for bug #18882.
Comment 3 marcoil 2008-05-08 01:54:02 PDT
Created attachment 21011 [details]
Fixes loading plugins with NULL instance (r32972)

This is mostly the same patch but with proper ChangeLog and ready for review. Thanks to Chris Lord, it should also fix bug #18882.
Comment 4 marcoil 2008-05-09 03:14:47 PDT
Created attachment 21034 [details]
Modified patch for #18892 and #18882

Modified patch for style changes. I've also removed some stuff for dealing with Adobe Acrobat that I think will require a different bug and some more work.
Comment 5 Holger Freyther 2008-05-14 01:52:48 PDT
Comment on attachment 21034 [details]
Modified patch for #18892 and #18882

Yupp. Patch looks fine. I would like to land it in two parts. First the substance and then bringing these two files in line with our coding style.

thanks!
Comment 6 marcoil 2008-05-19 03:15:13 PDT
Patch landed in r33570.