After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 757940 - Browser plugin should be windowless
Browser plugin should be windowless
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: extensions
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2015-11-11 11:36 UTC by Carlos Garcia Campos
Modified: 2015-11-17 17:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
browser-plugin: Set windowless mode and don't claim to need XEmbed (1.48 KB, patch)
2015-11-11 11:37 UTC, Carlos Garcia Campos
none Details | Review
Updated patch (1.95 KB, patch)
2015-11-17 09:56 UTC, Carlos Garcia Campos
committed Details | Review

Description Carlos Garcia Campos 2015-11-11 11:36:08 UTC
It's currently windowed and claiming to need XEmbed, but we never create the GtkPlug to connect to the GtkSocket created by the browser, since we don't event implement NPP_SetWindow.
Comment 1 Carlos Garcia Campos 2015-11-11 11:37:14 UTC
Created attachment 315254 [details] [review]
browser-plugin: Set windowless mode and don't claim to need XEmbed
Comment 2 Jasper St. Pierre (not reading bugmail) 2015-11-11 19:27:30 UTC
Review of attachment 315254 [details] [review]:

Ah. I added the XEmbed code simply because without it, WebKit thought it required Xt, which it spat out an error for.

Good to know there's a way around that.
Comment 3 Carlos Garcia Campos 2015-11-12 07:41:24 UTC
(In reply to Jasper St. Pierre from comment #2)
> Review of attachment 315254 [details] [review] [review]:
> 
> Ah. I added the XEmbed code simply because without it, WebKit thought it
> required Xt, which it spat out an error for.

Yes, since WebKit2 we don't support windowed plugins without XEmbed.

> Good to know there's a way around that.

I think the confusing part is that NPAPI plugins are windowed by default, so windowless plugins like this one need to explicitly set windowless mode at startup.
Comment 4 Carlos Garcia Campos 2015-11-12 11:15:31 UTC
Comment on attachment 315254 [details] [review]
browser-plugin: Set windowless mode and don't claim to need XEmbed

Pushed to both branches
Comment 5 vitalik_p 2015-11-13 21:57:52 UTC
(In reply to Carlos Garcia Campos from comment #4)
> Comment on attachment 315254 [details] [review] [review]
> browser-plugin: Set windowless mode and don't claim to need XEmbed
> 
> Pushed to both branches

browser plugin crash in firefox

https://bugzilla.gnome.org/show_bug.cgi?id=758035
Comment 6 Michael Catanzaro 2015-11-16 16:57:50 UTC
Reverted to fix bug #758035 :/
Comment 7 Carlos Garcia Campos 2015-11-16 17:59:40 UTC
I'll check firefox code.
Comment 8 Carlos Garcia Campos 2015-11-17 09:56:35 UTC
Created attachment 315733 [details] [review]
Updated patch

The problem is that windowless plugins are supposed to handle events (windowed plugins already receive the events themselves), so browsers call NPP_HandleEvent which is uninitialized and unimplemented in our plugins (browsers don't null check most of the plugin function pointers, anyway). I don't know why firefox is sending events to the plugin that is hidden (offscreen), but we can just implement NPP_HandleEvent to ignore events. This makes the plugin work in firefox.
Comment 9 Michael Catanzaro 2015-11-17 17:35:53 UTC
Gracias!
Comment 10 Michael Catanzaro 2015-11-17 17:42:24 UTC
Florian, you might want to do a new release over this. Sorry for the breakage.