summaryrefslogtreecommitdiff
path: root/Source/WebKit2
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit2')
-rw-r--r--Source/WebKit2/ChangeLog92
-rw-r--r--Source/WebKit2/GNUmakefile.am2
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_view.h4
-rw-r--r--Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp59
-rw-r--r--Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.h3
-rw-r--r--Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitFindController.cpp6
-rw-r--r--Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitWebContext.cpp2
-rw-r--r--Source/WebKit2/UIProcess/API/qt/raw/qrawwebview.cpp4
-rw-r--r--Source/WebKit2/UIProcess/API/qt/raw/qrawwebview_p.h3
-rw-r--r--Source/WebKit2/WebProcess/com.apple.WebProcess.sb.in7
10 files changed, 148 insertions, 34 deletions
diff --git a/Source/WebKit2/ChangeLog b/Source/WebKit2/ChangeLog
index 1ed41a373..d147a0461 100644
--- a/Source/WebKit2/ChangeLog
+++ b/Source/WebKit2/ChangeLog
@@ -1,3 +1,95 @@
+2012-08-22 Luiz Agostini <luiz.agostini@nokia.com>
+
+ [Qt] Avoid using WebKit macros in qrawwebview_p.h
+ https://bugs.webkit.org/show_bug.cgi?id=94648
+
+ Reviewed by Noam Rosenthal.
+
+ ENABLE(FEATURE) should not be used in qrawwebview_p.h because it is an API header file.
+
+ * UIProcess/API/qt/raw/qrawwebview.cpp:
+ (QRawWebView::sendTouchEvent):
+ * UIProcess/API/qt/raw/qrawwebview_p.h:
+
+2012-08-21 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r126216.
+ http://trac.webkit.org/changeset/126216
+ https://bugs.webkit.org/show_bug.cgi?id=94661
+
+ "Broke many Mac-WK2 tests" (Requested by bradee-oh on
+ #webkit).
+
+ * WebProcess/com.apple.WebProcess.sb.in:
+
+2012-08-21 Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com>
+
+ [GTK] [WK2] Memory leaks in TestWebKitFindController
+ https://bugs.webkit.org/show_bug.cgi?id=94627
+
+ Reviewed by Martin Robinson.
+
+ Fix memory leaks in TestWebKitFindController by using adoptGRef
+ instead of just getting new reference of GdkPixbuf.
+
+ * UIProcess/API/gtk/tests/TestWebKitFindController.cpp:
+ (testFindControllerHide):
+
+2012-08-21 Alexey Proskuryakov <ap@apple.com>
+
+ <rdar://problem/11241850> Block access to xpcd in WebProcess.sb
+
+ Reviewed by Sam Weinig and Jon Honeycutt.
+
+ * WebProcess/com.apple.WebProcess.sb.in:
+
+2012-08-21 Alexey Proskuryakov <ap@apple.com>
+
+ <rdar://problem/8900275> Remove PubSub access from WebProcess, since it is no longer necessary
+
+ Reviewed by Mark Rowe.
+
+ * WebProcess/com.apple.WebProcess.sb.in:
+
+2012-08-21 Thiago Marcos P. Santos <thiago.santos@intel.com>
+
+ [EFL] Some public API functions don't have their symbols exported
+ https://bugs.webkit.org/show_bug.cgi?id=94589
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Added missing export symbol macro to these public API functions.
+
+ * UIProcess/API/efl/ewk_view.h:
+
+2012-08-21 Martin Robinson <mrobinson@igalia.com>
+
+ [GTK] Using a native window for the WebView breaks GtkOverlay
+ https://bugs.webkit.org/show_bug.cgi?id=90085
+
+ Reviewed by Alejandro G. Castro.
+
+ Add XComposite libraries to the linker list for WebKit2.
+
+ * GNUmakefile.am: Add XComposite
+
+2012-08-21 Jesse van den Kieboom <jessevdk@gnome.org> and Carlos Garcia Campos <cgarcia@igalia.com>
+
+ [GTK] Add destroy notify for register_uri_scheme
+ https://bugs.webkit.org/show_bug.cgi?id=94315
+
+ Reviewed by Philippe Normand.
+
+ For introspection to work correctly, a destroy notify needs to be
+ added to register_uri_scheme so that bindings know when to
+ finalize the user_data.
+
+ * UIProcess/API/gtk/WebKitWebContext.cpp:
+ (webkit_web_context_register_uri_scheme):
+ (webkitWebContextReceivedURIRequest):
+ * UIProcess/API/gtk/WebKitWebContext.h:
+ * UIProcess/API/gtk/tests/TestWebKitWebContext.cpp:
+
2012-08-21 Simon Hausmann <simon.hausmann@nokia.com>
Unreviewed build fix for newer Qt 5: QT += qmltest does not imply QT += testlib anymore, but
diff --git a/Source/WebKit2/GNUmakefile.am b/Source/WebKit2/GNUmakefile.am
index 3edce0aa2..ba0ac6955 100644
--- a/Source/WebKit2/GNUmakefile.am
+++ b/Source/WebKit2/GNUmakefile.am
@@ -108,6 +108,7 @@ libwebkit2gtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CPP
$(GTK_UNIX_PRINTING_CFLAGS) \
$(LIBSOUP_CFLAGS) \
$(UNICODE_CFLAGS) \
+ $(XCOMPOSITE_CFLAGS) \
$(XT_CFLAGS)
libwebkit2gtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CXXFLAGS = \
@@ -180,6 +181,7 @@ libwebkit2gtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_LIB
$(SQLITE3_LIBS) \
$(UNICODE_LIBS) \
$(XRENDER_LIBS) \
+ $(XCOMPOSITE_LIBS) \
$(XT_LIBS) \
$(ZLIB_LIBS)
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_view.h b/Source/WebKit2/UIProcess/API/efl/ewk_view.h
index 6064cf855..afa45846f 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_view.h
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_view.h
@@ -273,7 +273,7 @@ EAPI Eina_Bool ewk_view_smart_class_set(Ewk_View_Smart_Class *api);
*
* @return view object on success or @c NULL on failure
*/
-Evas_Object *ewk_view_smart_add(Evas *e, Evas_Smart *smart, Ewk_Context *context);
+EAPI Evas_Object *ewk_view_smart_add(Evas *e, Evas_Smart *smart, Ewk_Context *context);
/**
* Creates a new EFL WebKit view object.
@@ -475,7 +475,7 @@ Eina_Bool ewk_view_scale_set(Evas_Object *o, double scaleFactor, int x, int y);
*
* @return current scale factor in use on success or @c -1.0 on failure
*/
-double ewk_view_scale_get(const Evas_Object *o);
+EAPI double ewk_view_scale_get(const Evas_Object *o);
/**
* Queries the ratio between the CSS units and device pixels when the content is unscaled.
diff --git a/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp b/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp
index 620c9a876..211133f0a 100644
--- a/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp
+++ b/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp
@@ -35,6 +35,8 @@
#include <WebCore/Language.h>
#include <wtf/HashMap.h>
#include <wtf/OwnPtr.h>
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefCounted.h>
#include <wtf/gobject/GOwnPtr.h>
#include <wtf/gobject/GRefPtr.h>
#include <wtf/text/CString.h>
@@ -47,23 +49,46 @@ enum {
LAST_SIGNAL
};
-struct WebKitURISchemeHandler {
+class WebKitURISchemeHandler: public RefCounted<WebKitURISchemeHandler> {
+public:
WebKitURISchemeHandler()
- : callback(0)
- , userData(0)
+ : m_callback(0)
+ , m_userData(0)
+ , m_destroyNotify(0)
{
}
- WebKitURISchemeHandler(WebKitURISchemeRequestCallback callback, void* userData)
- : callback(callback)
- , userData(userData)
+ WebKitURISchemeHandler(WebKitURISchemeRequestCallback callback, void* userData, GDestroyNotify destroyNotify)
+ : m_callback(callback)
+ , m_userData(userData)
+ , m_destroyNotify(destroyNotify)
{
}
- WebKitURISchemeRequestCallback callback;
- void* userData;
+ ~WebKitURISchemeHandler()
+ {
+ if (m_destroyNotify)
+ m_destroyNotify(m_userData);
+ }
+
+ bool hasCallback()
+ {
+ return m_callback;
+ }
+
+ void performCallback(WebKitURISchemeRequest* request)
+ {
+ ASSERT(m_callback);
+
+ m_callback(request, m_userData);
+ }
+
+private:
+ WebKitURISchemeRequestCallback m_callback;
+ void* m_userData;
+ GDestroyNotify m_destroyNotify;
};
-typedef HashMap<String, WebKitURISchemeHandler> URISchemeHandlerMap;
+typedef HashMap<String, RefPtr<WebKitURISchemeHandler> > URISchemeHandlerMap;
typedef HashMap<uint64_t, GRefPtr<WebKitURISchemeRequest> > URISchemeRequestMap;
struct _WebKitWebContextPrivate {
@@ -379,8 +404,9 @@ GList* webkit_web_context_get_plugins_finish(WebKitWebContext* context, GAsyncRe
* webkit_web_context_register_uri_scheme:
* @context: a #WebKitWebContext
* @scheme: the network scheme to register
- * @callback: a #WebKitURISchemeRequestCallback
+ * @callback: (scope async): a #WebKitURISchemeRequestCallback
* @user_data: data to pass to callback function
+ * @user_data_destroy_func: destroy notify for @user_data
*
* Register @scheme in @context, so that when an URI request with @scheme is made in the
* #WebKitWebContext, the #WebKitURISchemeRequestCallback registered will be called with a
@@ -417,13 +443,14 @@ GList* webkit_web_context_get_plugins_finish(WebKitWebContext* context, GAsyncRe
* }
* </programlisting></informalexample>
*/
-void webkit_web_context_register_uri_scheme(WebKitWebContext* context, const char* scheme, WebKitURISchemeRequestCallback callback, gpointer userData)
+void webkit_web_context_register_uri_scheme(WebKitWebContext* context, const char* scheme, WebKitURISchemeRequestCallback callback, gpointer userData, GDestroyNotify destroyNotify)
{
g_return_if_fail(WEBKIT_IS_WEB_CONTEXT(context));
g_return_if_fail(scheme);
g_return_if_fail(callback);
- context->priv->uriSchemeHandlers.set(String::fromUTF8(scheme), WebKitURISchemeHandler(callback, userData));
+ RefPtr<WebKitURISchemeHandler> handler = adoptRef(new WebKitURISchemeHandler(callback, userData, destroyNotify));
+ context->priv->uriSchemeHandlers.set(String::fromUTF8(scheme), handler.get());
WKRetainPtr<WKStringRef> wkScheme(AdoptWK, WKStringCreateWithUTF8CString(scheme));
WKSoupRequestManagerRegisterURIScheme(context->priv->requestManager.get(), wkScheme.get());
}
@@ -579,12 +606,14 @@ WKSoupRequestManagerRef webkitWebContextGetRequestManager(WebKitWebContext* cont
void webkitWebContextReceivedURIRequest(WebKitWebContext* context, WebKitURISchemeRequest* request)
{
- WebKitURISchemeHandler handler = context->priv->uriSchemeHandlers.get(webkit_uri_scheme_request_get_scheme(request));
- if (!handler.callback)
+ String scheme(String::fromUTF8(webkit_uri_scheme_request_get_scheme(request)));
+ RefPtr<WebKitURISchemeHandler> handler = context->priv->uriSchemeHandlers.get(scheme);
+ ASSERT(handler.get());
+ if (!handler->hasCallback())
return;
context->priv->uriSchemeRequests.set(webkitURISchemeRequestGetID(request), request);
- handler.callback(request, handler.userData);
+ handler->performCallback(request);
}
void webkitWebContextDidFailToLoadURIRequest(WebKitWebContext* context, uint64_t requestID)
diff --git a/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.h b/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.h
index 5af7f2414..3c97c71cb 100644
--- a/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.h
+++ b/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.h
@@ -131,7 +131,8 @@ WEBKIT_API void
webkit_web_context_register_uri_scheme (WebKitWebContext *context,
const gchar *scheme,
WebKitURISchemeRequestCallback callback,
- gpointer user_data);
+ gpointer user_data,
+ GDestroyNotify user_data_destroy_func);
WEBKIT_API gboolean
webkit_web_context_get_spell_checking_enabled (WebKitWebContext *context);
diff --git a/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitFindController.cpp b/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitFindController.cpp
index a2af7bd8d..90159b87f 100644
--- a/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitFindController.cpp
+++ b/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitFindController.cpp
@@ -312,7 +312,7 @@ static void testFindControllerHide(FindControllerTest* test, gconstpointer)
g_assert(webViewGdkWindow);
test->waitUntilWebViewDrawSignal();
- GRefPtr<GdkPixbuf> originalPixbuf = gdk_pixbuf_get_from_window(webViewGdkWindow, 0, 0, allocatedHeight, allocatedWidth);
+ GRefPtr<GdkPixbuf> originalPixbuf = adoptGRef(gdk_pixbuf_get_from_window(webViewGdkWindow, 0, 0, allocatedHeight, allocatedWidth));
g_assert(originalPixbuf);
test->find("testing", WEBKIT_FIND_OPTIONS_NONE, 1);
@@ -320,7 +320,7 @@ static void testFindControllerHide(FindControllerTest* test, gconstpointer)
g_assert(test->m_textFound);
test->waitUntilWebViewDrawSignal();
- GRefPtr<GdkPixbuf> highlightPixbuf = gdk_pixbuf_get_from_window(webViewGdkWindow, 0, 0, allocatedHeight, allocatedWidth);
+ GRefPtr<GdkPixbuf> highlightPixbuf = adoptGRef(gdk_pixbuf_get_from_window(webViewGdkWindow, 0, 0, allocatedHeight, allocatedWidth));
g_assert(highlightPixbuf);
g_assert(!gdkPixbufEqual(originalPixbuf.get(), highlightPixbuf.get()));
@@ -329,7 +329,7 @@ static void testFindControllerHide(FindControllerTest* test, gconstpointer)
webkit_web_view_execute_editing_command(test->m_webView, "Unselect");
test->waitUntilWebViewDrawSignal();
- GRefPtr<GdkPixbuf> unhighlightPixbuf = gdk_pixbuf_get_from_window(webViewGdkWindow, 0, 0, allocatedHeight, allocatedWidth);
+ GRefPtr<GdkPixbuf> unhighlightPixbuf = adoptGRef(gdk_pixbuf_get_from_window(webViewGdkWindow, 0, 0, allocatedHeight, allocatedWidth));
g_assert(unhighlightPixbuf);
g_assert(gdkPixbufEqual(originalPixbuf.get(), unhighlightPixbuf.get()));
}
diff --git a/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitWebContext.cpp b/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitWebContext.cpp
index cde0bc34a..27f6a5447 100644
--- a/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitWebContext.cpp
+++ b/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitWebContext.cpp
@@ -165,7 +165,7 @@ public:
void registerURISchemeHandler(const char* scheme, const char* reply, int replyLength, const char* mimeType, bool replyWithPath = false)
{
m_handlersMap.set(String::fromUTF8(scheme), URISchemeHandler(reply, replyLength, mimeType, replyWithPath));
- webkit_web_context_register_uri_scheme(webkit_web_context_get_default(), scheme, uriSchemeRequestCallback, this);
+ webkit_web_context_register_uri_scheme(webkit_web_context_get_default(), scheme, uriSchemeRequestCallback, this, 0);
}
GRefPtr<WebKitURISchemeRequest> m_uriSchemeRequest;
diff --git a/Source/WebKit2/UIProcess/API/qt/raw/qrawwebview.cpp b/Source/WebKit2/UIProcess/API/qt/raw/qrawwebview.cpp
index 0aed5d948..6250348a6 100644
--- a/Source/WebKit2/UIProcess/API/qt/raw/qrawwebview.cpp
+++ b/Source/WebKit2/UIProcess/API/qt/raw/qrawwebview.cpp
@@ -380,9 +380,9 @@ void QRawWebView::sendWheelEvent(QWheelEvent* event)
d->m_webPageProxy->handleWheelEvent(WebKit::NativeWebWheelEvent(event, QTransform()));
}
-#if ENABLE(TOUCH_EVENTS)
void QRawWebView::sendTouchEvent(QTouchEvent* event)
{
+#if ENABLE(TOUCH_EVENTS)
d->m_webPageProxy->handleTouchEvent(WebKit::NativeWebTouchEvent(event, QTransform()));
-}
#endif
+}
diff --git a/Source/WebKit2/UIProcess/API/qt/raw/qrawwebview_p.h b/Source/WebKit2/UIProcess/API/qt/raw/qrawwebview_p.h
index 4608ff9d7..f8f15b06d 100644
--- a/Source/WebKit2/UIProcess/API/qt/raw/qrawwebview_p.h
+++ b/Source/WebKit2/UIProcess/API/qt/raw/qrawwebview_p.h
@@ -30,7 +30,6 @@
#include <WebKit2/WKContext.h>
#include <WebKit2/WKPage.h>
#include <WebKit2/WKPageGroup.h>
-#include <wtf/Platform.h>
QT_BEGIN_NAMESPACE
class QRect;
@@ -95,9 +94,7 @@ public:
void sendKeyEvent(QKeyEvent*);
void sendMouseEvent(QMouseEvent*, int clickCount = 0);
void sendWheelEvent(QWheelEvent*);
-#if ENABLE(TOUCH_EVENTS)
void sendTouchEvent(QTouchEvent*);
-#endif
private:
QRawWebViewPrivate* d;
diff --git a/Source/WebKit2/WebProcess/com.apple.WebProcess.sb.in b/Source/WebKit2/WebProcess/com.apple.WebProcess.sb.in
index c501e8f5b..d19525890 100644
--- a/Source/WebKit2/WebProcess/com.apple.WebProcess.sb.in
+++ b/Source/WebKit2/WebProcess/com.apple.WebProcess.sb.in
@@ -183,13 +183,6 @@
(literal "/private/var/run/mDNSResponder")
(remote tcp))
-;; FIXME: Once <rdar://problem/8900275> has been fixed, these rules can be removed.
-(allow mach-lookup (global-name "com.apple.pubsub.ipc"))
-(allow network-outbound (regex #"^/private/tmp/launch-[^/]+/Render"))
-(allow file-read*
- (home-literal "/Library/Preferences/com.apple.Safari.RSS.plist")
- (home-literal "/Library/Preferences/com.apple.Syndication.plist"))
-
;; FIXME should be removed when <rdar://problem/9347205> + related radar in Safari is fixed
(allow mach-lookup
(global-name "org.h5l.kcm")