<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[163782] releases/WebKitGTK/webkit-2.4</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/163782">163782</a></dd>
<dt>Author</dt> <dd>carlosgc@webkit.org</dd>
<dt>Date</dt> <dd>2014-02-10 06:22:36 -0800 (Mon, 10 Feb 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/163698">r163698</a> - [GTK] Make process model names properly meaningful
https://bugs.webkit.org/show_bug.cgi?id=128389
Patch by Adrian Perez de Castro <aperez@igalia.com> on 2014-02-08
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.
Source/WebKit2:
* 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.
Tools:
* MiniBrowser/gtk/main.c:
(main):
Update usage of WebKitProcessModel enum values.
* TestWebKitAPI/Tests/WebKit2Gtk/TestMultiprocess.cpp:
(beforeAll):
Ditto.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#releasesWebKitGTKwebkit24SourceWebKit2ChangeLog">releases/WebKitGTK/webkit-2.4/Source/WebKit2/ChangeLog</a></li>
<li><a href="#releasesWebKitGTKwebkit24SourceWebKit2UIProcessAPIgtkWebKitWebContextcpp">releases/WebKitGTK/webkit-2.4/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit24SourceWebKit2UIProcessAPIgtkWebKitWebContexth">releases/WebKitGTK/webkit-2.4/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.h</a></li>
<li><a href="#releasesWebKitGTKwebkit24ToolsChangeLog">releases/WebKitGTK/webkit-2.4/Tools/ChangeLog</a></li>
<li><a href="#releasesWebKitGTKwebkit24ToolsMiniBrowsergtkmainc">releases/WebKitGTK/webkit-2.4/Tools/MiniBrowser/gtk/main.c</a></li>
<li><a href="#releasesWebKitGTKwebkit24ToolsTestWebKitAPITestsWebKit2GtkTestMultiprocesscpp">releases/WebKitGTK/webkit-2.4/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestMultiprocess.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="releasesWebKitGTKwebkit24SourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.4/Source/WebKit2/ChangeLog (163781 => 163782)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -1,3 +1,22 @@
</span><ins>+2014-02-08 Adrian Perez de Castro <aperez@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.
+
</ins><span class="cx"> 2014-02-09 Carlos Garnacho <carlosg@gnome.org>
</span><span class="cx">
</span><span class="cx"> [GTK] Implement support touch events
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit24SourceWebKit2UIProcessAPIgtkWebKitWebContextcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.4/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp (163781 => 163782)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -162,9 +162,6 @@
</span><span class="cx">
</span><span class="cx"> static guint signals[LAST_SIGNAL] = { 0, };
</span><span class="cx">
</span><del>-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);
-
</del><span class="cx"> WEBKIT_DEFINE_TYPE(WebKitWebContext, webkit_web_context, G_TYPE_OBJECT)
</span><span class="cx">
</span><span class="cx"> static void webkit_web_context_class_init(WebKitWebContextClass* webContextClass)
</span><span class="lines">@@ -897,15 +894,19 @@
</span><span class="cx"> * determine how auxiliary processes are handled. The default setting
</span><span class="cx"> * (%WEBKIT_PROCESS_MODEL_SHARED_SECONDARY_PROCESS) is suitable for most
</span><span class="cx"> * applications which embed a small amount of WebViews, or are used to
</span><del>- * display documents which are considered safe -- like local files.
</del><ins>+ * display documents which are considered safe — like local files.
</ins><span class="cx"> *
</span><del>- * 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.
</del><ins>+ * 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.
</ins><span class="cx"> *
</span><del>- * This method <strong>must be called before any other functions</strong>,
</del><ins>+ * This method **must be called before any other functions**,
</ins><span class="cx"> * as early as possible in your application. Calling it later will make
</span><span class="cx"> * your application crash.
</span><span class="cx"> *
</span><span class="lines">@@ -915,10 +916,24 @@
</span><span class="cx"> {
</span><span class="cx"> g_return_if_fail(WEBKIT_IS_WEB_CONTEXT(context));
</span><span class="cx">
</span><del>- if (processModel != context->priv->context->processModel()) {
- context->priv->context->setUsesNetworkProcess(processModel == ProcessModelMultipleSecondaryProcesses);
- context->priv->context->setProcessModel(static_cast<ProcessModel>(processModel));
</del><ins>+ 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();
</ins><span class="cx"> }
</span><ins>+
+ if (newProcessModel == context->priv->context->processModel())
+ return;
+
+ context->priv->context->setUsesNetworkProcess(newProcessModel == ProcessModelMultipleSecondaryProcesses);
+ context->priv->context->setProcessModel(newProcessModel);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><span class="lines">@@ -935,7 +950,15 @@
</span><span class="cx"> WebKitProcessModel webkit_web_context_get_process_model(WebKitWebContext* context)
</span><span class="cx"> {
</span><span class="cx"> g_return_val_if_fail(WEBKIT_IS_WEB_CONTEXT(context), WEBKIT_PROCESS_MODEL_SHARED_SECONDARY_PROCESS);
</span><del>- return static_cast<WebKitProcessModel>(context->priv->context->processModel());
</del><ins>+
+ 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();
+ }
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> WebKitDownload* webkitWebContextGetOrCreateDownload(DownloadProxy* downloadProxy)
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit24SourceWebKit2UIProcessAPIgtkWebKitWebContexth"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.4/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.h (163781 => 163782)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -69,13 +69,15 @@
</span><span class="cx"> * #WebKitWebView instances created by the application: if the process
</span><span class="cx"> * hangs or crashes all the web views in the application will be affected.
</span><span class="cx"> * This is the default process model, and it should suffice for most cases.
</span><del>- * @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.
</del><ins>+ * @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.
</ins><span class="cx"> *
</span><span class="cx"> * Enum values used for determining the #WebKitWebContext process model.
</span><span class="cx"> *
</span><span class="lines">@@ -83,7 +85,7 @@
</span><span class="cx"> */
</span><span class="cx"> typedef enum {
</span><span class="cx"> WEBKIT_PROCESS_MODEL_SHARED_SECONDARY_PROCESS,
</span><del>- WEBKIT_PROCESS_MODEL_ONE_SECONDARY_PROCESS_PER_WEB_VIEW,
</del><ins>+ WEBKIT_PROCESS_MODEL_MULTIPLE_SECONDARY_PROCESSES,
</ins><span class="cx"> } WebKitProcessModel;
</span><span class="cx">
</span><span class="cx"> /**
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit24ToolsChangeLog"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.4/Tools/ChangeLog (163781 => 163782)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -1,3 +1,22 @@
</span><ins>+2014-02-08 Adrian Perez de Castro <aperez@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.
+
</ins><span class="cx"> 2014-02-09 Carlos Garnacho <carlosg@gnome.org>
</span><span class="cx">
</span><span class="cx"> [GTK] Enable touch features
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit24ToolsMiniBrowsergtkmainc"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.4/Tools/MiniBrowser/gtk/main.c (163781 => 163782)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -244,7 +244,7 @@
</span><span class="cx"> const gchar *multiprocess = g_getenv("MINIBROWSER_MULTIPROCESS");
</span><span class="cx"> if (multiprocess && *multiprocess) {
</span><span class="cx"> webkit_web_context_set_process_model(webkit_web_context_get_default(),
</span><del>- WEBKIT_PROCESS_MODEL_ONE_SECONDARY_PROCESS_PER_WEB_VIEW);
</del><ins>+ WEBKIT_PROCESS_MODEL_MULTIPLE_SECONDARY_PROCESSES);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> GOptionContext *context = g_option_context_new(NULL);
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit24ToolsTestWebKitAPITestsWebKit2GtkTestMultiprocesscpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.4/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestMultiprocess.cpp (163781 => 163782)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -122,11 +122,11 @@
</span><span class="cx"> ==, WEBKIT_PROCESS_MODEL_SHARED_SECONDARY_PROCESS);
</span><span class="cx">
</span><span class="cx"> webkit_web_context_set_process_model(webkit_web_context_get_default(),
</span><del>- WEBKIT_PROCESS_MODEL_ONE_SECONDARY_PROCESS_PER_WEB_VIEW);
</del><ins>+ WEBKIT_PROCESS_MODEL_MULTIPLE_SECONDARY_PROCESSES);
</ins><span class="cx">
</span><span class="cx"> // Check that the getter returns the newly-set value
</span><span class="cx"> g_assert_cmpuint(webkit_web_context_get_process_model(webkit_web_context_get_default()),
</span><del>- ==, WEBKIT_PROCESS_MODEL_ONE_SECONDARY_PROCESS_PER_WEB_VIEW);
</del><ins>+ ==, WEBKIT_PROCESS_MODEL_MULTIPLE_SECONDARY_PROCESSES);
</ins><span class="cx">
</span><span class="cx"> bus = new WebKitTestBus();
</span><span class="cx"> if (!bus->run())
</span></span></pre>
</div>
</div>
</body>
</html>