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);