Diff
Modified: releases/WebKitGTK/webkit-2.4/Source/WebKit2/ChangeLog (163781 => 163782)
--- releases/WebKitGTK/webkit-2.4/Source/WebKit2/ChangeLog 2014-02-10 13:46:59 UTC (rev 163781)
+++ releases/WebKitGTK/webkit-2.4/Source/WebKit2/ChangeLog 2014-02-10 14:22:36 UTC (rev 163782)
@@ -1,3 +1,22 @@
+2014-02-08 Adrian Perez de Castro <ape...@igalia.com>
+
+ [GTK] Make process model names properly meaningful
+ https://bugs.webkit.org/show_bug.cgi?id=128389
+
+ Reviewed by Carlos Garcia Campos.
+
+ The name WEBKIT_PROCESS_MODEL_ONE_SECONDARY_PROCESS_PER_WEB_VIEW
+ is misleading because there are situations in which web views may
+ share the same web process even when multi-process mode is enabled;
+ for example when opening a related view and both interact using JS.
+
+ * UIProcess/API/gtk/WebKitWebContext.cpp:
+ (webkit_web_context_set_process_model):
+ (webkit_web_context_get_process_model):
+ Update names of WebKitProcessModel enum values.
+ * UIProcess/API/gtk/WebKitWebContext.h:
+ Ditto.
+
2014-02-09 Carlos Garnacho <carl...@gnome.org>
[GTK] Implement support touch events
Modified: releases/WebKitGTK/webkit-2.4/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp (163781 => 163782)
--- releases/WebKitGTK/webkit-2.4/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp 2014-02-10 13:46:59 UTC (rev 163781)
+++ releases/WebKitGTK/webkit-2.4/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp 2014-02-10 14:22:36 UTC (rev 163782)
@@ -162,9 +162,6 @@
static guint signals[LAST_SIGNAL] = { 0, };
-COMPILE_ASSERT_MATCHING_ENUM(WEBKIT_PROCESS_MODEL_SHARED_SECONDARY_PROCESS, ProcessModelSharedSecondaryProcess);
-COMPILE_ASSERT_MATCHING_ENUM(WEBKIT_PROCESS_MODEL_ONE_SECONDARY_PROCESS_PER_WEB_VIEW, ProcessModelMultipleSecondaryProcesses);
-
WEBKIT_DEFINE_TYPE(WebKitWebContext, webkit_web_context, G_TYPE_OBJECT)
static void webkit_web_context_class_init(WebKitWebContextClass* webContextClass)
@@ -897,15 +894,19 @@
* determine how auxiliary processes are handled. The default setting
* (%WEBKIT_PROCESS_MODEL_SHARED_SECONDARY_PROCESS) is suitable for most
* applications which embed a small amount of WebViews, or are used to
- * display documents which are considered safe -- like local files.
+ * display documents which are considered safe — like local files.
*
- * Applications which may potentially use a large amount of WebViews --for
- * example a multi-tabbed web browser-- may want to use
- * %WEBKIT_PROCESS_MODEL_ONE_SECONDARY_PROCESS_PER_WEB_VIEW to use one
- * process per view. Using this model, when a WebView hangs or crashes,
- * the rest of the WebViews in the application will still work normally.
+ * Applications which may potentially use a large amount of WebViews
+ * —for example a multi-tabbed web browser— may want to use
+ * %WEBKIT_PROCESS_MODEL_MULTIPLE_SECONDARY_PROCESSES, which will use
+ * one process per view most of the time, while still allowing for web
+ * views to share a process when needed (for example when different
+ * views interact with each other). Using this model, when a process
+ * hangs or crashes, only the WebViews using it stop working, while
+ * the rest of the WebViews in the application will still function
+ * normally.
*
- * This method <strong>must be called before any other functions</strong>,
+ * This method **must be called before any other functions**,
* as early as possible in your application. Calling it later will make
* your application crash.
*
@@ -915,10 +916,24 @@
{
g_return_if_fail(WEBKIT_IS_WEB_CONTEXT(context));
- if (processModel != context->priv->context->processModel()) {
- context->priv->context->setUsesNetworkProcess(processModel == ProcessModelMultipleSecondaryProcesses);
- context->priv->context->setProcessModel(static_cast<ProcessModel>(processModel));
+ ProcessModel newProcessModel;
+
+ switch (processModel) {
+ case WEBKIT_PROCESS_MODEL_SHARED_SECONDARY_PROCESS:
+ newProcessModel = ProcessModelSharedSecondaryProcess;
+ break;
+ case WEBKIT_PROCESS_MODEL_MULTIPLE_SECONDARY_PROCESSES:
+ newProcessModel = ProcessModelMultipleSecondaryProcesses;
+ break;
+ default:
+ g_assert_not_reached();
}
+
+ if (newProcessModel == context->priv->context->processModel())
+ return;
+
+ context->priv->context->setUsesNetworkProcess(newProcessModel == ProcessModelMultipleSecondaryProcesses);
+ context->priv->context->setProcessModel(newProcessModel);
}
/**
@@ -935,7 +950,15 @@
WebKitProcessModel webkit_web_context_get_process_model(WebKitWebContext* context)
{
g_return_val_if_fail(WEBKIT_IS_WEB_CONTEXT(context), WEBKIT_PROCESS_MODEL_SHARED_SECONDARY_PROCESS);
- return static_cast<WebKitProcessModel>(context->priv->context->processModel());
+
+ switch (context->priv->context->processModel()) {
+ case ProcessModelSharedSecondaryProcess:
+ return WEBKIT_PROCESS_MODEL_SHARED_SECONDARY_PROCESS;
+ case ProcessModelMultipleSecondaryProcesses:
+ return WEBKIT_PROCESS_MODEL_MULTIPLE_SECONDARY_PROCESSES;
+ default:
+ g_assert_not_reached();
+ }
}
WebKitDownload* webkitWebContextGetOrCreateDownload(DownloadProxy* downloadProxy)
Modified: releases/WebKitGTK/webkit-2.4/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.h (163781 => 163782)
--- releases/WebKitGTK/webkit-2.4/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.h 2014-02-10 13:46:59 UTC (rev 163781)
+++ releases/WebKitGTK/webkit-2.4/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.h 2014-02-10 14:22:36 UTC (rev 163782)
@@ -69,13 +69,15 @@
* #WebKitWebView instances created by the application: if the process
* hangs or crashes all the web views in the application will be affected.
* This is the default process model, and it should suffice for most cases.
- * @WEBKIT_PROCESS_MODEL_ONE_SECONDARY_PROCESS_PER_WEB_VIEW: Use one process
- * for each #WebKitWebView. The main advantage of this process model is that
- * the rendering process for a web view can crash while the rest of the
- * views keep working normally. This process model is indicated for
- * applications which may use a number of web views and the content of
- * in each must not interfere with the rest -- for example a full-fledged
- * web browser with support for multiple tabs.
+ * @WEBKIT_PROCESS_MODEL_MULTIPLE_SECONDARY_PROCESSES: Use one process
+ * for each #WebKitWebView, while still allowing for some of them to
+ * share a process in certain situations. The main advantage
+ * of this process model is that the rendering process for a web view
+ * can crash while the rest of the views keep working normally. This
+ * process model is indicated for applications which may use a number
+ * of web views and the content of in each must not interfere with the
+ * rest — for example a full-fledged web browser with support for
+ * multiple tabs.
*
* Enum values used for determining the #WebKitWebContext process model.
*
@@ -83,7 +85,7 @@
*/
typedef enum {
WEBKIT_PROCESS_MODEL_SHARED_SECONDARY_PROCESS,
- WEBKIT_PROCESS_MODEL_ONE_SECONDARY_PROCESS_PER_WEB_VIEW,
+ WEBKIT_PROCESS_MODEL_MULTIPLE_SECONDARY_PROCESSES,
} WebKitProcessModel;
/**
Modified: releases/WebKitGTK/webkit-2.4/Tools/ChangeLog (163781 => 163782)
--- releases/WebKitGTK/webkit-2.4/Tools/ChangeLog 2014-02-10 13:46:59 UTC (rev 163781)
+++ releases/WebKitGTK/webkit-2.4/Tools/ChangeLog 2014-02-10 14:22:36 UTC (rev 163782)
@@ -1,3 +1,22 @@
+2014-02-08 Adrian Perez de Castro <ape...@igalia.com>
+
+ [GTK] Make process model names properly meaningful
+ https://bugs.webkit.org/show_bug.cgi?id=128389
+
+ Reviewed by Carlos Garcia Campos.
+
+ The name WEBKIT_PROCESS_MODEL_ONE_SECONDARY_PROCESS_PER_WEB_VIEW
+ is misleading because there are situations in which web views may
+ share the same web process even when multi-process mode is enabled;
+ for example when opening a related view and both interact using JS.
+
+ * MiniBrowser/gtk/main.c:
+ (main):
+ Update usage of WebKitProcessModel enum values.
+ * TestWebKitAPI/Tests/WebKit2Gtk/TestMultiprocess.cpp:
+ (beforeAll):
+ Ditto.
+
2014-02-09 Carlos Garnacho <carl...@gnome.org>
[GTK] Enable touch features
Modified: releases/WebKitGTK/webkit-2.4/Tools/MiniBrowser/gtk/main.c (163781 => 163782)
--- releases/WebKitGTK/webkit-2.4/Tools/MiniBrowser/gtk/main.c 2014-02-10 13:46:59 UTC (rev 163781)
+++ releases/WebKitGTK/webkit-2.4/Tools/MiniBrowser/gtk/main.c 2014-02-10 14:22:36 UTC (rev 163782)
@@ -244,7 +244,7 @@
const gchar *multiprocess = g_getenv("MINIBROWSER_MULTIPROCESS");
if (multiprocess && *multiprocess) {
webkit_web_context_set_process_model(webkit_web_context_get_default(),
- WEBKIT_PROCESS_MODEL_ONE_SECONDARY_PROCESS_PER_WEB_VIEW);
+ WEBKIT_PROCESS_MODEL_MULTIPLE_SECONDARY_PROCESSES);
}
GOptionContext *context = g_option_context_new(NULL);
Modified: releases/WebKitGTK/webkit-2.4/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestMultiprocess.cpp (163781 => 163782)
--- releases/WebKitGTK/webkit-2.4/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestMultiprocess.cpp 2014-02-10 13:46:59 UTC (rev 163781)
+++ releases/WebKitGTK/webkit-2.4/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestMultiprocess.cpp 2014-02-10 14:22:36 UTC (rev 163782)
@@ -122,11 +122,11 @@
==, WEBKIT_PROCESS_MODEL_SHARED_SECONDARY_PROCESS);
webkit_web_context_set_process_model(webkit_web_context_get_default(),
- WEBKIT_PROCESS_MODEL_ONE_SECONDARY_PROCESS_PER_WEB_VIEW);
+ WEBKIT_PROCESS_MODEL_MULTIPLE_SECONDARY_PROCESSES);
// Check that the getter returns the newly-set value
g_assert_cmpuint(webkit_web_context_get_process_model(webkit_web_context_get_default()),
- ==, WEBKIT_PROCESS_MODEL_ONE_SECONDARY_PROCESS_PER_WEB_VIEW);
+ ==, WEBKIT_PROCESS_MODEL_MULTIPLE_SECONDARY_PROCESSES);
bus = new WebKitTestBus();
if (!bus->run())