+2007-12-14 Juan A. Suarez Romero <jasuarez@igalia.com>
+
+ Reviewed by Alp Toker.
+
+ http://bugs.webkit.org/show_bug.cgi?id=16042
+ [GTK] Eliminate webkit_init()
+
+ Move webkit initialization to WebView class init.
+
+ * WebCore.pro:
+
2007-12-17 Jon Honeycutt <jhoneycutt@apple.com>
Reviewed by Darin.
../WebCore/platform/gtk/ClipboardGtk.h \
../WebKit/gtk/WebView/webkit.h \
../WebKit/gtk/WebView/webkitdefines.h \
- ../WebKit/gtk/WebView/webkitglobal.h \
../WebKit/gtk/WebView/webkitnetworkrequest.h \
../WebKit/gtk/WebView/webkitprivate.h \
../WebKit/gtk/WebView/webkitsettings.h \
platform/image-decoders/bmp/BMPImageDecoder.cpp \
platform/image-decoders/ico/ICOImageDecoder.cpp \
platform/image-decoders/xbm/XBMImageDecoder.cpp \
- ../WebKit/gtk/WebView/webkitglobal.cpp \
../WebKit/gtk/WebView/webkitnetworkrequest.cpp \
../WebKit/gtk/WebView/webkitprivate.cpp \
../WebKit/gtk/WebView/webkitsettings.cpp \
+2007-12-14 Juan A. Suarez Romero <jasuarez@igalia.com>
+
+ Reviewed by Alp Toker.
+
+ http://bugs.webkit.org/show_bug.cgi?id=16042
+ [GTK] Eliminate webkit_init()
+
+ Move webkit initialization to WebView class init.
+
+ * WebView/headers.pri:
+ * WebView/webkit.h:
+ * WebView/webkitglobal.cpp: Removed.
+ * WebView/webkitglobal.h: Removed.
+ * WebView/webkitprivate.cpp:
+ (WebKit::webkit_init):
+ * WebView/webkitprivate.h:
+ * WebView/webkitwebframe.cpp:
+ * WebView/webkitwebview.cpp:
+
2007-12-17 Luca Bruno <lethalman88@gmail.com>
Reviewed by Alp Toker.
WEBKIT_API_HEADERS = $$PWD/webkit.h \
$$PWD/webkitdefines.h \
- $$PWD/webkitglobal.h \
$$PWD/webkitnetworkrequest.h \
$$PWD/webkitwebframe.h \
$$PWD/webkitwebview.h
#define __WEBKIT_H__
#include <webkitdefines.h>
-#include <webkitglobal.h>
#include <webkitnetworkrequest.h>
#include <webkitwebframe.h>
#include <webkitwebview.h>
+++ /dev/null
-/*
- * Copyright (C) 2007 Holger Hans Peter Freyther
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include "config.h"
-#include "webkitglobal.h"
-
-#include "Logging.h"
-#include "DatabaseTracker.h"
-
-#include <glib.h>
-
-extern "C" {
-void webkit_init(void)
-{
- WebCore::InitializeLoggingChannelsIfNecessary();
-
- WebCore::initializeThreading();
-
-#if ENABLE(DATABASE)
- // FIXME: It should be possible for client applications to override this default location
- gchar* databaseDirectory = g_build_filename(g_get_user_data_dir(), "webkit", "databases", NULL);
- WebCore::DatabaseTracker::tracker().setDatabasePath(databaseDirectory);
- g_free(databaseDirectory);
-#endif
-}
-}
+++ /dev/null
-/*
- * Copyright (C) 2007 Holger Hans Peter Freyther
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef WEBKIT_GLOBAL_H
-#define WEBKIT_GLOBAL_H
-
-#include "webkitdefines.h"
-
-G_BEGIN_DECLS
-
-WEBKIT_API void
-webkit_init (void);
-
-G_END_DECLS
-
-#endif
#include "webkitprivate.h"
#include "ChromeClientGtk.h"
+#include "DatabaseTracker.h"
#include "FrameLoader.h"
#include "FrameLoaderClientGtk.h"
+#include "Logging.h"
#include "NotImplemented.h"
using namespace WebCore;
WebKit::ChromeClient* client = static_cast<WebKit::ChromeClient*>(corePage->chrome()->client());
return client ? client->webView() : 0;
}
+
+}
+
+void webkit_init()
+{
+ static bool isInitialized = false;
+ if (isInitialized)
+ return;
+ isInitialized = true;
+
+ WebCore::initializeThreading();
+ WebCore::InitializeLoggingChannelsIfNecessary();
+
+#if ENABLE(DATABASE)
+ // FIXME: It should be possible for client applications to override this default location
+ gchar* databaseDirectory = g_build_filename(g_get_user_data_dir(), "webkit", "databases", NULL);
+ WebCore::DatabaseTracker::tracker().setDatabasePath(databaseDirectory);
+ g_free(databaseDirectory);
+#endif
}
}
extern "C" {
+ void webkit_init();
+
#define WEBKIT_WEB_VIEW_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), WEBKIT_TYPE_WEB_VIEW, WebKitWebViewPrivate))
typedef struct _WebKitWebViewPrivate WebKitWebViewPrivate;
struct _WebKitWebViewPrivate {
WebKitWebFrame* webkit_web_frame_init_with_web_view(WebKitWebView*, WebCore::HTMLFrameOwnerElement*);
-
// TODO: Move these to webkitwebframe.h once these functions are fully
// implemented and their API has been discussed.
static void webkit_web_frame_class_init(WebKitWebFrameClass* frameClass)
{
+ webkit_init();
+
g_type_class_add_private(frameClass, sizeof(WebKitWebFramePrivate));
/*
{
GtkBindingSet* binding_set;
+ webkit_init();
+
g_type_class_add_private(webViewClass, sizeof(WebKitWebViewPrivate));
/*
+2007-12-14 Juan A. Suarez Romero <jasuarez@igalia.com>
+
+ Reviewed by Alp Toker.
+
+ http://bugs.webkit.org/show_bug.cgi?id=16042
+ [GTK] Eliminate webkit_init()
+
+ Moving webkit initialization to WebView class init.
+
+ * DumpRenderTree/gtk/DumpRenderTree.cpp:
+ (main):
+ * GtkLauncher/main.c:
+ (main):
+
2007-12-17 Luca Bruno <lethalman88@gmail.com>
Reviewed by Alp Toker.
}
gtk_init(&argc, &argv);
- webkit_init();
GtkWidget* window = gtk_window_new(GTK_WINDOW_POPUP);
GtkContainer* container = GTK_CONTAINER(gtk_fixed_new());
main (int argc, char* argv[])
{
gtk_init (&argc, &argv);
- webkit_init ();
GtkWidget* vbox = gtk_vbox_new (FALSE, 0);
gtk_box_pack_start (GTK_BOX (vbox), create_toolbar (), FALSE, FALSE, 0);