Bug 30078 - [GTK] Gtk-directfb and plugins
Summary: [GTK] Gtk-directfb and plugins
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-05 09:36 PDT by vladimir
Modified: 2014-03-25 15:31 PDT (History)
2 users (show)

See Also:


Attachments
GNUmakefile.am patch (432 bytes, patch)
2009-10-05 09:38 PDT, vladimir
no flags Details | Formatted Diff | Diff
npapi patch (802 bytes, patch)
2009-10-05 09:38 PDT, vladimir
no flags Details | Formatted Diff | Diff
PluginPackageGtk patch (483 bytes, patch)
2009-10-05 09:39 PDT, vladimir
no flags Details | Formatted Diff | Diff
PluginViewGtk patch (2.22 KB, patch)
2009-10-05 09:40 PDT, vladimir
no flags Details | Formatted Diff | Diff
fixed all-in-one patch (5.59 KB, patch)
2009-10-06 03:44 PDT, vladimir
eric: review-
Details | Formatted Diff | Diff
cummulative patch, Changelog filled with detailed comments (7.45 KB, patch)
2009-10-07 06:02 PDT, vladimir
gns: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description vladimir 2009-10-05 09:36:54 PDT
It is impossible to build nightly webkit for gtk-directfb target, port is broken. That's because Netscape plugins call to low-level windowing subsystem directly, instead of calling to gtk or QT "wrapping stuff". The problem can be described as follows:

1) Compile-time problems: There are no X11-headers(problem lines looks like "#include X11/*" ), mainly used by npapi.h
2) There are no X11 libs, so even if you provide X11-headers at compile time, you will get link-time errors.

The solution is to add some ifdefs to source files, plus some preprocessor macrodefinitions. Provided patches work pretty well for me (I use WebKit-r49078), at least GtkLauncher works good with "plugin-free" pages.
Comment 1 vladimir 2009-10-05 09:38:22 PDT
Created attachment 40634 [details]
GNUmakefile.am patch
Comment 2 vladimir 2009-10-05 09:38:44 PDT
Created attachment 40635 [details]
npapi patch
Comment 3 vladimir 2009-10-05 09:39:38 PDT
Created attachment 40636 [details]
PluginPackageGtk patch
Comment 4 vladimir 2009-10-05 09:40:03 PDT
Created attachment 40637 [details]
PluginViewGtk patch
Comment 5 vladimir 2009-10-06 03:44:21 PDT
Created attachment 40707 [details]
fixed all-in-one patch
Comment 6 Eric Seidel (no email) 2009-10-06 09:47:06 PDT
Comment on attachment 40707 [details]
fixed all-in-one patch

This change has a bunch fo changes which are not explained by the ChangeLog.  Like the XP_UNIX stuff?

Please add a more detailed ChangeLog explaining why your'e adding these #ifs to various sections.
Comment 7 vladimir 2009-10-07 06:02:18 PDT
Created attachment 40780 [details]
cummulative patch, Changelog filled with detailed comments
Comment 8 Gustavo Noronha (kov) 2009-10-08 16:03:32 PDT
Comment on attachment 40780 [details]
cummulative patch, Changelog filled with detailed comments

> Index: WebCore/plugins/npapi.cpp
> ===================================================================
> --- WebCore/plugins/npapi.cpp	(revision 49240)
> +++ WebCore/plugins/npapi.cpp	(working copy)
> @@ -108,9 +108,11 @@ const char* NPN_UserAgent(NPP instance)
>  {
>      PluginView* view = pluginViewForInstance(instance);
>  
> +#if ENABLE(NETSCAPE_PLUGIN_API)
>       if (!view)
>           return PluginView::userAgentStatic();
>   
> +#endif
>      return view->userAgent();
>  }
>  
> @@ -138,8 +140,10 @@ NPError NPN_GetValue(NPP instance, NPNVa
>  {
>      PluginView* view = pluginViewForInstance(instance);
>  
> +#if ENABLE(NETSCAPE_PLUGIN_API)
>       if (!view)
>           return PluginView::getValueStatic(variable, value);
> +#endif
>  
>      return pluginViewForInstance(instance)->getValue(variable, value);
>  }

These two changes look a bit weird to me. This file is supposed to implement the netscape plugin API, so disabling it should probably not include the files at all, or have empty implementations for everything? Can these checks be moved up?

The changelog is pretty detailed, thanks for that! I think you'll want to wrap the lines at a reasonable width, though, say, between 80 and 100 characters.

> +#if ENABLE(NETSCAPE_PLUGIN_API)
>      initializeBrowserFuncs();
> +#endif

This is a bit strange, too, specially given that just a few lines bellow NPAPI seems to be being called:
>  
>  #if defined(XP_UNIX)
>      npErr = NP_Initialize(&m_browserFuncs, &m_pluginFuncs);


Thanks,
Comment 9 Martin Robinson 2010-10-12 16:41:49 PDT
Any update on this?
Comment 10 Martin Robinson 2014-03-25 15:31:39 PDT
The directfb backend of GTK+ is long gone.