Bug 60536 - [GTK] Remove some unneeded header includes
Summary: [GTK] Remove some unneeded header includes
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk
Depends on:
Blocks:
 
Reported: 2011-05-10 00:33 PDT by Carlos Garcia Campos
Modified: 2011-05-30 07:13 PDT (History)
0 users

See Also:


Attachments
Patch (3.83 KB, patch)
2011-05-10 00:39 PDT, Carlos Garcia Campos
mrobinson: review-
Details | Formatted Diff | Diff
Updated patch (2.30 KB, patch)
2011-05-30 02:01 PDT, Carlos Garcia Campos
mrobinson: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2011-05-10 00:33:59 PDT
Trying to build the plugin process with the webcore gtk files to always use gtk2 for plugins I found some headers includes that are not really needed.
Comment 1 Carlos Garcia Campos 2011-05-10 00:39:49 PDT
Created attachment 92926 [details]
Patch

This patch reduces the number of files needed to build the plugin process.
Comment 2 Martin Robinson 2011-05-10 08:31:47 PDT
Comment on attachment 92926 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=92926&action=review

Typically

> Source/WebCore/bindings/js/ScriptControllerGtk.cpp:37
> -#include "PluginView.h"
>  #include "runtime_root.h"
> +#include <WebCore/plugins/PluginView.h>
>  

Since this includes a header inside WebCore it doesn't seem right to use a system include here. Is this change necessary?

> Source/WebCore/plugins/gtk/PluginViewGtk.cpp:30
>  #include "config.h"
> -#include "PluginView.h"
> +#include <WebCore/plugins/PluginView.h>

It's definitely not usual to do that here.
Comment 3 Carlos Garcia Campos 2011-05-30 01:12:49 PDT
(In reply to comment #2)
> (From update of attachment 92926 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=92926&action=review
> 
> Typically
> 
> > Source/WebCore/bindings/js/ScriptControllerGtk.cpp:37
> > -#include "PluginView.h"
> >  #include "runtime_root.h"
> > +#include <WebCore/plugins/PluginView.h>
> >  
> 
> Since this includes a header inside WebCore it doesn't seem right to use a system include here. Is this change necessary?

Yes, because I'm building the plugin process with some of the webcore sources, so webcore and webkit2 cppflags are mixed. Maybe, we should create two libwebcoregtk, libwebcoregtk3 for webkit1 and webkit2 when building with gtk3 and libwecoregtk2 for webkit1 and webkit2 when building with gtk2 and for the plugin process unconditionally.

> > Source/WebCore/plugins/gtk/PluginViewGtk.cpp:30
> >  #include "config.h"
> > -#include "PluginView.h"
> > +#include <WebCore/plugins/PluginView.h>
> 
> It's definitely not usual to do that here.

Yes, same issue, I don't like it either.
Comment 4 Carlos Garcia Campos 2011-05-30 02:01:05 PDT
Created attachment 95331 [details]
Updated patch

ok, I've removed the webcore files from the patch until I find a better solution.
Comment 5 Carlos Garcia Campos 2011-05-30 07:13:46 PDT
Committed r87685: <http://trac.webkit.org/changeset/87685>