WebKit Bugzilla
Attachment 26036 Details for
Bug 16562
: [gtk] Implement WebPolicyDelegate methods
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
reworked patch, with changes proposed by Xan
policy-delegates.diff (text/plain), 40.42 KB, created by
Gustavo Noronha (kov)
on 2008-12-15 16:37:45 PST
(
hide
)
Description:
reworked patch, with changes proposed by Xan
Filename:
MIME Type:
Creator:
Gustavo Noronha (kov)
Created:
2008-12-15 16:37:45 PST
Size:
40.42 KB
patch
obsolete
>diff --git a/GNUmakefile.am b/GNUmakefile.am >index 46c6ce1..7aec061 100644 >--- a/GNUmakefile.am >+++ b/GNUmakefile.am >@@ -308,6 +308,8 @@ webkitgtk_h_api += \ > WebKit/gtk/webkit/webkitwebframe.h \ > WebKit/gtk/webkit/webkitwebhistoryitem.h \ > WebKit/gtk/webkit/webkitwebinspector.h \ >+ WebKit/gtk/webkit/webkitwebnavigationaction.h \ >+ WebKit/gtk/webkit/webkitwebpolicydecision.h \ > WebKit/gtk/webkit/webkitwebsettings.h \ > WebKit/gtk/webkit/webkitwebwindowfeatures.h \ > WebKit/gtk/webkit/webkitwebview.h >@@ -341,6 +343,8 @@ webkitgtk_sources += \ > WebKit/gtk/webkit/webkitwebframe.cpp \ > WebKit/gtk/webkit/webkitwebhistoryitem.cpp \ > WebKit/gtk/webkit/webkitwebinspector.cpp \ >+ WebKit/gtk/webkit/webkitwebnavigationaction.cpp \ >+ WebKit/gtk/webkit/webkitwebpolicydecision.cpp \ > WebKit/gtk/webkit/webkitwebsettings.cpp \ > WebKit/gtk/webkit/webkitwebview.cpp \ > WebKit/gtk/webkit/webkitwebwindowfeatures.cpp >diff --git a/WebKit/gtk/ChangeLog b/WebKit/gtk/ChangeLog >index bf5ee7e..d3dcc73 100644 >--- a/WebKit/gtk/ChangeLog >+++ b/WebKit/gtk/ChangeLog >@@ -1,3 +1,57 @@ >+2008-09-25 Marco Barisione <marco.barisione@collabora.co.uk> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ http://bugs.webkit.org/show_bug.cgi?id=16562 >+ [gtk] Implement WebPolicyDelegate methods >+ >+ Original work by Pierre-Luc Beaudoin. >+ >+ This implements the delegates methods of WebPolicyDelegate. >+ Since Gtk+/C doesn't have delegate methods, they are replaced with >+ signals. >+ >+ A new object WebKitWebPolicyDecision allow the browser to delay its >+ response in certain cases. WebKitWebNavigationAction contains the >+ information about what caused a navigation request. >+ >+ * WebCoreSupport/FrameLoaderClientGtk.cpp: >+ (WebKit::FrameLoaderClient::FrameLoaderClient): >+ (WebKit::FrameLoaderClient::~FrameLoaderClient): >+ (WebKit::FrameLoaderClient::dispatchDecidePolicyForMIMEType): >+ (WebKit::FrameLoaderClient::dispatchDecidePolicyForNewWindowAction): >+ (WebKit::FrameLoaderClient::dispatchDecidePolicyForNavigationAction): >+ (WebKit::FrameLoaderClient::cancelPolicyCheck): >+ (WebKit::FrameLoaderClient::canShowMIMEType): >+ * WebCoreSupport/FrameLoaderClientGtk.h: >+ * webkit/webkit.h: >+ * webkit/webkitdefines.h: >+ * webkit/webkitprivate.cpp: >+ (WebKit::kit): >+ (WebKit::core): >+ * webkit/webkitprivate.h: >+ * webkit/webkitwebnavigationaction.cpp: Added. >+ (_WebKitWebNavigationActionPrivate::): >+ (_WebKitWebNavigationActionPrivate::webkit_web_navigation_action_get_property): >+ (_WebKitWebNavigationActionPrivate::webkit_web_navigation_action_set_property): >+ (_WebKitWebNavigationActionPrivate::webkit_web_navigation_action_init): >+ (_WebKitWebNavigationActionPrivate::webkit_web_navigation_action_finalize): >+ (_WebKitWebNavigationActionPrivate::webkit_web_navigation_action_class_init): >+ (_WebKitWebNavigationActionPrivate::webkit_web_navigation_action_get_reason): >+ (_WebKitWebNavigationActionPrivate::webkit_web_navigation_action_set_reason): >+ (_WebKitWebNavigationActionPrivate::webkit_web_navigation_action_get_original_uri): >+ (_WebKitWebNavigationActionPrivate::webkit_web_navigation_action_set_original_uri): >+ * webkit/webkitwebnavigationaction.h: Added. >+ * webkit/webkitwebpolicydecision.cpp: Added. >+ (_WebKitWebPolicyDecisionPrivate::webkit_web_policy_decision_class_init): >+ (_WebKitWebPolicyDecisionPrivate::webkit_web_policy_decision_init): >+ (_WebKitWebPolicyDecisionPrivate::webkit_web_policy_decision_new): >+ (_WebKitWebPolicyDecisionPrivate::webkit_web_policy_decision_use): >+ (_WebKitWebPolicyDecisionPrivate::webkit_web_policy_decision_ignore): >+ (_WebKitWebPolicyDecisionPrivate::webkit_web_policy_decision_download): >+ (_WebKitWebPolicyDecisionPrivate::webkit_web_policy_decision_cancel): >+ * webkit/webkitwebpolicydecision.h: Added. >+ > 2008-12-13 Holger Hans Peter Freyther <zecke@selfish.org> > > Reviewed by Cameron Zwarich. >diff --git a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp >index 4c59d01..f51edd2 100644 >--- a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp >+++ b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp >@@ -46,6 +46,8 @@ > #include "webkitwebview.h" > #include "webkitnetworkrequest.h" > #include "webkitwebframe.h" >+#include "webkitwebnavigationaction.h" >+#include "webkitwebpolicydecision.h" > #include "webkitprivate.h" > > #include <JavaScriptCore/APICast.h> >@@ -63,10 +65,17 @@ FrameLoaderClient::FrameLoaderClient(WebKitWebFrame* frame) > , m_userAgent("") > , m_pluginView(0) > , m_hasSentResponseToPlugin(false) >+ , m_policyDecision(0) > { > ASSERT(m_frame); > } > >+FrameLoaderClient::~FrameLoaderClient() >+{ >+ if (m_policyDecision) >+ g_object_unref(m_policyDecision); >+} >+ > static String agentPlatform() > { > #ifdef GDK_WINDOWING_X11 >@@ -243,16 +252,35 @@ void FrameLoaderClient::dispatchDidReceiveResponse(DocumentLoader*, unsigned lon > m_response = response; > } > >-void FrameLoaderClient::dispatchDecidePolicyForMIMEType(FramePolicyFunction policyFunction, const String&, const ResourceRequest&) >+void FrameLoaderClient::dispatchDecidePolicyForMIMEType(FramePolicyFunction policyFunction, const String& mimeType, const ResourceRequest& resourceRequest) > { >- // FIXME: we need to call directly here (comment copied from Qt version) > ASSERT(policyFunction); > if (!policyFunction) > return; >- (core(m_frame)->loader()->*policyFunction)(PolicyUse); >+ >+ WebKitWebView* page = getViewFromFrame(m_frame); >+ WebKitNetworkRequest* request = webkit_network_request_new(resourceRequest.url().string().utf8().data()); >+ >+ WebKitWebPolicyDecision* policyDecision = webkit_web_policy_decision_new(m_frame, policyFunction); >+ if (m_policyDecision) >+ g_object_unref(m_policyDecision); >+ m_policyDecision = policyDecision; >+ >+ gboolean isHandled = false; >+ g_signal_emit_by_name(page, "mime-type-policy-decision-requested", m_frame, request, mimeType.utf8().data(), policyDecision, &isHandled); >+ >+ g_object_unref(request); >+ >+ if (isHandled) >+ return; >+ >+ if (canShowMIMEType(mimeType)) >+ webkit_web_policy_decision_use (policyDecision); >+ else >+ webkit_web_policy_decision_download (policyDecision); > } > >-void FrameLoaderClient::dispatchDecidePolicyForNewWindowAction(FramePolicyFunction policyFunction, const NavigationAction&, const ResourceRequest&, PassRefPtr<FormState>, const String&) >+void FrameLoaderClient::dispatchDecidePolicyForNewWindowAction(FramePolicyFunction policyFunction, const NavigationAction& action, const ResourceRequest& resourceRequest, PassRefPtr<FormState>, const String& s) > { > ASSERT(policyFunction); > if (!policyFunction) >@@ -271,17 +299,39 @@ void FrameLoaderClient::dispatchDecidePolicyForNavigationAction(FramePolicyFunct > WebKitWebView* webView = getViewFromFrame(m_frame); > WebKitNetworkRequest* request = webkit_network_request_new(resourceRequest.url().string().utf8().data()); > WebKitNavigationResponse response; >- >+ /* We still support the deprecated navigation-requested signal, if the >+ * application doesn't ignore the navigation then the new signal is >+ * emitted. >+ * navigation-policy-decision-requested must be emitted after >+ * navigation-requested as the policy decision can be async. */ > g_signal_emit_by_name(webView, "navigation-requested", m_frame, request, &response); > >- g_object_unref(request); >- > if (response == WEBKIT_NAVIGATION_RESPONSE_IGNORE) { > (core(m_frame)->loader()->*policyFunction)(PolicyIgnore); >+ g_object_unref(request); > return; > } > >- (core(m_frame)->loader()->*policyFunction)(PolicyUse); >+ WebKitWebPolicyDecision* policyDecision = webkit_web_policy_decision_new(m_frame, policyFunction); >+ if (m_policyDecision) >+ g_object_unref(m_policyDecision); >+ m_policyDecision = policyDecision; >+ >+ // TODO: use action.event(). >+ gpointer navigationAction = g_object_new(WEBKIT_TYPE_WEB_NAVIGATION_ACTION, >+ "reason", kit(action.type()), >+ "original-uri", action.url().string().utf8().data(), >+ NULL); >+ >+ gboolean isHandled = false; >+ g_signal_emit_by_name(webView, "navigation-policy-decision-requested", m_frame, request, navigationAction, policyDecision, &isHandled); >+ >+ g_object_unref(navigationAction); >+ g_object_unref(request); >+ >+ // FIXME Implement default behavior when we can query the backend what protocols it supports >+ if (!isHandled) >+ webkit_web_policy_decision_use(m_policyDecision); > } > > Widget* FrameLoaderClient::createPlugin(const IntSize& pluginSize, Element* element, const KURL& url, const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType, bool loadManually) >@@ -550,7 +600,9 @@ void FrameLoaderClient::dispatchShow() > > void FrameLoaderClient::cancelPolicyCheck() > { >- notImplemented(); >+ //FIXME Add support for more than one policy decision at once >+ if (m_policyDecision) >+ webkit_web_policy_decision_cancel(m_policyDecision); > } > > void FrameLoaderClient::dispatchDidLoadMainResource(DocumentLoader*) >@@ -579,10 +631,10 @@ bool FrameLoaderClient::canHandleRequest(const ResourceRequest&) const > return true; > } > >-bool FrameLoaderClient::canShowMIMEType(const String&) const >+bool FrameLoaderClient::canShowMIMEType(const String& type) const > { >- notImplemented(); >- return true; >+ return MIMETypeRegistry::isSupportedImageMIMEType(type) || MIMETypeRegistry::isSupportedNonImageMIMEType(type) || >+ PluginDatabase::installedPlugins()->isMIMETypeRegistered(type); > } > > bool FrameLoaderClient::representationExistsForURLScheme(const String&) const >diff --git a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h >index 0738a29..bcdb297 100644 >--- a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h >+++ b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h >@@ -33,6 +33,7 @@ > #include "FrameLoaderClient.h" > #include "ResourceResponse.h" > #include "PluginView.h" >+#include "webkitwebpolicydecision.h" > > typedef struct _WebKitWebFrame WebKitWebFrame; > >@@ -41,7 +42,7 @@ namespace WebKit { > class FrameLoaderClient : public WebCore::FrameLoaderClient { > public: > FrameLoaderClient(WebKitWebFrame*); >- virtual ~FrameLoaderClient() { } >+ virtual ~FrameLoaderClient(); > virtual void frameLoaderDestroyed(); > > WebKitWebFrame* webFrame() const { return m_frame; } >@@ -170,6 +171,7 @@ namespace WebKit { > WebKitWebFrame* m_frame; > WebCore::ResourceResponse m_response; > WebCore::String m_userAgent; >+ WebKitWebPolicyDecision* m_policyDecision; > > // Plugin view to redirect data to > WebCore::PluginView* m_pluginView; >diff --git a/WebKit/gtk/webkit/webkit.h b/WebKit/gtk/webkit/webkit.h >index 8621e46..8c868a2 100644 >--- a/WebKit/gtk/webkit/webkit.h >+++ b/WebKit/gtk/webkit/webkit.h >@@ -1,5 +1,6 @@ > /* > * Copyright (C) 2007 Alp Toker <alp@atoker.com> >+ * Copyright (C) 2008 Collabora Ltd. > * > * This library is free software; you can redistribute it and/or > * modify it under the terms of the GNU Library General Public >@@ -30,6 +31,8 @@ > #include <webkit/webkitwebview.h> > #include <webkit/webkitwebbackforwardlist.h> > #include <webkit/webkitwebhistoryitem.h> >+#include <webkit/webkitwebpolicydecision.h> >+#include <webkit/webkitwebnavigationaction.h> > #include <webkit/webkitenumtypes.h> > > #endif /* __WEBKIT_H__ */ >diff --git a/WebKit/gtk/webkit/webkitdefines.h b/WebKit/gtk/webkit/webkitdefines.h >index b674e9f..f94e710 100644 >--- a/WebKit/gtk/webkit/webkitdefines.h >+++ b/WebKit/gtk/webkit/webkitdefines.h >@@ -1,5 +1,6 @@ > /* > * Copyright (C) 2007 Holger Hans Peter Freyther >+ * Copyright (C) 2008 Collabora Ltd. > * > * This library is free software; you can redistribute it and/or > * modify it under the terms of the GNU Library General Public >@@ -52,6 +53,9 @@ typedef struct _WebKitWebHistoryItemClass WebKitWebHistoryItemClass; > typedef struct _WebKitWebFrame WebKitWebFrame; > typedef struct _WebKitWebFrameClass WebKitWebFrameClass; > >+typedef struct _WebKitWebPolicyDecision WebKitWebPolicyDecision; >+typedef struct _WebKitWebPolicyDecisionClass WebKitWebPolicyDecisionClass; >+ > typedef struct _WebKitWebSettings WebKitWebSettings; > typedef struct _WebKitWebSettingsClass WebKitWebSettingsClass; > >diff --git a/WebKit/gtk/webkit/webkitprivate.cpp b/WebKit/gtk/webkit/webkitprivate.cpp >index 07c8174..2283c8e 100644 >--- a/WebKit/gtk/webkit/webkitprivate.cpp >+++ b/WebKit/gtk/webkit/webkitprivate.cpp >@@ -1,5 +1,6 @@ > /* > * Copyright (C) 2007 Holger Hans Peter Freyther >+ * Copyright (C) 2008 Collabora Ltd. > * > * This library is free software; you can redistribute it and/or > * modify it under the terms of the GNU Library General Public >@@ -83,6 +84,16 @@ WebKitWebView* kit(WebCore::Page* corePage) > return client ? client->webView() : 0; > } > >+WebKitWebNavigationReason kit(WebCore::NavigationType type) >+{ >+ return (WebKitWebNavigationReason)type; >+} >+ >+WebCore::NavigationType core(WebKitWebNavigationReason type) >+{ >+ return (WebCore::NavigationType)type; >+} >+ > } /** end namespace WebKit */ > > void webkit_init() >diff --git a/WebKit/gtk/webkit/webkitprivate.h b/WebKit/gtk/webkit/webkitprivate.h >index 280cab2..8f734f1 100644 >--- a/WebKit/gtk/webkit/webkitprivate.h >+++ b/WebKit/gtk/webkit/webkitprivate.h >@@ -1,6 +1,7 @@ > /* > * Copyright (C) 2007, 2008 Holger Hans Peter Freyther > * Copyright (C) 2008 Jan Michael C. Alonzo >+ * Copyright (C) 2008 Collabora Ltd. > * > * This library is free software; you can redistribute it and/or > * modify it under the terms of the GNU Library General Public >@@ -29,6 +30,8 @@ > #include <webkit/webkitdefines.h> > #include <webkit/webkitwebview.h> > #include <webkit/webkitwebframe.h> >+#include <webkit/webkitwebpolicydecision.h> >+#include <webkit/webkitwebnavigationaction.h> > #include <webkit/webkitwebsettings.h> > #include <webkit/webkitwebwindowfeatures.h> > #include <webkit/webkitwebbackforwardlist.h> >@@ -57,6 +60,9 @@ namespace WebKit { > WebKitWebHistoryItem* kit(WebCore::HistoryItem*); > > WebCore::BackForwardList* core(WebKitWebBackForwardList*); >+ >+ WebKitWebNavigationReason kit(WebCore::NavigationType type); >+ WebCore::NavigationType core(WebKitWebNavigationReason reason); > } > > extern "C" { >@@ -130,6 +136,12 @@ extern "C" { > void > webkit_web_view_notify_ready (WebKitWebView* web_view); > >+ WebKitWebPolicyDecision* >+ webkit_web_policy_decision_new (WebKitWebFrame*, WebCore::FramePolicyFunction); >+ >+ void >+ webkit_web_policy_decision_cancel (WebKitWebPolicyDecision* decision); >+ > // FIXME: Move these to webkitwebframe.h once their API has been discussed. > > WEBKIT_API GSList* >diff --git a/WebKit/gtk/webkit/webkitwebnavigationaction.cpp b/WebKit/gtk/webkit/webkitwebnavigationaction.cpp >new file mode 100644 >index 0000000..e21d402 >--- /dev/null >+++ b/WebKit/gtk/webkit/webkitwebnavigationaction.cpp >@@ -0,0 +1,195 @@ >+/* >+ * Copyright (C) 2008 Collabora Ltd. >+ * >+ * 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 "webkitwebnavigationaction.h" >+#include "webkitprivate.h" >+#include "webkitenumtypes.h" >+ >+#include <string.h> >+ >+extern "C" { >+ >+struct _WebKitWebNavigationActionPrivate { >+ WebKitWebNavigationReason reason; >+ gchar* originalUri; >+}; >+ >+#define WEBKIT_WEB_NAVIGATION_ACTION_GET_PRIVATE(obj)(G_TYPE_INSTANCE_GET_PRIVATE((obj), WEBKIT_TYPE_WEB_NAVIGATION_ACTION, WebKitWebNavigationActionPrivate)) >+ >+enum { >+ PROP_0, >+ >+ PROP_REASON, >+ PROP_ORIGINAL_URI >+}; >+ >+G_DEFINE_TYPE(WebKitWebNavigationAction, webkit_web_navigation_action, G_TYPE_OBJECT) >+ >+ >+static void webkit_web_navigation_action_get_property(GObject* object, guint propertyId, GValue* value, GParamSpec* pspec) >+{ >+ WebKitWebNavigationAction* navigationAction = WEBKIT_WEB_NAVIGATION_ACTION(object); >+ >+ switch(propertyId) { >+ case PROP_REASON: >+ g_value_set_enum(value, webkit_web_navigation_action_get_reason(navigationAction)); >+ break; >+ case PROP_ORIGINAL_URI: >+ g_value_set_string(value, webkit_web_navigation_action_get_original_uri(navigationAction)); >+ break; >+ default: >+ G_OBJECT_WARN_INVALID_PROPERTY_ID(object, propertyId, pspec); >+ break; >+ } >+} >+ >+static void webkit_web_navigation_action_set_property(GObject* object, guint propertyId, const GValue* value, GParamSpec* pspec) >+{ >+ WebKitWebNavigationAction* navigationAction = WEBKIT_WEB_NAVIGATION_ACTION(object); >+ >+ switch(propertyId) { >+ case PROP_REASON: >+ webkit_web_navigation_action_set_reason(navigationAction, (WebKitWebNavigationReason)g_value_get_enum(value)); >+ break; >+ case PROP_ORIGINAL_URI: >+ webkit_web_navigation_action_set_original_uri(navigationAction, g_value_get_string(value)); >+ break; >+ default: >+ G_OBJECT_WARN_INVALID_PROPERTY_ID(object, propertyId, pspec); >+ break; >+ } >+} >+ >+static void webkit_web_navigation_action_init(WebKitWebNavigationAction* navigationAction) >+{ >+ navigationAction->priv = WEBKIT_WEB_NAVIGATION_ACTION_GET_PRIVATE(navigationAction); >+ >+ WebKitWebNavigationActionPrivate* priv = navigationAction->priv; >+} >+ >+static void webkit_web_navigation_action_finalize(GObject* obj) >+{ >+ WebKitWebNavigationAction* navigationAction = WEBKIT_WEB_NAVIGATION_ACTION(obj); >+ WebKitWebNavigationActionPrivate* priv = navigationAction->priv; >+ >+ g_free(priv->originalUri); >+ >+ G_OBJECT_CLASS(webkit_web_navigation_action_parent_class)->finalize(obj); >+} >+ >+static void webkit_web_navigation_action_class_init(WebKitWebNavigationActionClass* requestClass) >+{ >+ GObjectClass* objectClass = G_OBJECT_CLASS(requestClass); >+ >+ objectClass->get_property = webkit_web_navigation_action_get_property; >+ objectClass->set_property = webkit_web_navigation_action_set_property; >+ objectClass->dispose = webkit_web_navigation_action_finalize; >+ >+ g_object_class_install_property(objectClass, PROP_REASON, >+ g_param_spec_enum("reason", >+ "Reason", >+ "The reason why this navigation is occurring", >+ WEBKIT_TYPE_WEB_NAVIGATION_REASON, >+ WEBKIT_WEB_NAVIGATION_REASON_OTHER, >+ (GParamFlags)(WEBKIT_PARAM_READWRITE | G_PARAM_CONSTRUCT))); >+ >+ g_object_class_install_property(objectClass, PROP_ORIGINAL_URI, >+ g_param_spec_string("original-uri", >+ "Original URI", >+ "The URI that was requested as the target for the navigation", >+ "", >+ (GParamFlags)(WEBKIT_PARAM_READWRITE | G_PARAM_CONSTRUCT))); >+ >+ g_type_class_add_private(requestClass, sizeof(WebKitWebNavigationActionPrivate)); >+} >+ >+/** >+ * webkit_web_navigation_action_get_reason: >+ * @navigationAction: a #WebKitWebNavigationAction >+ * >+ * Returns the reason why WebKit is requesting a navigation. >+ * >+ * Return value: a #WebKitWebNavigationReason >+ */ >+WebKitWebNavigationReason webkit_web_navigation_action_get_reason(WebKitWebNavigationAction* navigationAction) >+{ >+ g_return_val_if_fail(WEBKIT_IS_WEB_NAVIGATION_ACTION(navigationAction), WEBKIT_WEB_NAVIGATION_REASON_OTHER); >+ >+ return navigationAction->priv->reason; >+} >+ >+/** >+ * webkit_web_navigation_action_set_reason: >+ * @navigationAction: a #WebKitWebNavigationAction >+ * @reason: a #WebKitWebNavigationReason >+ * >+ * Sets the reason why WebKit is requesting a navigation. >+ */ >+void webkit_web_navigation_action_set_reason(WebKitWebNavigationAction* navigationAction, WebKitWebNavigationReason reason) >+{ >+ g_return_if_fail(WEBKIT_IS_WEB_NAVIGATION_ACTION(navigationAction)); >+ >+ if (navigationAction->priv->reason == reason) >+ return; >+ >+ navigationAction->priv->reason = reason; >+ g_object_notify(G_OBJECT(navigationAction), "reason"); >+} >+ >+/** >+ * webkit_web_navigation_action_get_original_uri: >+ * @navigationAction: a #WebKitWebNavigationAction >+ * >+ * Returns the URI that was originally requested. This may differ from the >+ * navigation target, for instance because of a redirect. >+ * >+ * Return value: the originally requested URI >+ */ >+const gchar* webkit_web_navigation_action_get_original_uri(WebKitWebNavigationAction* navigationAction) >+{ >+ g_return_val_if_fail(WEBKIT_IS_WEB_NAVIGATION_ACTION(navigationAction), NULL); >+ >+ return navigationAction->priv->originalUri; >+} >+ >+/** >+ * webkit_web_navigation_action_set_original_uri: >+ * @navigationAction: a #WebKitWebNavigationAction >+ * @originalUri: a URI >+ * >+ * Sets the URI that was originally requested. This may differ from the >+ * navigation target, for instance because of a redirect. >+ */ >+void webkit_web_navigation_action_set_original_uri(WebKitWebNavigationAction* navigationAction, const gchar* originalUri) >+{ >+ g_return_if_fail(WEBKIT_IS_WEB_NAVIGATION_ACTION(navigationAction)); >+ g_return_if_fail(originalUri); >+ >+ if (navigationAction->priv->originalUri && >+ (!strcmp(navigationAction->priv->originalUri, originalUri))) >+ return; >+ >+ g_free(navigationAction->priv->originalUri); >+ navigationAction->priv->originalUri = g_strdup(originalUri); >+ g_object_notify(G_OBJECT(navigationAction), "original-uri"); >+} >+ >+} >diff --git a/WebKit/gtk/webkit/webkitwebnavigationaction.h b/WebKit/gtk/webkit/webkitwebnavigationaction.h >new file mode 100644 >index 0000000..ee9dfc4 >--- /dev/null >+++ b/WebKit/gtk/webkit/webkitwebnavigationaction.h >@@ -0,0 +1,79 @@ >+/* >+ * Copyright (C) 2008 Collabora Ltd. >+ * >+ * 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_WEB_NAVIGATION_ACTION_H >+#define WEBKIT_WEB_NAVIGATION_ACTION_H >+ >+#include <glib-object.h> >+ >+#include <webkit/webkitdefines.h> >+ >+G_BEGIN_DECLS >+ >+/* The order of this enum must be the same as NavigationType in >+ * FrameLoaderTypes.h >+ */ >+typedef enum { >+ WEBKIT_WEB_NAVIGATION_REASON_LINK_CLICKED, >+ WEBKIT_WEB_NAVIGATION_REASON_FORM_SUBMITTED, >+ WEBKIT_WEB_NAVIGATION_REASON_BACK_FORWARD, >+ WEBKIT_WEB_NAVIGATION_REASON_RELOAD, >+ WEBKIT_WEB_NAVIGATION_REASON_FORM_RESUBMITTED, >+ WEBKIT_WEB_NAVIGATION_REASON_OTHER, >+ WEBKIT_WEB_NAVIGATION_REASON_PLUG_IN_REQUEST >+} WebKitWebNavigationReason; >+ >+#define WEBKIT_TYPE_WEB_NAVIGATION_ACTION (webkit_web_navigation_action_get_type()) >+#define WEBKIT_WEB_NAVIGATION_ACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_TYPE_WEB_NAVIGATION_ACTION, WebKitWebNavigationAction)) >+#define WEBKIT_WEB_NAVIGATION_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), WEBKIT_TYPE_WEB_NAVIGATION_ACTION, WebKitWebNavigationActionClass)) >+#define WEBKIT_IS_WEB_NAVIGATION_ACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_TYPE_WEB_NAVIGATION_ACTION)) >+#define WEBKIT_IS_WEB_NAVIGATION_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), WEBKIT_TYPE_WEB_NAVIGATION_ACTION)) >+#define WEBKIT_WEB_NAVIGATION_ACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), WEBKIT_TYPE_WEB_NAVIGATION_ACTION, WebKitWebNavigationActionClass)) >+ >+typedef struct _WebKitWebNavigationAction WebKitWebNavigationAction; >+typedef struct _WebKitWebNavigationActionClass WebKitWebNavigationActionClass; >+typedef struct _WebKitWebNavigationActionPrivate WebKitWebNavigationActionPrivate; >+ >+struct _WebKitWebNavigationAction { >+ GObject parent_instance; >+ WebKitWebNavigationActionPrivate* priv; >+}; >+ >+struct _WebKitWebNavigationActionClass { >+ GObjectClass parent_class; >+}; >+ >+WEBKIT_API GType >+webkit_web_navigation_action_get_type(void); >+ >+WEBKIT_API WebKitWebNavigationReason >+webkit_web_navigation_action_get_reason(WebKitWebNavigationAction* navigationAction); >+ >+WEBKIT_API void >+webkit_web_navigation_action_set_reason(WebKitWebNavigationAction* navigationAction, WebKitWebNavigationReason reason); >+ >+WEBKIT_API const gchar* >+webkit_web_navigation_action_get_original_uri(WebKitWebNavigationAction* navigationAction); >+ >+WEBKIT_API void >+webkit_web_navigation_action_set_original_uri(WebKitWebNavigationAction* navigationAction, const gchar* originalUri); >+ >+G_END_DECLS >+ >+#endif >diff --git a/WebKit/gtk/webkit/webkitwebpolicydecision.cpp b/WebKit/gtk/webkit/webkitwebpolicydecision.cpp >new file mode 100644 >index 0000000..015a282 >--- /dev/null >+++ b/WebKit/gtk/webkit/webkitwebpolicydecision.cpp >@@ -0,0 +1,128 @@ >+/* >+ * Copyright (C) 2008 Collabora Ltd. >+ * >+ * 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 "webkitwebpolicydecision.h" >+ >+#include "FrameLoaderTypes.h" >+#include "webkitprivate.h" >+ >+using namespace WebKit; >+using namespace WebCore; >+ >+extern "C" { >+ >+G_DEFINE_TYPE(WebKitWebPolicyDecision, webkit_web_policy_decision, G_TYPE_OBJECT); >+ >+struct _WebKitWebPolicyDecisionPrivate { >+ WebKitWebFrame* frame; >+ FramePolicyFunction framePolicyFunction; >+ gboolean isCancelled; >+}; >+ >+#define WEBKIT_WEB_POLICY_DECISION_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), WEBKIT_TYPE_WEB_POLICY_DECISION, WebKitWebPolicyDecisionPrivate)) >+ >+static void webkit_web_policy_decision_class_init(WebKitWebPolicyDecisionClass* decisionClass) >+{ >+ g_type_class_add_private(decisionClass, sizeof(WebKitWebPolicyDecisionPrivate)); >+} >+ >+static void webkit_web_policy_decision_init(WebKitWebPolicyDecision* decision) >+{ >+ decision->priv = WEBKIT_WEB_POLICY_DECISION_GET_PRIVATE(decision); >+} >+ >+WebKitWebPolicyDecision* webkit_web_policy_decision_new(WebKitWebFrame* frame, WebCore::FramePolicyFunction function) >+{ >+ g_return_val_if_fail(frame, NULL); >+ >+ WebKitWebPolicyDecision* decision = WEBKIT_WEB_POLICY_DECISION(g_object_new(WEBKIT_TYPE_WEB_POLICY_DECISION, NULL)); >+ WebKitWebPolicyDecisionPrivate* priv = decision->priv; >+ >+ priv->frame = frame; >+ priv->framePolicyFunction = function; >+ priv->isCancelled = FALSE; >+ >+ return decision; >+} >+ >+/** >+ * webkit_web_policy_decision_use >+ * @decision: a #WebKitWebPolicyDecision >+ * >+ * Will send the USE decision to the policy implementer. >+ */ >+void webkit_web_policy_decision_use(WebKitWebPolicyDecision* decision) >+{ >+ g_return_if_fail(WEBKIT_IS_WEB_POLICY_DECISION(decision)); >+ >+ WebKitWebPolicyDecisionPrivate* priv = decision->priv; >+ >+ if (!priv->isCancelled) >+ (core(priv->frame)->loader()->*(priv->framePolicyFunction))(WebCore::PolicyUse); >+} >+ >+/** >+ * webkit_web_policy_decision_ignore >+ * @decision: a #WebKitWebPolicyDecision >+ * >+ * Will send the IGNORE decision to the policy implementer. >+ */ >+void webkit_web_policy_decision_ignore(WebKitWebPolicyDecision* decision) >+{ >+ g_return_if_fail(WEBKIT_IS_WEB_POLICY_DECISION(decision)); >+ >+ WebKitWebPolicyDecisionPrivate* priv = decision->priv; >+ >+ if (!priv->isCancelled) >+ (core(priv->frame)->loader()->*(priv->framePolicyFunction))(WebCore::PolicyIgnore); >+} >+ >+/** >+ * webkit_web_policy_decision_download >+ * @decision: a #WebKitWebPolicyDecision >+ * >+ * Will send the DOWNLOAD decision to the policy implementer. >+ */ >+void webkit_web_policy_decision_download(WebKitWebPolicyDecision* decision) >+{ >+ g_return_if_fail(WEBKIT_IS_WEB_POLICY_DECISION(decision)); >+ >+ WebKitWebPolicyDecisionPrivate* priv = decision->priv; >+ >+ g_warning("Download is not supported"); >+ webkit_web_policy_decision_ignore(decision); >+ >+#if 0 >+ if (!priv->isCancelled) >+ (core(priv->frame)->loader()->*(priv->framePolicyFunction))(WebCore::PolicyDownload); >+#endif >+} >+ >+void webkit_web_policy_decision_cancel(WebKitWebPolicyDecision* decision) >+{ >+ g_return_if_fail(WEBKIT_IS_WEB_POLICY_DECISION(decision)); >+ >+ WebKitWebPolicyDecisionPrivate* priv = decision->priv; >+ >+ priv->isCancelled = TRUE; >+} >+ >+} >diff --git a/WebKit/gtk/webkit/webkitwebpolicydecision.h b/WebKit/gtk/webkit/webkitwebpolicydecision.h >new file mode 100644 >index 0000000..df32223 >--- /dev/null >+++ b/WebKit/gtk/webkit/webkitwebpolicydecision.h >@@ -0,0 +1,62 @@ >+/* >+ * Copyright (C) 2008 Collabora Ltd. >+ * >+ * 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_WEB_POLICY_DECISION_H >+#define WEBKIT_WEB_POLICY_DECISION_H >+ >+#include <glib-object.h> >+#include <stdint.h> >+#include "webkitdefines.h" >+ >+G_BEGIN_DECLS >+ >+#define WEBKIT_TYPE_WEB_POLICY_DECISION (webkit_web_policy_decision_get_type()) >+#define WEBKIT_WEB_POLICY_DECISION(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_TYPE_WEB_POLICY_DECISION, WebKitWebPolicyDecision)) >+#define WEBKIT_WEB_POLICY_DECISION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), WEBKIT_TYPE_WEB_POLICY_DECISION, WebKitWebPolicyDecisionClass)) >+#define WEBKIT_IS_WEB_POLICY_DECISION(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_TYPE_WEB_POLICY_DECISION)) >+#define WEBKIT_IS_WEB_POLICY_DECISION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), WEBKIT_TYPE_WEB_POLICY_DECISION)) >+#define WEBKIT_WEB_POLICY_DECISION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), WEBKIT_TYPE_WEB_POLICY_DECISION, WebKitWebPolicyDecisionClass)) >+ >+typedef struct _WebKitWebPolicyDecisionPrivate WebKitWebPolicyDecisionPrivate; >+struct _WebKitWebPolicyDecision { >+ GObject parent_instance; >+ >+ /*< private >*/ >+ WebKitWebPolicyDecisionPrivate* priv; >+}; >+ >+struct _WebKitWebPolicyDecisionClass { >+ GObjectClass parent_class; >+}; >+ >+WEBKIT_API GType >+webkit_web_policy_decision_get_type (void); >+ >+WEBKIT_API void >+webkit_web_policy_decision_use (WebKitWebPolicyDecision* decision); >+ >+WEBKIT_API void >+webkit_web_policy_decision_ignore (WebKitWebPolicyDecision* decision); >+ >+WEBKIT_API void >+webkit_web_policy_decision_download (WebKitWebPolicyDecision* decision); >+ >+G_END_DECLS >+ >+#endif >diff --git a/WebKit/gtk/webkit/webkitwebview.cpp b/WebKit/gtk/webkit/webkitwebview.cpp >index 5155496..aa0c219 100644 >--- a/WebKit/gtk/webkit/webkitwebview.cpp >+++ b/WebKit/gtk/webkit/webkitwebview.cpp >@@ -26,6 +26,7 @@ > #include "config.h" > > #include "webkitwebview.h" >+#include "webkitenumtypes.h" > #include "webkitmarshal.h" > #include "webkitprivate.h" > #include "webkitwebinspector.h" >@@ -75,6 +76,8 @@ extern "C" { > enum { > /* normal signals */ > NAVIGATION_REQUESTED, >+ NAVIGATION_POLICY_DECISION_REQUESTED, >+ MIME_TYPE_POLICY_DECISION_REQUESTED, > CREATE_WEB_VIEW, > WEB_VIEW_READY, > WINDOW_OBJECT_CLEARED, >@@ -631,9 +634,8 @@ static gboolean webkit_web_view_real_web_view_ready(WebKitWebView*) > return FALSE; > } > >-static WebKitNavigationResponse webkit_web_view_real_navigation_requested(WebKitWebView*, WebKitWebFrame* frame, WebKitNetworkRequest*) >+static WebKitNavigationResponse webkit_web_view_real_navigation_requested(WebKitWebView*, WebKitWebFrame*, WebKitNetworkRequest*) > { >- notImplemented(); > return WEBKIT_NAVIGATION_RESPONSE_ACCEPT; > } > >@@ -811,10 +813,10 @@ static gboolean webkit_create_web_view_request_handled(GSignalInvocationHint* ih > > static gboolean webkit_navigation_request_handled(GSignalInvocationHint* ihint, GValue* returnAccu, const GValue* handlerReturn, gpointer dummy) > { >- int signalHandled = g_value_get_int(handlerReturn); >- g_value_set_int(returnAccu, signalHandled); >+ WebKitNavigationResponse navigationResponse = (WebKitNavigationResponse)g_value_get_enum(handlerReturn); >+ g_value_set_enum(returnAccu, navigationResponse); > >- if (signalHandled != WEBKIT_NAVIGATION_RESPONSE_ACCEPT) >+ if (navigationResponse != WEBKIT_NAVIGATION_RESPONSE_ACCEPT) > return FALSE; > > return TRUE; >@@ -907,16 +909,83 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass) > webkit_marshal_BOOLEAN__VOID, > G_TYPE_BOOLEAN, 0); > >+ /** >+ * WebKitWebView::navigation-requested: >+ * @web_view: the object on which the signal is emitted >+ * @frame: the #WebKitWebFrame that required the navigation >+ * @request: a #WebKitNetworkRequest >+ * @return: a WebKitNavigationResponse >+ * >+ * Emitted when @frame requests a navigation to another page. >+ * >+ * Deprecated: Use navigation-policy-decision-requested instead >+ */ > webkit_web_view_signals[NAVIGATION_REQUESTED] = g_signal_new("navigation-requested", > G_TYPE_FROM_CLASS(webViewClass), > (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION), > G_STRUCT_OFFSET (WebKitWebViewClass, navigation_requested), > webkit_navigation_request_handled, > NULL, >- webkit_marshal_INT__OBJECT_OBJECT, >- G_TYPE_INT, 2, >- G_TYPE_OBJECT, >- G_TYPE_OBJECT); >+ webkit_marshal_ENUM__OBJECT_OBJECT, >+ WEBKIT_TYPE_NAVIGATION_RESPONSE, 2, >+ WEBKIT_TYPE_WEB_FRAME, >+ WEBKIT_TYPE_NETWORK_REQUEST); >+ >+ /** >+ * WebKitWebView::navigation-policy-decision-requested: >+ * @web_view: the object on which the signal is emitted >+ * @frame: the #WebKitWebFrame that required the navigation >+ * @request: a #WebKitNetworkRequest >+ * @navigation_action: a #WebKitWebNavigation >+ * @policy_decision: a #WebKitWebPolicyDecision >+ * @return: TRUE if the signal will be handled, FALSE to have the >+ * default behavior apply >+ * >+ * Emitted when @frame requests a navigation to another page. >+ * If this signal is not handled, the default behavior is to allow the >+ * navigation. >+ */ >+ webkit_web_view_signals[NAVIGATION_POLICY_DECISION_REQUESTED] = g_signal_new("navigation-policy-decision-requested", >+ G_TYPE_FROM_CLASS(webViewClass), >+ (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION), >+ 0, >+ g_signal_accumulator_true_handled, >+ NULL, >+ webkit_marshal_BOOLEAN__OBJECT_OBJECT_OBJECT_OBJECT, >+ G_TYPE_BOOLEAN, 4, >+ WEBKIT_TYPE_WEB_FRAME, >+ WEBKIT_TYPE_NETWORK_REQUEST, >+ WEBKIT_TYPE_WEB_NAVIGATION_ACTION, >+ WEBKIT_TYPE_WEB_POLICY_DECISION); >+ >+ /** >+ * WebKitWebView::mime-type-policy-decision-requested: >+ * @web_view: the object on which the signal is emitted >+ * @frame: the #WebKitWebFrame that required the policy decision >+ * @request: a WebKitNetworkRequest >+ * @mimetype: the MIME type attempted to load >+ * @policy_decision: a #WebKitWebPolicyDecision >+ * @return: TRUE if the signal will be handled, FALSE to have the >+ * default behavior apply >+ * >+ * Decide whether or not to display the given MIME type. If this >+ * signal is not handled, the default behavior is to show the >+ * content of the requested URI if WebKit can show this MIME >+ * type; if WebKit is not able to show the MIME type nothing >+ * happens. >+ */ >+ webkit_web_view_signals[MIME_TYPE_POLICY_DECISION_REQUESTED] = g_signal_new("mime-type-policy-decision-requested", >+ G_TYPE_FROM_CLASS(webViewClass), >+ (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION), >+ 0, >+ g_signal_accumulator_true_handled, >+ NULL, >+ webkit_marshal_BOOLEAN__OBJECT_OBJECT_STRING_OBJECT, >+ G_TYPE_BOOLEAN, 4, >+ WEBKIT_TYPE_WEB_FRAME, >+ WEBKIT_TYPE_NETWORK_REQUEST, >+ G_TYPE_STRING, >+ WEBKIT_TYPE_WEB_POLICY_DECISION); > > /** > * WebKitWebView::window-object-cleared: >@@ -2315,6 +2384,27 @@ GtkTargetList* webkit_web_view_get_paste_target_list(WebKitWebView* webView) > } > > /** >+ * webkit_web_view_can_show_mime_type: >+ * @web_view: a #WebKitWebView >+ * @mime_type: a MIME type >+ * >+ * This functions returns whether or not a MIME type can be displayed using this view. >+ * >+ * Return value: a #gboolean indicating if the MIME type can be displayed >+ **/ >+ >+gboolean webkit_web_view_can_show_mime_type (WebKitWebView* webView, const gchar* mimeType) >+{ >+ g_return_val_if_fail(WEBKIT_IS_WEB_VIEW(webView), FALSE); >+ >+ Frame* frame = core(webkit_web_view_get_main_frame(webView)); >+ if (FrameLoader* loader = frame->loader()) >+ return loader->canShowMIMEType(mimeType); >+ else >+ return FALSE; >+} >+ >+/** > * webkit_web_view_get_transparent: > * @web_view: a #WebKitWebView > * >diff --git a/WebKit/gtk/webkit/webkitwebview.h b/WebKit/gtk/webkit/webkitwebview.h >index d4d170e..d737658 100644 >--- a/WebKit/gtk/webkit/webkitwebview.h >+++ b/WebKit/gtk/webkit/webkitwebview.h >@@ -1,6 +1,7 @@ > /* > * Copyright (C) 2007 Holger Hans Peter Freyther > * Copyright (C) 2007, 2008 Alp Toker <alp@atoker.com> >+ * Copyright (C) 2008 Collabora Ltd. > * > * This library is free software; you can redistribute it and/or > * modify it under the terms of the GNU Library General Public >@@ -71,9 +72,6 @@ struct _WebKitWebViewClass { > > gboolean (* web_view_ready) (WebKitWebView* web_view); > >- /* >- * TODO: FIXME: Create something like WebPolicyDecisionListener_Protocol instead >- */ > WebKitNavigationResponse (* navigation_requested) (WebKitWebView *web_view, > WebKitWebFrame *frame, > WebKitNetworkRequest *request); >@@ -256,6 +254,10 @@ WEBKIT_API WebKitWebWindowFeatures* > webkit_web_view_get_window_features (WebKitWebView *web_view); > > WEBKIT_API gboolean >+webkit_web_view_can_show_mime_type (WebKitWebView *web_view, >+ const gchar *mime_type); >+ >+WEBKIT_API gboolean > webkit_web_view_get_transparent (WebKitWebView *web_view); > > WEBKIT_API void
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 16562
:
18040
|
18276
|
18357
|
18372
|
18394
|
18579
|
18603
|
18970
|
18971
|
19530
|
21001
|
21288
|
23794
|
25924
|
26036
|
26149
|
26157