Title: [99156] trunk/Tools
Revision
99156
Author
carlo...@webkit.org
Date
2011-11-03 02:59:32 -0700 (Thu, 03 Nov 2011)

Log Message

[GTK] Remove GtkLauncher2
https://bugs.webkit.org/show_bug.cgi?id=71449

Reviewed by Martin Robinson.

GtkLauncher2 is the GtkLauncher code compiled with webkit2. This
made sense when we wanted to implement the exactly same wk1 API
for wk2. Now the code would require an ifdef for most the api, so
it's better to remove GtkLauncher2 and port MiniBrowser to the new
GTK+ API.

* GNUmakefile.am:
* GtkLauncher/main.c:
(notifyProgressCb):
(closeWebViewCb):
(createBrowser):
(addWebSettingsGroupToContext):
(main):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (99155 => 99156)


--- trunk/Tools/ChangeLog	2011-11-03 09:56:33 UTC (rev 99155)
+++ trunk/Tools/ChangeLog	2011-11-03 09:59:32 UTC (rev 99156)
@@ -1,3 +1,24 @@
+2011-11-03  Carlos Garcia Campos  <cgar...@igalia.com>
+
+        [GTK] Remove GtkLauncher2
+        https://bugs.webkit.org/show_bug.cgi?id=71449
+
+        Reviewed by Martin Robinson.
+
+        GtkLauncher2 is the GtkLauncher code compiled with webkit2. This
+        made sense when we wanted to implement the exactly same wk1 API
+        for wk2. Now the code would require an ifdef for most the api, so
+        it's better to remove GtkLauncher2 and port MiniBrowser to the new
+        GTK+ API.
+
+        * GNUmakefile.am:
+        * GtkLauncher/main.c:
+        (notifyProgressCb):
+        (closeWebViewCb):
+        (createBrowser):
+        (addWebSettingsGroupToContext):
+        (main):
+
 2011-11-02  Philippe Normand  <pnorm...@igalia.com>
 
         [GTK] [DRT] ttf-liberation fonts moved to a new location (in Debian)

Modified: trunk/Tools/GNUmakefile.am (99155 => 99156)


--- trunk/Tools/GNUmakefile.am	2011-11-03 09:56:33 UTC (rev 99155)
+++ trunk/Tools/GNUmakefile.am	2011-11-03 09:59:32 UTC (rev 99156)
@@ -2,36 +2,7 @@
 	Programs/DumpRenderTree \
 	Programs/GtkLauncher
 
-if ENABLE_WEBKIT2
-noinst_PROGRAMS += \
-	Programs/GtkLauncher2
-
-# FIXME: should this dependency be automatically identified by
-# automake somehow?
-Tools/GtkLauncher/main.c: $(GENSOURCES_WEBKIT2)/webkit2gtk/webkit2/WebKitEnumTypes.h $(GENSOURCES_WEBKIT2)/webkit2gtk/webkit2/WebKitEnumTypes.cpp
-endif
-
 # GtkLauncher
-gtklauncher_sources = \
-	Tools/GtkLauncher/main.c
-
-gtklauncher_cflags = \
-	-fno-strict-aliasing \
-	$(global_cflags) \
-	$(GTK_CFLAGS) \
-	$(LIBSOUP_CFLAGS)
-
-gtklauncher_ldadd = \
-	libjavascriptcoregtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
-	$(GTK_LIBS) \
-	$(GLIB_LIBS) \
-	$(LIBSOUP_LIBS) \
-	$(WINMM_LIBS)
-
-gtklauncher_ldflags = \
-	-no-fast-install \
-	-no-install
-
 Programs_GtkLauncher_CPPFLAGS = \
 	-I$(srcdir)/Source/WebKit/gtk \
 	-I$(srcdir)/Source/WebCore/platform/network/soup/cache/ \
@@ -41,49 +12,27 @@
 	$(_javascript_core_cppflags)
 
 Programs_GtkLauncher_SOURCES = \
-	$(gtklauncher_sources)
+	Tools/GtkLauncher/main.c
 
 Programs_GtkLauncher_CFLAGS = \
 	-ansi \
-	$(gtklauncher_cflags)
+	-fno-strict-aliasing \
+	$(global_cflags) \
+	$(GTK_CFLAGS) \
+	$(LIBSOUP_CFLAGS)
 
 Programs_GtkLauncher_LDADD = \
 	libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
-	$(gtklauncher_ldadd)
+	libjavascriptcoregtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
+	$(GTK_LIBS) \
+	$(GLIB_LIBS) \
+	$(LIBSOUP_LIBS) \
+	$(WINMM_LIBS)
 
 Programs_GtkLauncher_LDFLAGS = \
-	$(gtklauncher_ldflags)
+	-no-fast-install \
+	-no-install
 
-if ENABLE_WEBKIT2
-Programs_GtkLauncher2_CPPFLAGS = \
-	-I$(srcdir)/Source \
-	-I$(top_builddir)/DerivedSources/WebKit2/include \
-	-I$(srcdir)/Source/WebKit2/UIProcess/API/gtk \
-	-I$(top_builddir)/Source/WebKit2/UIProcess/API/gtk \
-	-I$(srcdir)/Source/WebKit/gtk \
-	-I$(top_builddir)/DerivedSources/WebKit2/webkit2gtk \
-	-I$(top_builddir)/DerivedSources/WebKit2/webkit2gtk/include \
-	-I$(top_builddir)/Source/WebKit/gtk \
-	-I$(top_builddir)/DerivedSources \
-	$(global_cppflags) \
-	$(_javascript_core_cppflags)
-
-Programs_GtkLauncher2_SOURCES = \
-	$(gtklauncher_sources)
-
-Programs_GtkLauncher2_CFLAGS = \
-	-DWEBKIT2=\"1\" \
-	$(gtklauncher_cflags)
-
-Programs_GtkLauncher2_LDADD = \
-	libwebkit2gtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
-	$(gtklauncher_ldadd)
-
-Programs_GtkLauncher2_LDFLAGS = \
-	$(gtklauncher_ldflags)
-
-endif
-
 # libWebCoreInternals
 # We must split off the window.internals implementation into a separate
 # convenience library because it requires a different include path order
@@ -219,11 +168,6 @@
 	Programs/DumpRenderTree \
 	Programs/GtkLauncher
 
-if ENABLE_WEBKIT2
-CLEANFILES += \
-	Programs/GtkLauncher2
-endif
-
 if TARGET_X11
 
 # Build TestNetscapePlugin only for X11

Modified: trunk/Tools/GtkLauncher/main.c (99155 => 99156)


--- trunk/Tools/GtkLauncher/main.c	2011-11-03 09:56:33 UTC (rev 99155)
+++ trunk/Tools/GtkLauncher/main.c	2011-11-03 09:59:32 UTC (rev 99156)
@@ -29,11 +29,7 @@
 #include <gtk/gtk.h>
 #include <stdlib.h>
 #include <string.h>
-#ifdef WEBKIT2
-#include <webkit2/webkit2.h>
-#else
 #include <webkit/webkit.h>
-#endif
 
 static gint windowCount = 0;
 
@@ -47,7 +43,6 @@
     webkit_web_view_load_uri(webView, uri);
 }
 
-#ifndef WEBKIT2
 static void updateTitle(GtkWindow* window, WebKitWebView* webView)
 {
     GString *string = g_string_new(webkit_web_view_get_title(webView));
@@ -89,7 +84,6 @@
 {
     updateTitle(GTK_WINDOW(window), webView);
 }
-#endif
 
 static void destroyCb(GtkWidget* widget, GtkWidget* window)
 {
@@ -107,7 +101,6 @@
     webkit_web_view_go_forward(webView);
 }
 
-#ifndef WEBKIT2
 static WebKitWebView*
 createWebViewCb(WebKitWebView* webView, WebKitWebFrame* web_frame, GtkWidget* window)
 {
@@ -129,7 +122,6 @@
     gtk_widget_destroy(window);
     return TRUE;
 }
-#endif
 
 static GtkWidget* createBrowser(GtkWidget* window, GtkWidget* uriEntry, GtkWidget* statusbar, WebKitWebView* webView)
 {
@@ -138,7 +130,6 @@
 
     gtk_container_add(GTK_CONTAINER(scrolledWindow), GTK_WIDGET(webView));
 
-#ifndef WEBKIT2
     g_signal_connect(webView, "notify::title", G_CALLBACK(notifyTitleCb), window);
     g_signal_connect(webView, "notify::load-status", G_CALLBACK(notifyLoadStatusCb), uriEntry);
     g_signal_connect(webView, "notify::progress", G_CALLBACK(notifyProgressCb), window);
@@ -146,7 +137,6 @@
     g_signal_connect(webView, "create-web-view", G_CALLBACK(createWebViewCb), window);
     g_signal_connect(webView, "web-view-ready", G_CALLBACK(webViewReadyCb), window);
     g_signal_connect(webView, "close-web-view", G_CALLBACK(closeWebViewCb), window);
-#endif
 
     return scrolledWindow;
 }
@@ -249,7 +239,6 @@
     return fileURL;
 }
 
-#ifndef WEBKIT2
 static gboolean parseOptionEntryCallback(const gchar *optionNameFull, const gchar *value, WebKitWebSettings *webSettings, GError **error)
 {
     if (strlen(optionNameFull) <= 2) {
@@ -377,13 +366,10 @@
 
     return TRUE;
 }
-#endif
 
 int main(int argc, char* argv[])
 {
-#ifndef WEBKIT2
     WebKitWebSettings *webkitSettings = 0;
-#endif
     const gchar **uriArguments = 0;
     const GOptionEntry commandLineOptions[] =
     {
@@ -396,13 +382,12 @@
     GOptionContext *context = g_option_context_new(0);
     g_option_context_add_main_entries(context, commandLineOptions, 0);
     g_option_context_add_group(context, gtk_get_option_group(TRUE));
-#ifndef WEBKIT2
+
     webkitSettings = webkit_web_settings_new();
     if (!addWebSettingsGroupToContext(context, webkitSettings)) {
         g_object_unref(webkitSettings);
         webkitSettings = 0;
     }
-#endif
 
     GError *error = 0;
     if (!g_option_context_parse(context, &argc, &argv, &error)) {
@@ -414,7 +399,6 @@
     }
     g_option_context_free(context);
 
-#ifndef WEBKIT2
 #ifdef SOUP_TYPE_PROXY_RESOLVER_DEFAULT
     soup_session_add_feature_by_type(webkit_get_default_session(), SOUP_TYPE_PROXY_RESOLVER_DEFAULT);
 #else
@@ -425,17 +409,14 @@
         soup_uri_free(proxyUri);
     }
 #endif
-#endif
 
     WebKitWebView *webView;
     GtkWidget *main_window = createWindow(&webView);
 
-#ifndef WEBKIT2
     if (webkitSettings) {
         webkit_web_view_set_settings(WEBKIT_WEB_VIEW(webView), webkitSettings);
         g_object_unref(webkitSettings);
     }
-#endif
 
     const gchar *uri = (uriArguments ? uriArguments[0] : "http://www.google.com/");
     gchar *fileURL = filenameToURL(uri);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to