summaryrefslogtreecommitdiff
path: root/Source/WebKit2/UIProcess
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2012-09-18 15:53:33 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2012-09-18 15:53:33 +0200
commit6bbb7fbbac94d0f511a7bd0cbd50854ab643bfb2 (patch)
treed9c68d1cca0b3e352f1e438561f3e504e641a08f /Source/WebKit2/UIProcess
parentd0424a769059c84ae20beb3c217812792ea6726b (diff)
downloadqtwebkit-6bbb7fbbac94d0f511a7bd0cbd50854ab643bfb2.tar.gz
Imported WebKit commit c7503cef7ecb236730d1309676ab9fc723fd061d (http://svn.webkit.org/repository/webkit/trunk@128886)
New snapshot with various build fixes
Diffstat (limited to 'Source/WebKit2/UIProcess')
-rw-r--r--Source/WebKit2/UIProcess/API/efl/PageClientImpl.cpp8
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_private.h2
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_touch.h58
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_view.cpp28
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_view.h1
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_view_private.h1
-rw-r--r--Source/WebKit2/UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h2
-rw-r--r--Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_refptr_evas_object.cpp134
-rw-r--r--Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp2
-rw-r--r--Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp14
-rw-r--r--Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBasePrivate.h1
-rw-r--r--Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp18
-rw-r--r--Source/WebKit2/UIProcess/API/qt/qwebloadrequest.cpp12
-rw-r--r--Source/WebKit2/UIProcess/Authentication/AuthenticationDecisionListener.h2
-rw-r--r--Source/WebKit2/UIProcess/Authentication/WebCredential.h4
-rw-r--r--Source/WebKit2/UIProcess/Authentication/WebProtectionSpace.h2
-rw-r--r--Source/WebKit2/UIProcess/GenericCallback.h2
-rw-r--r--Source/WebKit2/UIProcess/InspectorServer/WebSocketServer.h2
-rw-r--r--Source/WebKit2/UIProcess/PageViewportController.cpp2
-rw-r--r--Source/WebKit2/UIProcess/PageViewportController.h30
-rw-r--r--Source/WebKit2/UIProcess/Plugins/mac/PluginInfoStoreMac.mm10
-rw-r--r--Source/WebKit2/UIProcess/ResponsivenessTimer.h2
-rw-r--r--Source/WebKit2/UIProcess/WebApplicationCacheManagerProxy.h2
-rw-r--r--Source/WebKit2/UIProcess/WebBackForwardList.h2
-rw-r--r--Source/WebKit2/UIProcess/WebContextUserMessageCoders.h2
-rw-r--r--Source/WebKit2/UIProcess/WebFullScreenManagerProxy.h2
-rw-r--r--Source/WebKit2/UIProcess/WebGrammarDetail.h2
-rw-r--r--Source/WebKit2/UIProcess/WebInspectorProxy.h2
-rw-r--r--Source/WebKit2/UIProcess/WebKeyValueStorageManagerProxy.h2
-rw-r--r--Source/WebKit2/UIProcess/WebMediaCacheManagerProxy.h2
-rw-r--r--Source/WebKit2/UIProcess/WebNavigationData.h2
-rw-r--r--Source/WebKit2/UIProcess/WebOpenPanelResultListenerProxy.h2
-rw-r--r--Source/WebKit2/UIProcess/WebPopupMenuProxy.h2
-rw-r--r--Source/WebKit2/UIProcess/WebPreferences.h2
-rw-r--r--Source/WebKit2/UIProcess/qt/PageViewportControllerClientQt.cpp2
-rw-r--r--Source/WebKit2/UIProcess/qt/PageViewportControllerClientQt.h2
36 files changed, 307 insertions, 58 deletions
diff --git a/Source/WebKit2/UIProcess/API/efl/PageClientImpl.cpp b/Source/WebKit2/UIProcess/API/efl/PageClientImpl.cpp
index 9e75e0828..f8519ce6b 100644
--- a/Source/WebKit2/UIProcess/API/efl/PageClientImpl.cpp
+++ b/Source/WebKit2/UIProcess/API/efl/PageClientImpl.cpp
@@ -39,6 +39,7 @@
#include "ewk_context_private.h"
#include "ewk_download_job.h"
#include "ewk_download_job_private.h"
+#include "ewk_view.h"
#include "ewk_view_private.h"
using namespace WebCore;
@@ -106,7 +107,12 @@ bool PageClientImpl::isViewInWindow()
void PageClientImpl::processDidCrash()
{
- notImplemented();
+ // Check if loading was ongoing, when web process crashed.
+ double loadProgress = ewk_view_load_progress_get(m_viewWidget);
+ if (loadProgress >= 0 && loadProgress < 1)
+ ewk_view_load_progress_changed(m_viewWidget, 1);
+
+ ewk_view_webprocess_crashed(m_viewWidget);
}
void PageClientImpl::didRelaunchProcess()
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_private.h b/Source/WebKit2/UIProcess/API/efl/ewk_private.h
index 86ca42d4e..96611e20d 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_private.h
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_private.h
@@ -31,4 +31,6 @@
#define COMPILE_ASSERT_MATCHING_ENUM(ewkName, webcoreName) \
COMPILE_ASSERT(int(ewkName) == int(webcoreName), mismatchingEnums)
+extern int _ewk_log_dom;
+
#endif // ewk_private_h
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_touch.h b/Source/WebKit2/UIProcess/API/efl/ewk_touch.h
new file mode 100644
index 000000000..1c9cdd59d
--- /dev/null
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_touch.h
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2012 Samsung Electronics
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef ewk_touch_h
+#define ewk_touch_h
+
+#include <Evas.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/// Represents types of touch event.
+typedef enum {
+ EWK_TOUCH_START,
+ EWK_TOUCH_MOVE,
+ EWK_TOUCH_END,
+ EWK_TOUCH_CANCEL
+} Ewk_Touch_Event_Type;
+
+/// Creates a type name for _Ewk_Touch_Point.
+typedef struct _Ewk_Touch_Point Ewk_Touch_Point;
+
+/// Represents a touch point.
+struct _Ewk_Touch_Point {
+ int id; /**< identifier of the touch event */
+ int x; /**< the horizontal position of the touch event */
+ int y; /**< the vertical position of the touch event */
+ Evas_Touch_Point_State state; /**< state of the touch event */
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // ewk_touch_h
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp b/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp
index dc77fb2cc..148a5b64c 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp
@@ -498,7 +498,10 @@ bool ewk_view_accelerated_compositing_mode_enter(const Evas_Object* ewkView)
EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
- EINA_SAFETY_ON_NULL_RETURN_VAL(priv->evasGl, false);
+ if (priv->evasGl) {
+ EINA_LOG_DOM_WARN(_ewk_log_dom, "Accelerated compositing mode already entered.");
+ return false;
+ }
Evas* evas = evas_object_evas_get(ewkView);
priv->evasGl = evas_gl_new(evas);
@@ -1623,3 +1626,26 @@ Eina_Bool ewk_view_mouse_events_enabled_get(const Evas_Object* ewkView)
return priv->areMouseEventsEnabled;
}
+
+/**
+ * @internal
+ * Web process has crashed.
+ *
+ * Emits signal: "webprocess,crashed" with pointer to crash handling boolean.
+ */
+void ewk_view_webprocess_crashed(Evas_Object* ewkView)
+{
+ EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
+ EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
+
+ bool handled = false;
+ evas_object_smart_callback_call(ewkView, "webprocess,crashed", &handled);
+
+ if (!handled) {
+ CString url = priv->pageProxy->urlAtProcessExit().utf8();
+ EINA_LOG_DOM_WARN(_ewk_log_dom, "WARNING: The web process experienced a crash on '%s'.\n", url.data());
+
+ // Display an error page
+ ewk_view_html_string_load(ewkView, "The web process has crashed.", 0, url.data());
+ }
+}
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_view.h b/Source/WebKit2/UIProcess/API/efl/ewk_view.h
index b040fdf30..996a2bbf5 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_view.h
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_view.h
@@ -64,6 +64,7 @@
* - "text,found", unsigned int*: the requested text was found and it gives the number of matches.
* - "title,changed", const char*: title of the main frame was changed.
* - "uri,changed", const char*: uri of the main frame was changed.
+ * - "webprocess,crashed", Eina_Bool*: expects a @c EINA_TRUE if web process crash is handled; @c EINA_FALSE, otherwise.
*/
#ifndef ewk_view_h
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_view_private.h b/Source/WebKit2/UIProcess/API/efl/ewk_view_private.h
index fcd65ee0f..88f9aab07 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_view_private.h
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_view_private.h
@@ -101,5 +101,6 @@ bool ewk_view_accelerated_compositing_mode_exit(const Evas_Object* ewkView);
#endif
void ewk_view_popup_menu_request(Evas_Object* ewkView, WebKit::WebPopupMenuProxyEfl* popupMenu, const WebCore::IntRect&, WebCore::TextDirection, double pageScaleFactor, const Vector<WebKit::WebPopupItem>& items, int32_t selectedIndex);
+void ewk_view_webprocess_crashed(Evas_Object* ewkView);
#endif // ewk_view_private_h
diff --git a/Source/WebKit2/UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h b/Source/WebKit2/UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h
index fa6abd160..717607897 100644
--- a/Source/WebKit2/UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h
+++ b/Source/WebKit2/UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h
@@ -29,6 +29,8 @@ namespace EWK2UnitTest {
class EWK2UnitTestBase : public ::testing::Test {
public:
+ Ecore_Evas* backingStore() { return m_ecoreEvas; }
+ Evas* canvas() { return ecore_evas_get(m_ecoreEvas); }
Evas_Object* webView() { return m_webView; }
Ewk_View_Smart_Class* ewkViewClass() { return &m_ewkViewClass; }
diff --git a/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_refptr_evas_object.cpp b/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_refptr_evas_object.cpp
new file mode 100644
index 000000000..fb6e57269
--- /dev/null
+++ b/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_refptr_evas_object.cpp
@@ -0,0 +1,134 @@
+/*
+ * Copyright (C) 2012 Intel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#include "UnitTestUtils/EWK2UnitTestBase.h"
+#include "UnitTestUtils/EWK2UnitTestEnvironment.h"
+#include <EWebKit2.h>
+#include <Ecore_Evas.h>
+#include <Evas.h>
+#include <gtest/gtest.h>
+#include <wtf/OwnPtr.h>
+#include <wtf/PassOwnPtr.h>
+#include <wtf/efl/RefPtrEfl.h>
+
+using namespace EWK2UnitTest;
+
+extern EWK2UnitTestEnvironment* environment;
+
+TEST_F(EWK2UnitTestBase, construction)
+{
+ RefPtr<Evas_Object> nullObject = 0;
+ ASSERT_FALSE(nullObject);
+
+ RefPtr<Evas_Object> object;
+ ASSERT_FALSE(object);
+
+ object = adoptRef(evas_object_box_add(canvas()));
+ ASSERT_TRUE(object);
+
+ object = 0;
+ ASSERT_FALSE(object);
+
+ object = adoptRef(evas_object_box_add(canvas()));
+ ASSERT_TRUE(object);
+
+ object.clear();
+ ASSERT_FALSE(object);
+}
+
+TEST_F(EWK2UnitTestBase, reffing)
+{
+ RefPtr<Evas_Object> object = adoptRef(evas_object_box_add(canvas()));
+ ASSERT_TRUE(object);
+ // Evas_Objec external ref count is not as you would expect.
+ ASSERT_EQ(evas_object_ref_get(object.get()), 0);
+
+ {
+ RefPtr<Evas_Object> aRef = object;
+ ASSERT_TRUE(object);
+ ASSERT_TRUE(aRef);
+ ASSERT_EQ(evas_object_ref_get(object.get()), 1);
+ ASSERT_EQ(evas_object_ref_get(aRef.get()), 1);
+
+ {
+ RefPtr<Evas_Object> bRef = object;
+
+ ASSERT_TRUE(object);
+ ASSERT_TRUE(aRef);
+ ASSERT_TRUE(bRef);
+
+ ASSERT_EQ(evas_object_ref_get(object.get()), 2);
+ ASSERT_EQ(evas_object_ref_get(aRef.get()), 2);
+
+ RefPtr<Evas_Object> cRef = bRef;
+ ASSERT_TRUE(cRef);
+
+ ASSERT_EQ(evas_object_ref_get(object.get()), 3);
+ ASSERT_EQ(evas_object_ref_get(aRef.get()), 3);
+ ASSERT_EQ(evas_object_ref_get(bRef.get()), 3);
+ ASSERT_EQ(evas_object_ref_get(cRef.get()), 3);
+
+ bRef.clear();
+ ASSERT_EQ(evas_object_ref_get(object.get()), 2);
+ ASSERT_EQ(evas_object_ref_get(aRef.get()), 2);
+ ASSERT_EQ(evas_object_ref_get(cRef.get()), 2);
+ }
+ ASSERT_EQ(evas_object_ref_get(object.get()), 1);
+ ASSERT_EQ(evas_object_ref_get(aRef.get()), 1);
+ }
+ ASSERT_EQ(evas_object_ref_get(object.get()), 0);
+}
+
+TEST_F(EWK2UnitTestBase, destruction)
+{
+ RefPtr<Evas_Object> object = adoptRef(evas_object_box_add(canvas()));
+ ASSERT_TRUE(object);
+ ASSERT_EQ(evas_object_ref_get(object.get()), 0);
+
+ RefPtr<Evas_Object> aRef = object;
+ ASSERT_TRUE(object);
+ ASSERT_TRUE(aRef);
+ ASSERT_EQ(evas_object_ref_get(object.get()), 1);
+ ASSERT_EQ(evas_object_ref_get(aRef.get()), 1);
+
+ object = nullptr;
+ ASSERT_EQ(evas_object_ref_get(object.get()), 0);
+ ASSERT_EQ(evas_object_ref_get(aRef.get()), 0);
+
+ object = aRef;
+ ASSERT_EQ(evas_object_ref_get(object.get()), 1);
+ ASSERT_EQ(evas_object_ref_get(aRef.get()), 1);
+
+ object = 0;
+ ASSERT_EQ(evas_object_ref_get(object.get()), 0);
+ ASSERT_EQ(evas_object_ref_get(aRef.get()), 0);
+
+ aRef.clear();
+ ASSERT_FALSE(aRef);
+ ASSERT_FALSE(object);
+}
+
diff --git a/Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp b/Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp
index 6fefb652b..e35f603ff 100644
--- a/Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp
+++ b/Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp
@@ -1268,6 +1268,8 @@ void webkitWebViewMakePermissionRequest(WebKitWebView* webView, WebKitPermission
void webkitWebViewMouseTargetChanged(WebKitWebView* webView, WKHitTestResultRef wkHitTestResult, unsigned modifiers)
{
+ webkitWebViewBaseSetTooltipArea(WEBKIT_WEB_VIEW_BASE(webView), toImpl(wkHitTestResult)->elementBoundingBox());
+
WebKitWebViewPrivate* priv = webView->priv;
if (priv->mouseTargetHitTestResult
&& priv->mouseTargetModifiers == modifiers
diff --git a/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp b/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp
index f5bd2ddcc..0482b347e 100644
--- a/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp
+++ b/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp
@@ -84,6 +84,7 @@ struct _WebKitWebViewBasePrivate {
GRefPtr<GtkIMContext> imContext;
GtkClickCounter clickCounter;
CString tooltipText;
+ IntRect tooltipArea;
GtkDragAndDropHelper dragAndDropHelper;
DragIcon dragIcon;
IntSize resizerSize;
@@ -502,9 +503,13 @@ static gboolean webkitWebViewBaseQueryTooltip(GtkWidget* widget, gint x, gint y,
if (priv->tooltipText.length() <= 0)
return FALSE;
- // TODO: set the tip area when WKPageMouseDidMoveOverElementCallback
- // receives a hit test result.
+ if (!priv->tooltipArea.isEmpty()) {
+ GdkRectangle area = priv->tooltipArea;
+ gtk_tooltip_set_tip_area(tooltip, &area);
+ } else
+ gtk_tooltip_set_tip_area(tooltip, 0);
gtk_tooltip_set_text(tooltip, priv->tooltipText.data());
+
return TRUE;
}
@@ -691,6 +696,11 @@ void webkitWebViewBaseSetTooltipText(WebKitWebViewBase* webViewBase, const char*
gtk_widget_trigger_tooltip_query(GTK_WIDGET(webViewBase));
}
+void webkitWebViewBaseSetTooltipArea(WebKitWebViewBase* webViewBase, const IntRect& tooltipArea)
+{
+ webViewBase->priv->tooltipArea = tooltipArea;
+}
+
void webkitWebViewBaseStartDrag(WebKitWebViewBase* webViewBase, const DragData& dragData, PassRefPtr<ShareableBitmap> dragImage)
{
WebKitWebViewBasePrivate* priv = webViewBase->priv;
diff --git a/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBasePrivate.h b/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBasePrivate.h
index 70cc72575..1295f3d53 100644
--- a/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBasePrivate.h
+++ b/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBasePrivate.h
@@ -40,6 +40,7 @@ GtkIMContext* webkitWebViewBaseGetIMContext(WebKitWebViewBase*);
WebPageProxy* webkitWebViewBaseGetPage(WebKitWebViewBase*);
void webkitWebViewBaseCreateWebPage(WebKitWebViewBase*, WKContextRef, WKPageGroupRef);
void webkitWebViewBaseSetTooltipText(WebKitWebViewBase*, const char*);
+void webkitWebViewBaseSetTooltipArea(WebKitWebViewBase*, const WebCore::IntRect&);
void webkitWebViewBaseForwardNextKeyEvent(WebKitWebViewBase*);
void webkitWebViewBaseStartDrag(WebKitWebViewBase*, const WebCore::DragData&, PassRefPtr<ShareableBitmap> dragImage);
void webkitWebViewBaseChildMoveResize(WebKitWebViewBase*, GtkWidget*, const WebCore::IntRect&);
diff --git a/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp b/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp
index bacae91ec..80f1ba7f0 100644
--- a/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp
+++ b/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp
@@ -349,10 +349,6 @@ bool QQuickWebViewPrivate::transparentBackground() const
return webPageProxy->drawsTransparentBackground();
}
-/*!
- \qmlsignal WebView::loadingChanged(WebLoadRequest request)
-*/
-
void QQuickWebViewPrivate::provisionalLoadDidStart(const WTF::String& url)
{
Q_Q(QQuickWebView);
@@ -1439,7 +1435,6 @@ QQuickWebPage* QQuickWebViewExperimental::page()
/*!
\page index.html
-
\title QtWebKit: QML WebView version 3.0
The WebView API allows QML applications to render regions of dynamic
@@ -1447,12 +1442,12 @@ QQuickWebPage* QQuickWebViewExperimental::page()
QML components or encompass the full screen as specified within the
QML application.
- QML WebView version 3.0 is incompatible with previous QML WebView API
- versions. It allows an application to load pages into the WebView,
- either by URL or with an HTML string, and navigate within session
- history. By default, links to different pages load within the same
- WebView, but applications may intercept requests to delegate links to
- other functions.
+ QML WebView version 3.0 is incompatible with previous QML \l
+ {QtWebKit1::WebView} {WebView} API versions. It allows an
+ application to load pages into the WebView, either by URL or with
+ an HTML string, and navigate within session history. By default,
+ links to different pages load within the same WebView, but applications
+ may intercept requests to delegate links to other functions.
This sample QML application loads a web page, responds to session
history context, and intercepts requests for external links:
@@ -1485,6 +1480,7 @@ QQuickWebPage* QQuickWebViewExperimental::page()
/*!
\qmltype WebView
+ \instantiates QQuickWebView
\inqmlmodule QtWebKit 3.0
\brief A WebView renders web content within a QML application
*/
diff --git a/Source/WebKit2/UIProcess/API/qt/qwebloadrequest.cpp b/Source/WebKit2/UIProcess/API/qt/qwebloadrequest.cpp
index 39f314c3b..eebf20d76 100644
--- a/Source/WebKit2/UIProcess/API/qt/qwebloadrequest.cpp
+++ b/Source/WebKit2/UIProcess/API/qt/qwebloadrequest.cpp
@@ -40,15 +40,16 @@ public:
};
/*!
- \qmlclass WebLoadRequest QWebLoadRequest
+ \qmltype WebLoadRequest
+ \instantiates QWebLoadRequest
+ \inqmlmodule QtWebKit 3.0
+
\brief A utility class for the WebView::loadingChanged signal.
This class contains information about a requested load of a web page, like the URL and
current loading status (started, finished, failed).
- \sa WebView::loadingChanged(WebLoadRequest)
-
- \inqmlmodule QtWebKit 3.0
+ \sa WebView::onLoadingChanged
*/
QWebLoadRequest::QWebLoadRequest(const QUrl& url, QQuickWebView::LoadStatus status, const QString& errorString, QQuickWebView::ErrorDomain errorDomain, int errorCode, QObject* parent)
: QObject(parent)
@@ -80,7 +81,8 @@ QUrl QWebLoadRequest::url() const
\li WebView::LoadFailedStatus - the page has failed loading.
\endlist
- \sa WebLoadRequest, WebView::loadingChanged(WebLoadRequest)
+ \sa WebLoadRequest
+ \sa WebView::onLoadingChanged
*/
QQuickWebView::LoadStatus QWebLoadRequest::status() const
{
diff --git a/Source/WebKit2/UIProcess/Authentication/AuthenticationDecisionListener.h b/Source/WebKit2/UIProcess/Authentication/AuthenticationDecisionListener.h
index 00af84965..b2f92f4b0 100644
--- a/Source/WebKit2/UIProcess/Authentication/AuthenticationDecisionListener.h
+++ b/Source/WebKit2/UIProcess/Authentication/AuthenticationDecisionListener.h
@@ -50,7 +50,7 @@ public:
void detachChallenge();
private:
- AuthenticationDecisionListener(AuthenticationChallengeProxy* authenticationChallenge);
+ explicit AuthenticationDecisionListener(AuthenticationChallengeProxy*);
virtual Type type() const { return APIType; }
diff --git a/Source/WebKit2/UIProcess/Authentication/WebCredential.h b/Source/WebKit2/UIProcess/Authentication/WebCredential.h
index b07a8a6ec..9f42d02e4 100644
--- a/Source/WebKit2/UIProcess/Authentication/WebCredential.h
+++ b/Source/WebKit2/UIProcess/Authentication/WebCredential.h
@@ -63,8 +63,8 @@ public:
const String& user() const;
private:
- WebCredential(const WebCore::Credential&);
- WebCredential(WebCertificateInfo*);
+ explicit WebCredential(const WebCore::Credential&);
+ explicit WebCredential(WebCertificateInfo*);
virtual Type type() const { return APIType; }
diff --git a/Source/WebKit2/UIProcess/Authentication/WebProtectionSpace.h b/Source/WebKit2/UIProcess/Authentication/WebProtectionSpace.h
index 604236a62..7c3882aad 100644
--- a/Source/WebKit2/UIProcess/Authentication/WebProtectionSpace.h
+++ b/Source/WebKit2/UIProcess/Authentication/WebProtectionSpace.h
@@ -51,7 +51,7 @@ public:
WebCore::ProtectionSpaceAuthenticationScheme authenticationScheme() const;
private:
- WebProtectionSpace(const WebCore::ProtectionSpace&);
+ explicit WebProtectionSpace(const WebCore::ProtectionSpace&);
virtual Type type() const { return APIType; }
diff --git a/Source/WebKit2/UIProcess/GenericCallback.h b/Source/WebKit2/UIProcess/GenericCallback.h
index b0d7b9b1c..5b6a0f9bb 100644
--- a/Source/WebKit2/UIProcess/GenericCallback.h
+++ b/Source/WebKit2/UIProcess/GenericCallback.h
@@ -44,7 +44,7 @@ public:
uint64_t callbackID() const { return m_callbackID; }
protected:
- CallbackBase(void* context)
+ explicit CallbackBase(void* context)
: m_context(context)
, m_callbackID(generateCallbackID())
{
diff --git a/Source/WebKit2/UIProcess/InspectorServer/WebSocketServer.h b/Source/WebKit2/UIProcess/InspectorServer/WebSocketServer.h
index 56aa7fb26..ecffaf84f 100644
--- a/Source/WebKit2/UIProcess/InspectorServer/WebSocketServer.h
+++ b/Source/WebKit2/UIProcess/InspectorServer/WebSocketServer.h
@@ -51,7 +51,7 @@ class WebSocketServerConnection;
class WebSocketServer {
public:
enum ServerState { Closed, Listening };
- WebSocketServer(WebSocketServerClient*);
+ explicit WebSocketServer(WebSocketServerClient*);
virtual ~WebSocketServer();
// Server operations.
diff --git a/Source/WebKit2/UIProcess/PageViewportController.cpp b/Source/WebKit2/UIProcess/PageViewportController.cpp
index 71ec685c2..e9a513af1 100644
--- a/Source/WebKit2/UIProcess/PageViewportController.cpp
+++ b/Source/WebKit2/UIProcess/PageViewportController.cpp
@@ -28,6 +28,8 @@
#include <WebCore/FloatSize.h>
#include <wtf/MathExtras.h>
+using namespace WebCore;
+
namespace WebKit {
static inline float bound(float min, float value, float max)
diff --git a/Source/WebKit2/UIProcess/PageViewportController.h b/Source/WebKit2/UIProcess/PageViewportController.h
index 0746ff1df..1820d8d69 100644
--- a/Source/WebKit2/UIProcess/PageViewportController.h
+++ b/Source/WebKit2/UIProcess/PageViewportController.h
@@ -32,8 +32,6 @@ class IntPoint;
class IntSize;
}
-using namespace WebCore;
-
namespace WebKit {
class WebPageProxy;
@@ -76,11 +74,11 @@ public:
void suspendContent();
void resumeContent();
- FloatRect positionRangeForContentAtScale(float viewportScale) const;
+ WebCore::FloatRect positionRangeForContentAtScale(float viewportScale) const;
float convertFromViewport(float value) const { return value / m_devicePixelRatio; }
float convertToViewport(float value) const { return value * m_devicePixelRatio; }
- FloatRect convertToViewport(const FloatRect&) const;
+ WebCore::FloatRect convertToViewport(const WebCore::FloatRect&) const;
float innerBoundedContentsScale(float) const;
float outerBoundedContentsScale(float) const;
@@ -89,7 +87,7 @@ public:
bool hadUserInteraction() const { return m_hadUserInteraction; }
bool allowsUserScaling() const { return m_allowsUserScaling; }
- FloatSize contentsLayoutSize() const { return m_rawAttributes.layoutSize; }
+ WebCore::FloatSize contentsLayoutSize() const { return m_rawAttributes.layoutSize; }
float devicePixelRatio() const { return m_devicePixelRatio; }
float minimumContentsScale() const { return m_minimumScale; }
float maximumContentsScale() const { return m_maximumScale; }
@@ -98,21 +96,21 @@ public:
void setHadUserInteraction(bool didUserInteract) { m_hadUserInteraction = didUserInteract; }
// Notifications to the WebProcess.
- void setViewportSize(const FloatSize& newSize);
- void setVisibleContentsRect(const FloatRect& visibleContentsRect, float viewportScale, const FloatPoint& trajectoryVector = FloatPoint::zero());
+ void setViewportSize(const WebCore::FloatSize& newSize);
+ void setVisibleContentsRect(const WebCore::FloatRect& visibleContentsRect, float viewportScale, const WebCore::FloatPoint& trajectoryVector = WebCore::FloatPoint::zero());
// Notifications from the WebProcess.
- void didChangeContentsSize(const IntSize& newSize);
- void didChangeViewportAttributes(const ViewportAttributes&);
- void pageDidRequestScroll(const IntPoint& cssPosition);
+ void didChangeContentsSize(const WebCore::IntSize& newSize);
+ void didChangeViewportAttributes(const WebCore::ViewportAttributes&);
+ void pageDidRequestScroll(const WebCore::IntPoint& cssPosition);
private:
- void syncVisibleContents(const FloatPoint &trajectoryVector = FloatPoint::zero());
+ void syncVisibleContents(const WebCore::FloatPoint &trajectoryVector = WebCore::FloatPoint::zero());
WebPageProxy* const m_webPageProxy;
PageViewportControllerClient* m_client;
- ViewportAttributes m_rawAttributes;
+ WebCore::ViewportAttributes m_rawAttributes;
bool m_allowsUserScaling;
float m_minimumScale;
@@ -123,16 +121,16 @@ private:
bool m_hasSuspendedContent;
bool m_hadUserInteraction;
- FloatSize m_viewportSize;
- FloatSize m_contentsSize;
- FloatRect m_visibleContentsRect;
+ WebCore::FloatSize m_viewportSize;
+ WebCore::FloatSize m_contentsSize;
+ WebCore::FloatRect m_visibleContentsRect;
float m_effectiveScale; // Should always be cssScale * devicePixelRatio.
friend class ViewportUpdateDeferrer;
};
bool fuzzyCompare(float, float, float epsilon);
-FloatPoint boundPosition(const FloatPoint minPosition, const FloatPoint& position, const FloatPoint& maxPosition);
+WebCore::FloatPoint boundPosition(const WebCore::FloatPoint minPosition, const WebCore::FloatPoint& position, const WebCore::FloatPoint& maxPosition);
} // namespace WebKit
diff --git a/Source/WebKit2/UIProcess/Plugins/mac/PluginInfoStoreMac.mm b/Source/WebKit2/UIProcess/Plugins/mac/PluginInfoStoreMac.mm
index 9b86aaed3..29c744ffd 100644
--- a/Source/WebKit2/UIProcess/Plugins/mac/PluginInfoStoreMac.mm
+++ b/Source/WebKit2/UIProcess/Plugins/mac/PluginInfoStoreMac.mm
@@ -115,8 +115,14 @@ bool PluginInfoStore::shouldUsePlugin(Vector<PluginModuleInfo>& alreadyLoadedPlu
const PluginModuleInfo& loadedPlugin = alreadyLoadedPlugins[i];
// If a plug-in with the same bundle identifier already exists, we don't want to load it.
- if (loadedPlugin.bundleIdentifier == plugin.bundleIdentifier)
- return false;
+ // However, if the already existing plug-in is blocked we want to replace it with the new plug-in.
+ if (loadedPlugin.bundleIdentifier == plugin.bundleIdentifier) {
+ if (!shouldBlockPlugin(loadedPlugin))
+ return false;
+
+ alreadyLoadedPlugins.remove(i);
+ break;
+ }
}
// Prefer the Oracle Java plug-in over the Apple java plug-in.
diff --git a/Source/WebKit2/UIProcess/ResponsivenessTimer.h b/Source/WebKit2/UIProcess/ResponsivenessTimer.h
index 307b3b169..8db2872fd 100644
--- a/Source/WebKit2/UIProcess/ResponsivenessTimer.h
+++ b/Source/WebKit2/UIProcess/ResponsivenessTimer.h
@@ -40,7 +40,7 @@ public:
virtual void didBecomeResponsive(ResponsivenessTimer*) = 0;
};
- ResponsivenessTimer(ResponsivenessTimer::Client*);
+ explicit ResponsivenessTimer(ResponsivenessTimer::Client*);
~ResponsivenessTimer();
void start();
diff --git a/Source/WebKit2/UIProcess/WebApplicationCacheManagerProxy.h b/Source/WebKit2/UIProcess/WebApplicationCacheManagerProxy.h
index b3dca15b6..597f8d7e1 100644
--- a/Source/WebKit2/UIProcess/WebApplicationCacheManagerProxy.h
+++ b/Source/WebKit2/UIProcess/WebApplicationCacheManagerProxy.h
@@ -68,7 +68,7 @@ public:
bool shouldTerminate(WebProcessProxy*) const;
private:
- WebApplicationCacheManagerProxy(WebContext*);
+ explicit WebApplicationCacheManagerProxy(WebContext*);
virtual Type type() const { return APIType; }
diff --git a/Source/WebKit2/UIProcess/WebBackForwardList.h b/Source/WebKit2/UIProcess/WebBackForwardList.h
index d78ed5a67..b6de90b03 100644
--- a/Source/WebKit2/UIProcess/WebBackForwardList.h
+++ b/Source/WebKit2/UIProcess/WebBackForwardList.h
@@ -85,7 +85,7 @@ public:
#endif
private:
- WebBackForwardList(WebPageProxy*);
+ explicit WebBackForwardList(WebPageProxy*);
virtual Type type() const { return APIType; }
diff --git a/Source/WebKit2/UIProcess/WebContextUserMessageCoders.h b/Source/WebKit2/UIProcess/WebContextUserMessageCoders.h
index 5693751e0..ffe322811 100644
--- a/Source/WebKit2/UIProcess/WebContextUserMessageCoders.h
+++ b/Source/WebKit2/UIProcess/WebContextUserMessageCoders.h
@@ -41,7 +41,7 @@ class WebContextUserMessageEncoder : public UserMessageEncoder<WebContextUserMes
public:
typedef UserMessageEncoder<WebContextUserMessageEncoder> Base;
- WebContextUserMessageEncoder(APIObject* root)
+ explicit WebContextUserMessageEncoder(APIObject* root)
: Base(root)
{
}
diff --git a/Source/WebKit2/UIProcess/WebFullScreenManagerProxy.h b/Source/WebKit2/UIProcess/WebFullScreenManagerProxy.h
index 61435d647..b83af5476 100644
--- a/Source/WebKit2/UIProcess/WebFullScreenManagerProxy.h
+++ b/Source/WebKit2/UIProcess/WebFullScreenManagerProxy.h
@@ -90,7 +90,7 @@ public:
void requestExitFullScreen();
private:
- WebFullScreenManagerProxy(WebPageProxy*);
+ explicit WebFullScreenManagerProxy(WebPageProxy*);
void supportsFullScreen(bool withKeyboard, bool&);
void enterFullScreen();
diff --git a/Source/WebKit2/UIProcess/WebGrammarDetail.h b/Source/WebKit2/UIProcess/WebGrammarDetail.h
index ff79b5cce..2fcebc0ec 100644
--- a/Source/WebKit2/UIProcess/WebGrammarDetail.h
+++ b/Source/WebKit2/UIProcess/WebGrammarDetail.h
@@ -50,7 +50,7 @@ public:
private:
WebGrammarDetail(int location, int length, ImmutableArray* guesses, const String& userDescription);
- WebGrammarDetail(const WebCore::GrammarDetail&);
+ explicit WebGrammarDetail(const WebCore::GrammarDetail&);
virtual Type type() const { return APIType; }
diff --git a/Source/WebKit2/UIProcess/WebInspectorProxy.h b/Source/WebKit2/UIProcess/WebInspectorProxy.h
index 1f53cccf0..b80700429 100644
--- a/Source/WebKit2/UIProcess/WebInspectorProxy.h
+++ b/Source/WebKit2/UIProcess/WebInspectorProxy.h
@@ -144,7 +144,7 @@ public:
#endif
private:
- WebInspectorProxy(WebPageProxy* page);
+ explicit WebInspectorProxy(WebPageProxy*);
virtual Type type() const { return APIType; }
diff --git a/Source/WebKit2/UIProcess/WebKeyValueStorageManagerProxy.h b/Source/WebKit2/UIProcess/WebKeyValueStorageManagerProxy.h
index 79cb03ee9..2be77c351 100644
--- a/Source/WebKit2/UIProcess/WebKeyValueStorageManagerProxy.h
+++ b/Source/WebKit2/UIProcess/WebKeyValueStorageManagerProxy.h
@@ -68,7 +68,7 @@ public:
bool shouldTerminate(WebProcessProxy*) const;
private:
- WebKeyValueStorageManagerProxy(WebContext*);
+ explicit WebKeyValueStorageManagerProxy(WebContext*);
virtual Type type() const { return APIType; }
diff --git a/Source/WebKit2/UIProcess/WebMediaCacheManagerProxy.h b/Source/WebKit2/UIProcess/WebMediaCacheManagerProxy.h
index 43231e5e6..adc68c4ab 100644
--- a/Source/WebKit2/UIProcess/WebMediaCacheManagerProxy.h
+++ b/Source/WebKit2/UIProcess/WebMediaCacheManagerProxy.h
@@ -66,7 +66,7 @@ public:
bool shouldTerminate(WebProcessProxy*) const;
private:
- WebMediaCacheManagerProxy(WebContext*);
+ explicit WebMediaCacheManagerProxy(WebContext*);
virtual Type type() const { return APIType; }
diff --git a/Source/WebKit2/UIProcess/WebNavigationData.h b/Source/WebKit2/UIProcess/WebNavigationData.h
index a2788d6bc..c2e20f368 100644
--- a/Source/WebKit2/UIProcess/WebNavigationData.h
+++ b/Source/WebKit2/UIProcess/WebNavigationData.h
@@ -48,7 +48,7 @@ public:
const WebCore::ResourceRequest& originalRequest() const { return m_store.originalRequest; }
private:
- WebNavigationData(const WebNavigationDataStore&);
+ explicit WebNavigationData(const WebNavigationDataStore&);
virtual Type type() const { return APIType; }
diff --git a/Source/WebKit2/UIProcess/WebOpenPanelResultListenerProxy.h b/Source/WebKit2/UIProcess/WebOpenPanelResultListenerProxy.h
index ba931dcf3..5ec369c9b 100644
--- a/Source/WebKit2/UIProcess/WebOpenPanelResultListenerProxy.h
+++ b/Source/WebKit2/UIProcess/WebOpenPanelResultListenerProxy.h
@@ -52,7 +52,7 @@ public:
void invalidate();
private:
- WebOpenPanelResultListenerProxy(WebPageProxy*);
+ explicit WebOpenPanelResultListenerProxy(WebPageProxy*);
virtual Type type() const { return APIType; }
diff --git a/Source/WebKit2/UIProcess/WebPopupMenuProxy.h b/Source/WebKit2/UIProcess/WebPopupMenuProxy.h
index d5bfa4c5c..0d7788dc4 100644
--- a/Source/WebKit2/UIProcess/WebPopupMenuProxy.h
+++ b/Source/WebKit2/UIProcess/WebPopupMenuProxy.h
@@ -72,7 +72,7 @@ public:
void invalidate() { m_client = 0; }
protected:
- WebPopupMenuProxy(Client* client)
+ explicit WebPopupMenuProxy(Client* client)
: m_client(client)
{
}
diff --git a/Source/WebKit2/UIProcess/WebPreferences.h b/Source/WebKit2/UIProcess/WebPreferences.h
index 1cb9731e1..81d9580a4 100644
--- a/Source/WebKit2/UIProcess/WebPreferences.h
+++ b/Source/WebKit2/UIProcess/WebPreferences.h
@@ -79,7 +79,7 @@ public:
private:
WebPreferences();
- WebPreferences(const String& identifier);
+ explicit WebPreferences(const String&);
WebPreferences(const WebPreferences&);
void platformInitializeStore();
diff --git a/Source/WebKit2/UIProcess/qt/PageViewportControllerClientQt.cpp b/Source/WebKit2/UIProcess/qt/PageViewportControllerClientQt.cpp
index 3d134ea93..c517023e2 100644
--- a/Source/WebKit2/UIProcess/qt/PageViewportControllerClientQt.cpp
+++ b/Source/WebKit2/UIProcess/qt/PageViewportControllerClientQt.cpp
@@ -32,6 +32,8 @@
#include <WebCore/FloatRect.h>
#include <WebCore/FloatSize.h>
+using namespace WebCore;
+
namespace WebKit {
static const int kScaleAnimationDurationMillis = 250;
diff --git a/Source/WebKit2/UIProcess/qt/PageViewportControllerClientQt.h b/Source/WebKit2/UIProcess/qt/PageViewportControllerClientQt.h
index 8b2819ad8..19b27ae9e 100644
--- a/Source/WebKit2/UIProcess/qt/PageViewportControllerClientQt.h
+++ b/Source/WebKit2/UIProcess/qt/PageViewportControllerClientQt.h
@@ -47,7 +47,7 @@ public:
PageViewportControllerClientQt(QQuickWebView*, QQuickWebPage*);
~PageViewportControllerClientQt();
- virtual void setContentsPosition(const FloatPoint& localPoint);
+ virtual void setContentsPosition(const WebCore::FloatPoint& localPoint);
virtual void setContentsScale(float localScale, bool treatAsInitialValue);
virtual void didResumeContent();