Bug 60536

Summary: [GTK] Remove some unneeded header includes
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: WebKit2Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal Keywords: Gtk
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
Patch
mrobinson: review-
Updated patch mrobinson: review+

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>