[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da
kov at webkit.org
kov at webkit.org
Wed Dec 22 18:28:22 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 3ad41664fe5b530bf65aaa3b575902ad3be44512
Author: kov at webkit.org <kov at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Sat Dec 11 13:05:11 2010 +0000
2010-12-10 Gustavo Noronha Silva <gustavo.noronha at collabora.co.uk>
Reviewed by Martin Robinson.
[GTK] Split webkitprivate.{cpp,h} in more manageable chunks
https://bugs.webkit.org/show_bug.cgi?id=50698
Split private bits of several objects to their own private
headers, and to their implementation files.
* GNUmakefile.am:
* WebCoreSupport/ChromeClientGtk.cpp:
* WebCoreSupport/EditorClientGtk.cpp:
* WebCoreSupport/FrameLoaderClientGtk.cpp:
(WebKit::FrameLoaderClient::dispatchWillSendRequest):
* webkit/webkitdownload.cpp:
(webkit_download_set_response):
* webkit/webkitdownloadprivate.h: Added.
* webkit/webkithittestresult.cpp:
(WebKit::kit):
* webkit/webkithittestresultprivate.h: Added.
* webkit/webkitnetworkresponse.cpp:
(WebKit::core):
(WebKit::kitNew):
* webkit/webkitnetworkresponseprivate.h: Added.
* webkit/webkitprivate.cpp:
* webkit/webkitprivate.h:
* webkit/webkitsecurityorigin.cpp:
(webkit_security_origin_get_web_database):
(WebKit::core):
(WebKit::kit):
* webkit/webkitsecurityoriginprivate.h: Added.
* webkit/webkitviewportattributes.cpp:
* webkit/webkitviewportattributesprivate.h: Added.
* webkit/webkitwebbackforwardlist.cpp:
* webkit/webkitwebbackforwardlistprivate.h: Added.
* webkit/webkitwebdatabase.cpp:
* webkit/webkitwebframe.cpp:
(webkit_web_frame_get_network_response):
* webkit/webkitwebhistoryitem.cpp:
* webkit/webkitwebhistoryitemprivate.h: Added.
* webkit/webkitwebnavigationaction.cpp:
(WebKit::kit):
(WebKit::core):
* webkit/webkitwebnavigationactionprivate.h: Added.
* webkit/webkitwebpolicydecision.cpp:
* webkit/webkitwebpolicydecisionprivate.h: Added.
* webkit/webkitwebresource.cpp:
* webkit/webkitwebresourceprivate.h: Added.
* webkit/webkitwebsettings.cpp:
* webkit/webkitwebsettingsprivate.h: Added.
* webkit/webkitwebview.cpp:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73855 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/gtk/ChangeLog b/WebKit/gtk/ChangeLog
index dfc6daf..3fc3aa9 100644
--- a/WebKit/gtk/ChangeLog
+++ b/WebKit/gtk/ChangeLog
@@ -1,3 +1,56 @@
+2010-12-10 Gustavo Noronha Silva <gustavo.noronha at collabora.co.uk>
+
+ Reviewed by Martin Robinson.
+
+ [GTK] Split webkitprivate.{cpp,h} in more manageable chunks
+ https://bugs.webkit.org/show_bug.cgi?id=50698
+
+ Split private bits of several objects to their own private
+ headers, and to their implementation files.
+
+ * GNUmakefile.am:
+ * WebCoreSupport/ChromeClientGtk.cpp:
+ * WebCoreSupport/EditorClientGtk.cpp:
+ * WebCoreSupport/FrameLoaderClientGtk.cpp:
+ (WebKit::FrameLoaderClient::dispatchWillSendRequest):
+ * webkit/webkitdownload.cpp:
+ (webkit_download_set_response):
+ * webkit/webkitdownloadprivate.h: Added.
+ * webkit/webkithittestresult.cpp:
+ (WebKit::kit):
+ * webkit/webkithittestresultprivate.h: Added.
+ * webkit/webkitnetworkresponse.cpp:
+ (WebKit::core):
+ (WebKit::kitNew):
+ * webkit/webkitnetworkresponseprivate.h: Added.
+ * webkit/webkitprivate.cpp:
+ * webkit/webkitprivate.h:
+ * webkit/webkitsecurityorigin.cpp:
+ (webkit_security_origin_get_web_database):
+ (WebKit::core):
+ (WebKit::kit):
+ * webkit/webkitsecurityoriginprivate.h: Added.
+ * webkit/webkitviewportattributes.cpp:
+ * webkit/webkitviewportattributesprivate.h: Added.
+ * webkit/webkitwebbackforwardlist.cpp:
+ * webkit/webkitwebbackforwardlistprivate.h: Added.
+ * webkit/webkitwebdatabase.cpp:
+ * webkit/webkitwebframe.cpp:
+ (webkit_web_frame_get_network_response):
+ * webkit/webkitwebhistoryitem.cpp:
+ * webkit/webkitwebhistoryitemprivate.h: Added.
+ * webkit/webkitwebnavigationaction.cpp:
+ (WebKit::kit):
+ (WebKit::core):
+ * webkit/webkitwebnavigationactionprivate.h: Added.
+ * webkit/webkitwebpolicydecision.cpp:
+ * webkit/webkitwebpolicydecisionprivate.h: Added.
+ * webkit/webkitwebresource.cpp:
+ * webkit/webkitwebresourceprivate.h: Added.
+ * webkit/webkitwebsettings.cpp:
+ * webkit/webkitwebsettingsprivate.h: Added.
+ * webkit/webkitwebview.cpp:
+
2010-12-10 Alejandro G. Castro <alex at igalia.com>
Unreviewed, fixed small typo in the name of a function.
diff --git a/WebKit/gtk/GNUmakefile.am b/WebKit/gtk/GNUmakefile.am
index 7aa8083..f4007db 100644
--- a/WebKit/gtk/GNUmakefile.am
+++ b/WebKit/gtk/GNUmakefile.am
@@ -160,12 +160,12 @@ webkitgtk_sources += \
WebKit/gtk/WebCoreSupport/DocumentLoaderGtk.h \
WebKit/gtk/WebCoreSupport/DragClientGtk.cpp \
WebKit/gtk/WebCoreSupport/DragClientGtk.h \
+ WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp \
+ WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h \
WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp \
WebKit/gtk/WebCoreSupport/EditorClientGtk.h \
WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp \
WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h \
- WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp \
- WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h \
WebKit/gtk/WebCoreSupport/FrameNetworkingContextGtk.h \
WebKit/gtk/WebCoreSupport/FullscreenVideoController.cpp \
WebKit/gtk/WebCoreSupport/FullscreenVideoController.h \
@@ -176,26 +176,30 @@ webkitgtk_sources += \
WebKit/gtk/webkit/webkitapplicationcache.cpp \
WebKit/gtk/webkit/webkitdownload.cpp \
WebKit/gtk/webkit/webkiterror.cpp \
+ WebKit/gtk/webkit/webkitgeolocationpolicydecision.cpp \
WebKit/gtk/webkit/webkithittestresult.cpp \
WebKit/gtk/webkit/webkitnetworkrequest.cpp \
+ WebKit/gtk/webkit/webkitnetworkrequestprivate.h \
WebKit/gtk/webkit/webkitnetworkresponse.cpp \
+ WebKit/gtk/webkit/webkitnetworkresponseprivate.h \
WebKit/gtk/webkit/webkitprivate.cpp \
WebKit/gtk/webkit/webkitprivate.h \
+ WebKit/gtk/webkit/webkitsecurityorigin.cpp \
WebKit/gtk/webkit/webkitsoupauthdialog.c \
WebKit/gtk/webkit/webkitversion.cpp \
WebKit/gtk/webkit/webkitviewportattributes.cpp \
WebKit/gtk/webkit/webkitwebbackforwardlist.cpp \
+ WebKit/gtk/webkit/webkitwebdatabase.cpp \
WebKit/gtk/webkit/webkitwebdatasource.cpp \
WebKit/gtk/webkit/webkitwebframe.cpp \
WebKit/gtk/webkit/webkitwebframeprivate.h \
WebKit/gtk/webkit/webkitwebhistoryitem.cpp \
WebKit/gtk/webkit/webkitwebinspector.cpp \
+ WebKit/gtk/webkit/webkitwebinspectorprivate.h \
WebKit/gtk/webkit/webkitwebnavigationaction.cpp \
+ WebKit/gtk/webkit/webkitwebnavigationactionprivate.h \
WebKit/gtk/webkit/webkitwebpolicydecision.cpp \
- WebKit/gtk/webkit/webkitgeolocationpolicydecision.cpp \
WebKit/gtk/webkit/webkitwebresource.cpp \
- WebKit/gtk/webkit/webkitwebdatabase.cpp \
- WebKit/gtk/webkit/webkitsecurityorigin.cpp \
WebKit/gtk/webkit/webkitwebsettings.cpp \
WebKit/gtk/webkit/webkitwebview.cpp \
WebKit/gtk/webkit/webkitwebviewprivate.h \
diff --git a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp b/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
index f27294c..6d66e57 100644
--- a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
@@ -50,6 +50,8 @@
#include "webkitgeolocationpolicydecision.h"
#include "webkitnetworkrequest.h"
#include "webkitprivate.h"
+#include "webkitsecurityoriginprivate.h"
+#include "webkitviewportattributesprivate.h"
#include "webkitwebframeprivate.h"
#include "webkitwebview.h"
#include "webkitwebviewprivate.h"
diff --git a/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp b/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp
index 6e31b03..2a6cc87 100644
--- a/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp
@@ -46,6 +46,7 @@
#include "WindowsKeyboardCodes.h"
#include "webkitmarshal.h"
#include "webkitprivate.h"
+#include "webkitwebsettingsprivate.h"
#include "webkitwebviewprivate.h"
#include <wtf/text/CString.h>
diff --git a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
index 48ee134..4ec5fbb 100644
--- a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
@@ -62,11 +62,18 @@
#include "webkitnetworkrequest.h"
#include "webkitnetworkrequestprivate.h"
#include "webkitnetworkresponse.h"
+#include "webkitnetworkresponseprivate.h"
#include "webkitprivate.h"
+#include "webkitviewportattributes.h"
+#include "webkitviewportattributesprivate.h"
#include "webkitwebframe.h"
#include "webkitwebframeprivate.h"
#include "webkitwebnavigationaction.h"
+#include "webkitwebnavigationactionprivate.h"
#include "webkitwebpolicydecision.h"
+#include "webkitwebpolicydecisionprivate.h"
+#include "webkitwebresource.h"
+#include "webkitwebresourceprivate.h"
#include "webkitwebview.h"
#include "webkitwebviewprivate.h"
#include <JavaScriptCore/APICast.h>
@@ -309,7 +316,7 @@ void FrameLoaderClient::dispatchWillSendRequest(WebCore::DocumentLoader* loader,
if (redirectResponse.isNull())
static_cast<WebKit::DocumentLoader*>(loader)->increaseLoadCount(identifier);
else
- networkResponse = adoptPlatformRef(webkit_network_response_new_with_core_response(redirectResponse));
+ networkResponse = adoptPlatformRef(kitNew(redirectResponse));
WebKitWebView* webView = getViewFromFrame(m_frame);
GOwnPtr<gchar> identifierString(toString(identifier));
diff --git a/WebKit/gtk/webkit/webkitdownload.cpp b/WebKit/gtk/webkit/webkitdownload.cpp
index 2abd0be..5e590e1 100644
--- a/WebKit/gtk/webkit/webkitdownload.cpp
+++ b/WebKit/gtk/webkit/webkitdownload.cpp
@@ -29,10 +29,12 @@
#include "ResourceRequest.h"
#include "ResourceResponse.h"
#include "webkitdownload.h"
+#include "webkitdownloadprivate.h"
#include "webkitenumtypes.h"
#include "webkitmarshal.h"
#include "webkitnetworkrequestprivate.h"
#include "webkitnetworkresponse.h"
+#include "webkitnetworkresponseprivate.h"
#include "webkitprivate.h"
#include <wtf/text/CString.h>
@@ -594,7 +596,7 @@ WebKitNetworkResponse* webkit_download_get_network_response(WebKitDownload* down
static void webkit_download_set_response(WebKitDownload* download, const ResourceResponse& response)
{
WebKitDownloadPrivate* priv = download->priv;
- priv->networkResponse = webkit_network_response_new_with_core_response(response);
+ priv->networkResponse = kitNew(response);
if (!response.isNull() && !response.suggestedFilename().isEmpty())
webkit_download_set_suggested_filename(download, response.suggestedFilename().utf8().data());
diff --git a/WebKit/gtk/webkit/webkitdownloadprivate.h b/WebKit/gtk/webkit/webkitdownloadprivate.h
new file mode 100644
index 0000000..13cc2a4
--- /dev/null
+++ b/WebKit/gtk/webkit/webkitdownloadprivate.h
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2007, 2008, 2009 Holger Hans Peter Freyther
+ * Copyright (C) 2008 Jan Michael C. Alonzo
+ * Copyright (C) 2008 Collabora Ltd.
+ * Copyright (C) 2010 Igalia S.L.
+ *
+ * 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 webkitdownloadprivate_h
+#define webkitdownloadprivate_h
+
+#include "webkitdownload.h"
+
+extern "C" {
+
+WebKitDownload* webkit_download_new_with_handle(WebKitNetworkRequest*, WebCore::ResourceHandle*, const WebCore::ResourceResponse&);
+
+void webkit_download_set_suggested_filename(WebKitDownload*, const gchar* suggestedFilename);
+
+}
+
+#endif
diff --git a/WebKit/gtk/webkit/webkithittestresult.cpp b/WebKit/gtk/webkit/webkithittestresult.cpp
index 931289e..1937449 100644
--- a/WebKit/gtk/webkit/webkithittestresult.cpp
+++ b/WebKit/gtk/webkit/webkithittestresult.cpp
@@ -22,6 +22,8 @@
#include "webkithittestresult.h"
#include "GOwnPtr.h"
+#include "HitTestResult.h"
+#include "WebKitDOMBinding.h"
#include "WebKitDOMNode.h"
#include "webkitenumtypes.h"
#include "webkitprivate.h"
@@ -230,3 +232,48 @@ static void webkit_hit_test_result_init(WebKitHitTestResult* web_hit_test_result
{
web_hit_test_result->priv = WEBKIT_HIT_TEST_RESULT_GET_PRIVATE(web_hit_test_result);
}
+
+namespace WebKit {
+
+WebKitHitTestResult* kit(const WebCore::HitTestResult& result)
+{
+ guint context = WEBKIT_HIT_TEST_RESULT_CONTEXT_DOCUMENT;
+ GOwnPtr<char> linkURI(0);
+ GOwnPtr<char> imageURI(0);
+ GOwnPtr<char> mediaURI(0);
+ WebKitDOMNode* node = 0;
+
+ if (!result.absoluteLinkURL().isEmpty()) {
+ context |= WEBKIT_HIT_TEST_RESULT_CONTEXT_LINK;
+ linkURI.set(g_strdup(result.absoluteLinkURL().string().utf8().data()));
+ }
+
+ if (!result.absoluteImageURL().isEmpty()) {
+ context |= WEBKIT_HIT_TEST_RESULT_CONTEXT_IMAGE;
+ imageURI.set(g_strdup(result.absoluteImageURL().string().utf8().data()));
+ }
+
+ if (!result.absoluteMediaURL().isEmpty()) {
+ context |= WEBKIT_HIT_TEST_RESULT_CONTEXT_MEDIA;
+ mediaURI.set(g_strdup(result.absoluteMediaURL().string().utf8().data()));
+ }
+
+ if (result.isSelected())
+ context |= WEBKIT_HIT_TEST_RESULT_CONTEXT_SELECTION;
+
+ if (result.isContentEditable())
+ context |= WEBKIT_HIT_TEST_RESULT_CONTEXT_EDITABLE;
+
+ if (result.innerNonSharedNode())
+ node = kit(result.innerNonSharedNode());
+
+ return WEBKIT_HIT_TEST_RESULT(g_object_new(WEBKIT_TYPE_HIT_TEST_RESULT,
+ "link-uri", linkURI.get(),
+ "image-uri", imageURI.get(),
+ "media-uri", mediaURI.get(),
+ "context", context,
+ "inner-node", node,
+ NULL));
+}
+
+}
diff --git a/WebKit/gtk/webkit/webkithittestresultprivate.h b/WebKit/gtk/webkit/webkithittestresultprivate.h
new file mode 100644
index 0000000..237ac27
--- /dev/null
+++ b/WebKit/gtk/webkit/webkithittestresultprivate.h
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2007, 2008, 2009 Holger Hans Peter Freyther
+ * Copyright (C) 2008 Jan Michael C. Alonzo
+ * Copyright (C) 2008 Collabora Ltd.
+ * Copyright (C) 2010 Igalia S.L.
+ *
+ * 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 webkithittestresultprivate_h
+#define webkithittestresultprivate_h
+
+#include "HitTestResult.h"
+#include "webkithittestresult.h"
+
+namespace WebKit {
+
+WebKitHitTestResult* kit(const WebCore::HitTestResult&);
+
+}
+
+#endif
diff --git a/WebKit/gtk/webkit/webkitnetworkresponse.cpp b/WebKit/gtk/webkit/webkitnetworkresponse.cpp
index 0aca6d8..da29212 100644
--- a/WebKit/gtk/webkit/webkitnetworkresponse.cpp
+++ b/WebKit/gtk/webkit/webkitnetworkresponse.cpp
@@ -158,16 +158,6 @@ static void webkit_network_response_init(WebKitNetworkResponse* response)
response->priv = WEBKIT_NETWORK_RESPONSE_GET_PRIVATE(response);
}
-// for internal use only
-WebKitNetworkResponse* webkit_network_response_new_with_core_response(const WebCore::ResourceResponse& resourceResponse)
-{
- PlatformRefPtr<SoupMessage> soupMessage(adoptPlatformRef(resourceResponse.toSoupMessage()));
- if (soupMessage)
- return WEBKIT_NETWORK_RESPONSE(g_object_new(WEBKIT_TYPE_NETWORK_RESPONSE, "message", soupMessage.get(), NULL));
-
- return WEBKIT_NETWORK_RESPONSE(g_object_new(WEBKIT_TYPE_NETWORK_RESPONSE, "uri", resourceResponse.url().string().utf8().data(), NULL));
-}
-
/**
* webkit_network_response_new:
* @uri: an URI
@@ -259,3 +249,25 @@ SoupMessage* webkit_network_response_get_message(WebKitNetworkResponse* response
return priv->message;
}
+
+namespace WebKit {
+
+WebCore::ResourceResponse core(WebKitNetworkResponse* response)
+{
+ SoupMessage* soupMessage = webkit_network_response_get_message(response);
+ if (soupMessage)
+ return WebCore::ResourceResponse(soupMessage);
+
+ return WebCore::ResourceResponse();
+}
+
+WebKitNetworkResponse* kitNew(const WebCore::ResourceResponse& resourceResponse)
+{
+ PlatformRefPtr<SoupMessage> soupMessage(adoptPlatformRef(resourceResponse.toSoupMessage()));
+ if (soupMessage)
+ return WEBKIT_NETWORK_RESPONSE(g_object_new(WEBKIT_TYPE_NETWORK_RESPONSE, "message", soupMessage.get(), NULL));
+
+ return WEBKIT_NETWORK_RESPONSE(g_object_new(WEBKIT_TYPE_NETWORK_RESPONSE, "uri", resourceResponse.url().string().utf8().data(), NULL));
+}
+
+}
diff --git a/WebKit/gtk/webkit/webkitnetworkresponseprivate.h b/WebKit/gtk/webkit/webkitnetworkresponseprivate.h
new file mode 100644
index 0000000..ab38a50
--- /dev/null
+++ b/WebKit/gtk/webkit/webkitnetworkresponseprivate.h
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2007, 2008, 2009 Holger Hans Peter Freyther
+ * Copyright (C) 2008 Jan Michael C. Alonzo
+ * Copyright (C) 2008 Collabora Ltd.
+ * Copyright (C) 2010 Igalia S.L.
+ *
+ * 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 webkitnetworkresponseprivate_h
+#define webkitnetworkresponseprivate_h
+
+#include "ResourceResponse.h"
+
+namespace WebKit {
+
+WebCore::ResourceResponse core(WebKitNetworkResponse*);
+WebKitNetworkResponse* kitNew(const WebCore::ResourceResponse&);
+
+}
+
+#endif
diff --git a/WebKit/gtk/webkit/webkitprivate.cpp b/WebKit/gtk/webkit/webkitprivate.cpp
index 3325c32..4652031 100644
--- a/WebKit/gtk/webkit/webkitprivate.cpp
+++ b/WebKit/gtk/webkit/webkitprivate.cpp
@@ -44,7 +44,6 @@
#include "ResourceHandleInternal.h"
#include "ResourceResponse.h"
#include "TextEncodingRegistry.h"
-#include "WebKitDOMBinding.h"
#include "webkitnetworkresponse.h"
#include "webkitsoupauthdialog.h"
#include "webkitversion.h"
@@ -65,71 +64,11 @@ using namespace WebCore;
namespace WebKit {
-WebKitWebNavigationReason kit(WebCore::NavigationType type)
-{
- return (WebKitWebNavigationReason)type;
-}
-
-WebCore::NavigationType core(WebKitWebNavigationReason type)
-{
- return static_cast<WebCore::NavigationType>(type);
-}
-
-WebCore::ResourceResponse core(WebKitNetworkResponse* response)
-{
- SoupMessage* soupMessage = webkit_network_response_get_message(response);
- if (soupMessage)
- return ResourceResponse(soupMessage);
-
- return ResourceResponse();
-}
-
WebCore::EditingBehaviorType core(WebKitEditingBehavior type)
{
return (WebCore::EditingBehaviorType)type;
}
-WebKitHitTestResult* kit(const WebCore::HitTestResult& result)
-{
- guint context = WEBKIT_HIT_TEST_RESULT_CONTEXT_DOCUMENT;
- GOwnPtr<char> linkURI(0);
- GOwnPtr<char> imageURI(0);
- GOwnPtr<char> mediaURI(0);
- WebKitDOMNode* node = 0;
-
- if (!result.absoluteLinkURL().isEmpty()) {
- context |= WEBKIT_HIT_TEST_RESULT_CONTEXT_LINK;
- linkURI.set(g_strdup(result.absoluteLinkURL().string().utf8().data()));
- }
-
- if (!result.absoluteImageURL().isEmpty()) {
- context |= WEBKIT_HIT_TEST_RESULT_CONTEXT_IMAGE;
- imageURI.set(g_strdup(result.absoluteImageURL().string().utf8().data()));
- }
-
- if (!result.absoluteMediaURL().isEmpty()) {
- context |= WEBKIT_HIT_TEST_RESULT_CONTEXT_MEDIA;
- mediaURI.set(g_strdup(result.absoluteMediaURL().string().utf8().data()));
- }
-
- if (result.isSelected())
- context |= WEBKIT_HIT_TEST_RESULT_CONTEXT_SELECTION;
-
- if (result.isContentEditable())
- context |= WEBKIT_HIT_TEST_RESULT_CONTEXT_EDITABLE;
-
- if (result.innerNonSharedNode())
- node = kit(result.innerNonSharedNode());
-
- return WEBKIT_HIT_TEST_RESULT(g_object_new(WEBKIT_TYPE_HIT_TEST_RESULT,
- "link-uri", linkURI.get(),
- "image-uri", imageURI.get(),
- "media-uri", mediaURI.get(),
- "context", context,
- "inner-node", node,
- NULL));
-}
-
PasteboardHelperGtk* pasteboardHelperInstance()
{
static PasteboardHelperGtk* helper = new PasteboardHelperGtk();
diff --git a/WebKit/gtk/webkit/webkitprivate.h b/WebKit/gtk/webkit/webkitprivate.h
index 7d16c67..cf2e9d6 100644
--- a/WebKit/gtk/webkit/webkitprivate.h
+++ b/WebKit/gtk/webkit/webkitprivate.h
@@ -30,30 +30,20 @@
*/
#include <webkit/webkitdefines.h>
-#include <webkit/webkitdownload.h>
-#include <webkit/webkithittestresult.h>
#include <webkit/webkitnetworkrequest.h>
-#include <webkit/webkitviewportattributes.h>
#include <webkit/webkitwebview.h>
#include <webkit/webkitwebdatasource.h>
#include <webkit/webkitwebframe.h>
-#include <webkit/webkitwebpolicydecision.h>
-#include <webkit/webkitwebnavigationaction.h>
-#include <webkit/webkitwebresource.h>
#include <webkit/webkitwebsettings.h>
#include <webkit/webkitwebwindowfeatures.h>
-#include <webkit/webkitwebbackforwardlist.h>
#include <webkit/webkitnetworkrequest.h>
#include <webkit/webkitsecurityorigin.h>
-#include "ArchiveResource.h"
-#include "BackForwardListImpl.h"
#include "DataObjectGtk.h"
#include "DragActions.h"
#include "Frame.h"
#include "GOwnPtr.h"
#include "Geolocation.h"
-#include "HistoryItem.h"
#include "IntPoint.h"
#include "IntRect.h"
#include "FrameLoaderClient.h"
@@ -62,9 +52,7 @@
#include "PlatformString.h"
#include "ResourceHandle.h"
#include "ResourceRequest.h"
-#include "ResourceResponse.h"
#include "WindowFeatures.h"
-#include "SecurityOrigin.h"
#include "Settings.h"
#include <enchant.h>
#include <wtf/OwnPtr.h>
@@ -74,30 +62,13 @@
#include <glib.h>
#include <libsoup/soup.h>
-class DownloadClient;
-
namespace WebKit {
class DocumentLoader;
class PasteboardHelperGtk;
- WebCore::HistoryItem* core(WebKitWebHistoryItem*);
- WebKitWebHistoryItem* kit(PassRefPtr<WebCore::HistoryItem>);
-
- WebCore::BackForwardListImpl* core(WebKitWebBackForwardList*);
-
- WebKitWebNavigationReason kit(WebCore::NavigationType type);
- WebCore::NavigationType core(WebKitWebNavigationReason reason);
-
- WebCore::ResourceResponse core(WebKitNetworkResponse* response);
-
WebCore::EditingBehaviorType core(WebKitEditingBehavior type);
- WebKitSecurityOrigin* kit(WebCore::SecurityOrigin*);
- WebCore::SecurityOrigin* core(WebKitSecurityOrigin*);
-
- WebKitHitTestResult* kit(const WebCore::HitTestResult&);
-
PasteboardHelperGtk* pasteboardHelperInstance();
}
@@ -107,118 +78,21 @@ extern "C" {
#define WEBKIT_PARAM_READABLE ((GParamFlags)(G_PARAM_READABLE|G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB))
#define WEBKIT_PARAM_READWRITE ((GParamFlags)(G_PARAM_READWRITE|G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB))
-#define WEBKIT_SECURITY_ORIGIN_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), WEBKIT_TYPE_SECURITY_ORIGIN, WebKitSecurityOriginPrivate))
- struct _WebKitSecurityOriginPrivate {
- RefPtr<WebCore::SecurityOrigin> coreOrigin;
- gchar* protocol;
- gchar* host;
- GHashTable* webDatabases;
-
- gboolean disposed;
- };
-
- struct _WebKitViewportAttributesPrivate {
- WebKitWebView* webView;
- int deviceWidth;
- int deviceHeight;
- int availableWidth;
- int availableHeight;
- int desktopWidth;
- int deviceDPI;
-
- int width;
- int height;
- float initialScaleFactor;
- float minimumScaleFactor;
- float maximumScaleFactor;
- float devicePixelRatio;
- gboolean userScalable;
- gboolean isValid;
- };
-
WTF::String
webkitUserAgent();
- // WebKitWebHistoryItem private
- WebKitWebHistoryItem*
- webkit_web_history_item_new_with_core_item(PassRefPtr<WebCore::HistoryItem> historyItem);
-
- WEBKIT_API G_CONST_RETURN gchar*
- webkit_web_history_item_get_target(WebKitWebHistoryItem*);
-
- WEBKIT_API gboolean
- webkit_web_history_item_is_target_item(WebKitWebHistoryItem*);
-
- WEBKIT_API GList*
- webkit_web_history_item_get_children(WebKitWebHistoryItem*);
- // end WebKitWebHistoryItem private
-
- // WebKitWebResource private
- #define WEBKIT_WEB_RESOURCE_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), WEBKIT_TYPE_WEB_RESOURCE, WebKitWebResourcePrivate))
- struct _WebKitWebResourcePrivate {
- WebCore::ArchiveResource* resource;
-
- gchar* uri;
- gchar* mimeType;
- gchar* textEncoding;
- gchar* frameName;
-
- GString* data;
- };
- WebKitWebResource*
- webkit_web_resource_new_with_core_resource(PassRefPtr<WebCore::ArchiveResource>);
-
- void
- webkit_web_resource_init_with_core_resource(WebKitWebResource*, PassRefPtr<WebCore::ArchiveResource>);
-
- // end WebKitWebResource private
-
-
WebKitWebWindowFeatures*
webkit_web_window_features_new_from_core_features (const WebCore::WindowFeatures& features);
- WebKitDownload*
- webkit_download_new_with_handle(WebKitNetworkRequest* request, WebCore::ResourceHandle* handle, const WebCore::ResourceResponse& response);
-
- void
- webkit_download_set_suggested_filename(WebKitDownload* download, const gchar* suggestedFilename);
-
- WebKitWebPolicyDecision*
- webkit_web_policy_decision_new (WebKitWebFrame*, WebCore::FramePolicyFunction);
-
- void
- webkit_web_policy_decision_cancel (WebKitWebPolicyDecision* decision);
-
-
- WebKitNetworkResponse*
- webkit_network_response_new_with_core_response(const WebCore::ResourceResponse& resourceResponse);
-
WebKitGeolocationPolicyDecision*
webkit_geolocation_policy_decision_new(WebKitWebFrame*, WebCore::Geolocation*);
- // FIXME: Move these to webkitwebframe.h once their API has been discussed.
-
- WEBKIT_API void
- webkit_web_settings_add_extra_plugin_directory (WebKitWebView *web_view, const gchar* directory);
-
- GSList*
- webkit_web_settings_get_enchant_dicts(WebKitWebView* web_view);
-
- GHashTable*
- webkit_history_items(void);
-
WEBKIT_API void
webkit_application_cache_set_maximum_size(unsigned long long size);
// WebKitWebDataSource private
WebKitWebDataSource*
webkit_web_data_source_new_with_loader(PassRefPtr<WebKit::DocumentLoader>);
-
- WEBKIT_API WebKitWebDatabase *
- webkit_security_origin_get_web_database(WebKitSecurityOrigin* securityOrigin, const char* databaseName);
-
- // WebKitViewportAttributes private
- void webkitViewportAttributesRecompute(WebKitViewportAttributes*);
}
#endif
diff --git a/WebKit/gtk/webkit/webkitsecurityorigin.cpp b/WebKit/gtk/webkit/webkitsecurityorigin.cpp
index 92d19e7..5152ed7 100644
--- a/WebKit/gtk/webkit/webkitsecurityorigin.cpp
+++ b/WebKit/gtk/webkit/webkitsecurityorigin.cpp
@@ -18,15 +18,14 @@
*/
#include "config.h"
-#include "webkitwebdatabase.h"
+#include "webkitsecurityorigin.h"
-#include "webkitprivate.h"
-
-#include "PlatformString.h"
#include "DatabaseTracker.h"
-#include <wtf/text/CString.h>
-
+#include "PlatformString.h"
+#include "webkitprivate.h"
+#include "webkitsecurityoriginprivate.h"
#include <glib/gi18n-lib.h>
+#include <wtf/text/CString.h>
/**
* SECTION:webkitsecurityorigin
@@ -379,46 +378,48 @@ GList* webkit_security_origin_get_all_web_databases(WebKitSecurityOrigin* securi
return databases;
}
-WebKitSecurityOrigin* WebKit::kit(WebCore::SecurityOrigin* coreOrigin)
+WebKitWebDatabase* webkit_security_origin_get_web_database(WebKitSecurityOrigin* securityOrigin, const gchar* databaseName)
{
- ASSERT(coreOrigin);
+ g_return_val_if_fail(WEBKIT_IS_SECURITY_ORIGIN(securityOrigin), NULL);
- GHashTable* table = webkit_security_origins();
- WebKitSecurityOrigin* origin = (WebKitSecurityOrigin*) g_hash_table_lookup(table, coreOrigin);
+ WebKitSecurityOriginPrivate* priv = securityOrigin->priv;
+ GHashTable* databaseHash = priv->webDatabases;
+ WebKitWebDatabase* database = (WebKitWebDatabase*) g_hash_table_lookup(databaseHash, databaseName);
- if (!origin) {
- origin = WEBKIT_SECURITY_ORIGIN(g_object_new(WEBKIT_TYPE_SECURITY_ORIGIN, NULL));
- origin->priv->coreOrigin = coreOrigin;
- g_hash_table_insert(table, coreOrigin, origin);
+ if (!database) {
+ database = WEBKIT_WEB_DATABASE(g_object_new(WEBKIT_TYPE_WEB_DATABASE,
+ "security-origin", securityOrigin,
+ "name", databaseName,
+ NULL));
+ g_hash_table_insert(databaseHash, g_strdup(databaseName), database);
}
- return origin;
+ return database;
}
+namespace WebKit {
-WebCore::SecurityOrigin* WebKit::core(WebKitSecurityOrigin* securityOrigin)
+WebCore::SecurityOrigin* core(WebKitSecurityOrigin* securityOrigin)
{
ASSERT(securityOrigin);
return securityOrigin->priv->coreOrigin.get();
}
-WebKitWebDatabase* webkit_security_origin_get_web_database(WebKitSecurityOrigin* securityOrigin, const gchar* databaseName)
+WebKitSecurityOrigin* kit(WebCore::SecurityOrigin* coreOrigin)
{
- g_return_val_if_fail(WEBKIT_IS_SECURITY_ORIGIN(securityOrigin), NULL);
+ ASSERT(coreOrigin);
- WebKitSecurityOriginPrivate* priv = securityOrigin->priv;
- GHashTable* databaseHash = priv->webDatabases;
- WebKitWebDatabase* database = (WebKitWebDatabase*) g_hash_table_lookup(databaseHash, databaseName);
+ GHashTable* table = webkit_security_origins();
+ WebKitSecurityOrigin* origin = (WebKitSecurityOrigin*) g_hash_table_lookup(table, coreOrigin);
- if (!database) {
- database = WEBKIT_WEB_DATABASE(g_object_new(WEBKIT_TYPE_WEB_DATABASE,
- "security-origin", securityOrigin,
- "name", databaseName,
- NULL));
- g_hash_table_insert(databaseHash, g_strdup(databaseName), database);
+ if (!origin) {
+ origin = WEBKIT_SECURITY_ORIGIN(g_object_new(WEBKIT_TYPE_SECURITY_ORIGIN, NULL));
+ origin->priv->coreOrigin = coreOrigin;
+ g_hash_table_insert(table, coreOrigin, origin);
}
- return database;
+ return origin;
}
+}
diff --git a/WebKit/gtk/webkit/webkitsecurityoriginprivate.h b/WebKit/gtk/webkit/webkitsecurityoriginprivate.h
new file mode 100644
index 0000000..ced262f
--- /dev/null
+++ b/WebKit/gtk/webkit/webkitsecurityoriginprivate.h
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2007, 2008, 2009 Holger Hans Peter Freyther
+ * Copyright (C) 2008 Jan Michael C. Alonzo
+ * Copyright (C) 2008 Collabora Ltd.
+ * Copyright (C) 2010 Igalia S.L.
+ *
+ * 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 webkitsecurityoriginprivate_h
+#define webkitnavigationactionprivate_h
+
+#include "SecurityOrigin.h"
+#include "webkitsecurityorigin.h"
+
+namespace WebKit {
+
+WebKitSecurityOrigin* kit(WebCore::SecurityOrigin*);
+WebCore::SecurityOrigin* core(WebKitSecurityOrigin*);
+
+}
+
+extern "C" {
+
+#define WEBKIT_SECURITY_ORIGIN_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), WEBKIT_TYPE_SECURITY_ORIGIN, WebKitSecurityOriginPrivate))
+struct _WebKitSecurityOriginPrivate {
+ RefPtr<WebCore::SecurityOrigin> coreOrigin;
+ gchar* protocol;
+ gchar* host;
+ GHashTable* webDatabases;
+
+ gboolean disposed;
+};
+
+WEBKIT_API WebKitWebDatabase* webkit_security_origin_get_web_database(WebKitSecurityOrigin*, const char*);
+
+}
+
+#endif
diff --git a/WebKit/gtk/webkit/webkitviewportattributes.cpp b/WebKit/gtk/webkit/webkitviewportattributes.cpp
index 1508843..98401d5 100644
--- a/WebKit/gtk/webkit/webkitviewportattributes.cpp
+++ b/WebKit/gtk/webkit/webkitviewportattributes.cpp
@@ -23,8 +23,8 @@
#include "Chrome.h"
#include "webkitprivate.h"
+#include "webkitviewportattributesprivate.h"
#include "webkitwebviewprivate.h"
-
#include <glib/gi18n-lib.h>
/**
diff --git a/WebKit/gtk/webkit/webkitviewportattributesprivate.h b/WebKit/gtk/webkit/webkitviewportattributesprivate.h
new file mode 100644
index 0000000..11cb668
--- /dev/null
+++ b/WebKit/gtk/webkit/webkitviewportattributesprivate.h
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2007, 2008, 2009 Holger Hans Peter Freyther
+ * Copyright (C) 2008 Jan Michael C. Alonzo
+ * Copyright (C) 2008 Collabora Ltd.
+ * Copyright (C) 2010 Igalia S.L.
+ *
+ * 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 webkitviewportattributesprivate_h
+#define webkitnavigationactionprivate_h
+
+#include <webkit/webkitviewportattributes.h>
+
+extern "C" {
+
+struct _WebKitViewportAttributesPrivate {
+ WebKitWebView* webView;
+ int deviceWidth;
+ int deviceHeight;
+ int availableWidth;
+ int availableHeight;
+ int desktopWidth;
+ int deviceDPI;
+
+ int width;
+ int height;
+ float initialScaleFactor;
+ float minimumScaleFactor;
+ float maximumScaleFactor;
+ float devicePixelRatio;
+ gboolean userScalable;
+ gboolean isValid;
+};
+
+
+void webkitViewportAttributesRecompute(WebKitViewportAttributes*);
+
+}
+
+#endif
diff --git a/WebKit/gtk/webkit/webkitwebbackforwardlist.cpp b/WebKit/gtk/webkit/webkitwebbackforwardlist.cpp
index 541b0e2..caedca3 100644
--- a/WebKit/gtk/webkit/webkitwebbackforwardlist.cpp
+++ b/WebKit/gtk/webkit/webkitwebbackforwardlist.cpp
@@ -24,7 +24,9 @@
#include "BackForwardListImpl.h"
#include "HistoryItem.h"
#include "webkitprivate.h"
+#include "webkitwebbackforwardlistprivate.h"
#include "webkitwebhistoryitem.h"
+#include "webkitwebhistoryitemprivate.h"
#include "webkitwebview.h"
#include "webkitwebviewprivate.h"
#include <glib.h>
diff --git a/WebKit/gtk/webkit/webkitwebbackforwardlistprivate.h b/WebKit/gtk/webkit/webkitwebbackforwardlistprivate.h
new file mode 100644
index 0000000..79424c0
--- /dev/null
+++ b/WebKit/gtk/webkit/webkitwebbackforwardlistprivate.h
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2007, 2008, 2009 Holger Hans Peter Freyther
+ * Copyright (C) 2008 Jan Michael C. Alonzo
+ * Copyright (C) 2008 Collabora Ltd.
+ * Copyright (C) 2010 Igalia S.L.
+ *
+ * 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 webkitwebbackforwardlistprivate_h
+#define webkitwebbackforwardlistprivate_h
+
+#include "BackForwardListImpl.h"
+
+namespace WebKit {
+
+WebCore::BackForwardListImpl* core(WebKitWebBackForwardList*);
+
+}
+
+#endif
diff --git a/WebKit/gtk/webkit/webkitwebdatabase.cpp b/WebKit/gtk/webkit/webkitwebdatabase.cpp
index 680d9c9..6de78fc 100644
--- a/WebKit/gtk/webkit/webkitwebdatabase.cpp
+++ b/WebKit/gtk/webkit/webkitwebdatabase.cpp
@@ -20,13 +20,12 @@
#include "config.h"
#include "webkitwebdatabase.h"
-#include "webkitprivate.h"
-
#include "DatabaseDetails.h"
#include "DatabaseTracker.h"
-#include <wtf/text/CString.h>
-
+#include "webkitprivate.h"
+#include "webkitsecurityoriginprivate.h"
#include <glib/gi18n-lib.h>
+#include <wtf/text/CString.h>
/**
* SECTION:webkitwebdatabase
diff --git a/WebKit/gtk/webkit/webkitwebframe.cpp b/WebKit/gtk/webkit/webkitwebframe.cpp
index 2fa25b5..9152746 100644
--- a/WebKit/gtk/webkit/webkitwebframe.cpp
+++ b/WebKit/gtk/webkit/webkitwebframe.cpp
@@ -52,8 +52,10 @@
#include "SubstituteData.h"
#include "webkitenumtypes.h"
#include "webkitnetworkrequestprivate.h"
+#include "webkitnetworkresponseprivate.h"
#include "webkitmarshal.h"
#include "webkitprivate.h"
+#include "webkitsecurityoriginprivate.h"
#include "webkitwebframeprivate.h"
#include "webkitwebview.h"
#include "webkitwebviewprivate.h"
@@ -966,7 +968,7 @@ WebKitNetworkResponse* webkit_web_frame_get_network_response(WebKitWebFrame* fra
if (!loader)
return NULL;
- return webkit_network_response_new_with_core_response(loader->response());
+ return kitNew(loader->response());
}
namespace WebKit {
diff --git a/WebKit/gtk/webkit/webkitwebhistoryitem.cpp b/WebKit/gtk/webkit/webkitwebhistoryitem.cpp
index ce30704..a6d712b 100644
--- a/WebKit/gtk/webkit/webkitwebhistoryitem.cpp
+++ b/WebKit/gtk/webkit/webkitwebhistoryitem.cpp
@@ -23,11 +23,11 @@
#include "webkitwebhistoryitem.h"
#include "webkitprivate.h"
-#include <glib.h>
-#include <glib/gi18n-lib.h>
-
#include "HistoryItem.h"
#include "PlatformString.h"
+#include "webkitwebhistoryitemprivate.h"
+#include <glib.h>
+#include <glib/gi18n-lib.h>
#include <wtf/text/CString.h>
/**
diff --git a/WebKit/gtk/webkit/webkitwebhistoryitemprivate.h b/WebKit/gtk/webkit/webkitwebhistoryitemprivate.h
new file mode 100644
index 0000000..22b50ee
--- /dev/null
+++ b/WebKit/gtk/webkit/webkitwebhistoryitemprivate.h
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2007, 2008, 2009 Holger Hans Peter Freyther
+ * Copyright (C) 2008 Jan Michael C. Alonzo
+ * Copyright (C) 2008 Collabora Ltd.
+ * Copyright (C) 2010 Igalia S.L.
+ *
+ * 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 webkitwebhistoryitemprivate_h
+#define webkitwebhistoryitemprivate_h
+
+#include "HistoryItem.h"
+
+namespace WebKit {
+
+WebCore::HistoryItem* core(WebKitWebHistoryItem*);
+WebKitWebHistoryItem* kit(PassRefPtr<WebCore::HistoryItem>);
+
+}
+
+extern "C" {
+
+GHashTable* webkit_history_items();
+
+WebKitWebHistoryItem* webkit_web_history_item_new_with_core_item(PassRefPtr<WebCore::HistoryItem>);
+
+WEBKIT_API G_CONST_RETURN gchar* webkit_web_history_item_get_target(WebKitWebHistoryItem*);
+
+WEBKIT_API gboolean webkit_web_history_item_is_target_item(WebKitWebHistoryItem*);
+
+WEBKIT_API GList* webkit_web_history_item_get_children(WebKitWebHistoryItem*);
+
+}
+
+#endif
diff --git a/WebKit/gtk/webkit/webkitwebnavigationaction.cpp b/WebKit/gtk/webkit/webkitwebnavigationaction.cpp
index ce5dd92..a2ca73a 100644
--- a/WebKit/gtk/webkit/webkitwebnavigationaction.cpp
+++ b/WebKit/gtk/webkit/webkitwebnavigationaction.cpp
@@ -369,3 +369,17 @@ static void webkit_web_navigation_action_set_target_frame(WebKitWebNavigationAct
navigationAction->priv->targetFrame = g_strdup(targetFrame);
g_object_notify(G_OBJECT(navigationAction), "target-frame");
}
+
+namespace WebKit {
+
+WebKitWebNavigationReason kit(WebCore::NavigationType type)
+{
+ return (WebKitWebNavigationReason)type;
+}
+
+WebCore::NavigationType core(WebKitWebNavigationReason type)
+{
+ return static_cast<WebCore::NavigationType>(type);
+}
+
+}
diff --git a/WebKit/gtk/webkit/webkitwebnavigationactionprivate.h b/WebKit/gtk/webkit/webkitwebnavigationactionprivate.h
new file mode 100644
index 0000000..a8bc5ca
--- /dev/null
+++ b/WebKit/gtk/webkit/webkitwebnavigationactionprivate.h
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2007, 2008, 2009 Holger Hans Peter Freyther
+ * Copyright (C) 2008 Jan Michael C. Alonzo
+ * Copyright (C) 2008 Collabora Ltd.
+ * Copyright (C) 2010 Igalia S.L.
+ *
+ * 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 webkitwebnavigationactionprivate_h
+#define webkitnavigationactionprivate_h
+
+#include <webkit/webkitwebnavigationaction.h>
+
+namespace WebKit {
+
+WebKitWebNavigationReason kit(WebCore::NavigationType);
+WebCore::NavigationType core(WebKitWebNavigationReason);
+
+}
+
+#endif
diff --git a/WebKit/gtk/webkit/webkitwebpolicydecision.cpp b/WebKit/gtk/webkit/webkitwebpolicydecision.cpp
index 6661a99..f093b39 100644
--- a/WebKit/gtk/webkit/webkitwebpolicydecision.cpp
+++ b/WebKit/gtk/webkit/webkitwebpolicydecision.cpp
@@ -18,12 +18,12 @@
*/
#include "config.h"
-
#include "webkitwebpolicydecision.h"
#include "FrameLoaderTypes.h"
#include "webkitprivate.h"
#include "webkitwebframeprivate.h"
+#include "webkitwebpolicydecisionprivate.h"
using namespace WebKit;
using namespace WebCore;
diff --git a/WebKit/gtk/webkit/webkitwebpolicydecisionprivate.h b/WebKit/gtk/webkit/webkitwebpolicydecisionprivate.h
new file mode 100644
index 0000000..2d264ab
--- /dev/null
+++ b/WebKit/gtk/webkit/webkitwebpolicydecisionprivate.h
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2007, 2008, 2009 Holger Hans Peter Freyther
+ * Copyright (C) 2008 Jan Michael C. Alonzo
+ * Copyright (C) 2008 Collabora Ltd.
+ * Copyright (C) 2010 Igalia S.L.
+ *
+ * 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 webkitwebpolicydecisionprivate_h
+#define webkitwebpolicydecisionprivate_h
+
+#include "webkitwebpolicydecision.h"
+
+extern "C" {
+
+WebKitWebPolicyDecision* webkit_web_policy_decision_new(WebKitWebFrame*, WebCore::FramePolicyFunction);
+
+void webkit_web_policy_decision_cancel(WebKitWebPolicyDecision*);
+
+}
+
+#endif
diff --git a/WebKit/gtk/webkit/webkitwebresource.cpp b/WebKit/gtk/webkit/webkitwebresource.cpp
index fb0acfc..9e97ab9 100644
--- a/WebKit/gtk/webkit/webkitwebresource.cpp
+++ b/WebKit/gtk/webkit/webkitwebresource.cpp
@@ -18,9 +18,7 @@
*/
#include "config.h"
-
#include "webkitwebresource.h"
-#include "webkitprivate.h"
#include "ArchiveResource.h"
#include "KURL.h"
@@ -28,7 +26,9 @@
#include "SharedBuffer.h"
#include "webkitenumtypes.h"
#include "webkitmarshal.h"
-#include "wtf/Assertions.h"
+#include "webkitprivate.h"
+#include "webkitwebresourceprivate.h"
+#include <wtf/Assertions.h>
#include <wtf/text/CString.h>
#include <glib.h>
diff --git a/WebKit/gtk/webkit/webkitwebresourceprivate.h b/WebKit/gtk/webkit/webkitwebresourceprivate.h
new file mode 100644
index 0000000..25d51b6
--- /dev/null
+++ b/WebKit/gtk/webkit/webkitwebresourceprivate.h
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2007, 2008, 2009 Holger Hans Peter Freyther
+ * Copyright (C) 2008 Jan Michael C. Alonzo
+ * Copyright (C) 2008 Collabora Ltd.
+ * Copyright (C) 2010 Igalia S.L.
+ *
+ * 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 webkitwebresourceprivate_h
+#define webkitwebresourceprivate_h
+
+#include "ArchiveResource.h"
+#include "webkitwebresource.h"
+
+extern "C" {
+
+#define WEBKIT_WEB_RESOURCE_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), WEBKIT_TYPE_WEB_RESOURCE, WebKitWebResourcePrivate))
+struct _WebKitWebResourcePrivate {
+ WebCore::ArchiveResource* resource;
+
+ gchar* uri;
+ gchar* mimeType;
+ gchar* textEncoding;
+ gchar* frameName;
+
+ GString* data;
+};
+
+WebKitWebResource* webkit_web_resource_new_with_core_resource(PassRefPtr<WebCore::ArchiveResource>);
+
+void webkit_web_resource_init_with_core_resource(WebKitWebResource*, PassRefPtr<WebCore::ArchiveResource>);
+
+}
+
+#endif
diff --git a/WebKit/gtk/webkit/webkitwebsettings.cpp b/WebKit/gtk/webkit/webkitwebsettings.cpp
index 3f65a3d..66ebb01 100644
--- a/WebKit/gtk/webkit/webkitwebsettings.cpp
+++ b/WebKit/gtk/webkit/webkitwebsettings.cpp
@@ -26,16 +26,15 @@
#include "config.h"
#include "webkitwebsettings.h"
+#include "FileSystem.h"
+#include "Language.h"
+#include "PluginDatabase.h"
#include "webkitenumtypes.h"
#include "webkitprivate.h"
#include "webkitversion.h"
-
-#include "FileSystem.h"
-#include "PluginDatabase.h"
-#include "Language.h"
+#include "webkitwebsettingsprivate.h"
#include <wtf/text/CString.h>
#include <wtf/text/StringConcatenate.h>
-
#include <glib/gi18n-lib.h>
#if OS(UNIX)
#include <sys/utsname.h>
diff --git a/WebKit/gtk/webkit/webkitwebsettingsprivate.h b/WebKit/gtk/webkit/webkitwebsettingsprivate.h
new file mode 100644
index 0000000..e848a08
--- /dev/null
+++ b/WebKit/gtk/webkit/webkitwebsettingsprivate.h
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2007, 2008, 2009 Holger Hans Peter Freyther
+ * Copyright (C) 2008 Jan Michael C. Alonzo
+ * Copyright (C) 2008 Collabora Ltd.
+ * Copyright (C) 2010 Igalia S.L.
+ *
+ * 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 webkitwebsettingsprivate_h
+#define webkitwebsettingsprivate_h
+
+#include "webkitwebsettings.h"
+
+extern "C" {
+
+WEBKIT_API void webkit_web_settings_add_extra_plugin_directory(WebKitWebView*, const gchar* directory);
+
+GSList* webkit_web_settings_get_enchant_dicts(WebKitWebView*);
+
+}
+
+#endif
diff --git a/WebKit/gtk/webkit/webkitwebview.cpp b/WebKit/gtk/webkit/webkitwebview.cpp
index 22dbdcc..93e53be 100644
--- a/WebKit/gtk/webkit/webkitwebview.cpp
+++ b/WebKit/gtk/webkit/webkitwebview.cpp
@@ -78,17 +78,24 @@
#include "Scrollbar.h"
#include "webkit/WebKitDOMDocumentPrivate.h"
#include "webkitdownload.h"
+#include "webkitdownloadprivate.h"
#include "webkitenumtypes.h"
#include "webkitgeolocationpolicydecision.h"
+#include "webkithittestresultprivate.h"
#include "webkitmarshal.h"
#include "webkitnetworkrequest.h"
#include "webkitnetworkresponse.h"
#include "webkitprivate.h"
+#include "webkitviewportattributes.h"
+#include "webkitviewportattributesprivate.h"
#include "webkitwebbackforwardlist.h"
#include "webkitwebframeprivate.h"
#include "webkitwebhistoryitem.h"
+#include "webkitwebhistoryitemprivate.h"
#include "webkitwebinspector.h"
#include "webkitwebinspectorprivate.h"
+#include "webkitwebpolicydecision.h"
+#include "webkitwebresource.h"
#include "webkitwebviewprivate.h"
#include <gdk/gdkkeysyms.h>
#include <glib/gi18n-lib.h>
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list