<!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>[171742] trunk</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/171742">171742</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2014-07-29 05:42:53 -0700 (Tue, 29 Jul 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>[GTK] Remove WebKitWebViewGroup from WebKit2 GTK+ API
https://bugs.webkit.org/show_bug.cgi?id=133729
Patch by Adrian Perez de Castro <aperez@igalia.com> on 2014-07-29
Reviewed by Carlos Garcia Campos.
Removes WebKitWebViewGroup, effectively reverting the changes
introduced by <a href="http://trac.webkit.org/projects/webkit/changeset/149117">r149117</a>. The motivation for WebKitWebViewGroup
was using the user style sheet injection API, which has been
moved into WebKitUserContentManager, rendering it unneeded.
Source/WebKit2:
* PlatformGTK.cmake: Remove WebKitWebViewGroup source files
from the build.
* UIProcess/API/C/gtk/WKView.cpp:
(WKViewCreate): Accomodate for changes in the signature of
webkitWebViewBaseCreate().
* UIProcess/API/gtk/WebKitSettings.cpp: Update API documentation.
* UIProcess/API/gtk/WebKitWebContext.cpp: Remove the default web
view group from WebKitWebContext.
(webkitWebContextCreatePageForWebView): Allow passing a
WebPreferences object at construction.
(webkitWebContextGetDefaultWebViewGroup): Deleted.
* UIProcess/API/gtk/WebKitWebContextPrivate.h: Ditto.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewUpdateSettings): Use WebPageProxy::setPreferences()
directly. Handle the case when webkit_web_view_set_settings()
is called on construction by doing an early-return.
(webkitWebViewConstructed): Call webkitWebViewUpdateSettings()
after creating the internal WebPageProxy object.
(webkitWebViewSetProperty): Removed "group" property, added
"settings" property.
(webkitWebViewGetProperty): Ditto.
(webkitWebViewDispose): Do not disconnect signal handler for
the (now unexistant) WebKitWebViewGroup.
(webkit_web_view_class_init): Removed "group" property, added
"settings" property.
(webkitWebViewHandleAuthenticationChallenge): Access the
WebKitWebSettings directly.
(webkit_web_view_new_with_related_view): Make new views share
settings with their related view.
(webkit_web_view_new_with_settings): Added.
(webkit_web_view_set_settings): Access the settings directly in
the WebKitWebView.
(webkit_web_view_get_settings): Ditto.
(webkit_web_view_set_zoom_level): Ditto.
(webkit_web_view_get_zoom_level): Ditto.
(webkitWebViewSettingsChanged): Deleted.
(webkitWebViewDisconnectSettingsChangedSignalHandler): Deleted.
(webkit_web_view_new_with_group): Deleted.
(webkit_web_view_get_group): Deleted.
* UIProcess/API/gtk/WebKitWebView.h: Removed API methods related
to WebKitWebViewGroup.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseCreate): Allow passing a WebPreferences object
for constructing the WebPageProxy.
(webkitWebViewBaseUpdatePreferences): Instead of going through
the page group, use WebPageProxy::preferences() directly.
(webkitWebViewBaseCreateWebPage): Allow passing a WebPreferences
object for constructing the WebPageProxy.
* UIProcess/API/gtk/WebKitWebViewBasePrivate.h: Update the
prototypes of the internal functions.
* UIProcess/API/gtk/WebKitWebViewGroup.cpp: Removed.
* UIProcess/API/gtk/WebKitWebViewGroup.h: Removed.
* UIProcess/API/gtk/WebKitWebViewGroupPrivate.h: Removed.
* UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Change public API
bits in the documentation.
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Ditto.
* UIProcess/API/gtk/docs/webkit2gtk.types: Ditto.
* UIProcess/API/gtk/webkit2.h: Removed WebKitWebViewGroup.h header.
* UIProcess/gtk/WebInspectorProxyGtk.cpp:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
Accomodate for changes in the signature of
webkitWebViewBaseCreate().
Tools:
* TestWebKitAPI/Tests/WebKit2Gtk/CMakeLists.txt: Remove tests
for WebKitWebViewGroup.
* TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebView.cpp:
(testWebViewSettings):
Restore the assertions that check that settings objects are
released. Add test for webkit_web_view_new_with_settings().
* TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebViewGroup.cpp: Removed.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2PlatformGTKcmake">trunk/Source/WebKit2/PlatformGTK.cmake</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICgtkWKViewcpp">trunk/Source/WebKit2/UIProcess/API/C/gtk/WKView.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkWebKitSettingscpp">trunk/Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkWebKitWebContextcpp">trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkWebKitWebContextPrivateh">trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContextPrivate.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkWebKitWebViewcpp">trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkWebKitWebViewh">trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebView.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkWebKitWebViewBasecpp">trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkWebKitWebViewBasePrivateh">trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBasePrivate.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkdocswebkit2gtkdocssgml">trunk/Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-docs.sgml</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkdocswebkit2gtksectionstxt">trunk/Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-sections.txt</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkdocswebkit2gtktypes">trunk/Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk.types</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkwebkit2h">trunk/Source/WebKit2/UIProcess/API/gtk/webkit2.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessgtkWebInspectorProxyGtkcpp">trunk/Source/WebKit2/UIProcess/gtk/WebInspectorProxyGtk.cpp</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsTestWebKitAPITestsWebKit2GtkCMakeListstxt">trunk/Tools/TestWebKitAPI/Tests/WebKit2Gtk/CMakeLists.txt</a></li>
<li><a href="#trunkToolsTestWebKitAPITestsWebKit2GtkTestWebKitWebViewcpp">trunk/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebView.cpp</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkWebKitWebViewGroupcpp">trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewGroup.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkWebKitWebViewGrouph">trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewGroup.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkWebKitWebViewGroupPrivateh">trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewGroupPrivate.h</a></li>
<li><a href="#trunkToolsTestWebKitAPITestsWebKit2GtkTestWebKitWebViewGroupcpp">trunk/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebViewGroup.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (171741 => 171742)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-07-29 11:41:21 UTC (rev 171741)
+++ trunk/Source/WebKit2/ChangeLog        2014-07-29 12:42:53 UTC (rev 171742)
</span><span class="lines">@@ -1,3 +1,78 @@
</span><ins>+2014-07-29 Adrian Perez de Castro <aperez@igalia.com>
+
+ [GTK] Remove WebKitWebViewGroup from WebKit2 GTK+ API
+ https://bugs.webkit.org/show_bug.cgi?id=133729
+
+ Reviewed by Carlos Garcia Campos.
+
+ Removes WebKitWebViewGroup, effectively reverting the changes
+ introduced by r149117. The motivation for WebKitWebViewGroup
+ was using the user style sheet injection API, which has been
+ moved into WebKitUserContentManager, rendering it unneeded.
+
+ * PlatformGTK.cmake: Remove WebKitWebViewGroup source files
+ from the build.
+ * UIProcess/API/C/gtk/WKView.cpp:
+ (WKViewCreate): Accomodate for changes in the signature of
+ webkitWebViewBaseCreate().
+ * UIProcess/API/gtk/WebKitSettings.cpp: Update API documentation.
+ * UIProcess/API/gtk/WebKitWebContext.cpp: Remove the default web
+ view group from WebKitWebContext.
+ (webkitWebContextCreatePageForWebView): Allow passing a
+ WebPreferences object at construction.
+ (webkitWebContextGetDefaultWebViewGroup): Deleted.
+ * UIProcess/API/gtk/WebKitWebContextPrivate.h: Ditto.
+ * UIProcess/API/gtk/WebKitWebView.cpp:
+ (webkitWebViewUpdateSettings): Use WebPageProxy::setPreferences()
+ directly. Handle the case when webkit_web_view_set_settings()
+ is called on construction by doing an early-return.
+ (webkitWebViewConstructed): Call webkitWebViewUpdateSettings()
+ after creating the internal WebPageProxy object.
+ (webkitWebViewSetProperty): Removed "group" property, added
+ "settings" property.
+ (webkitWebViewGetProperty): Ditto.
+ (webkitWebViewDispose): Do not disconnect signal handler for
+ the (now unexistant) WebKitWebViewGroup.
+ (webkit_web_view_class_init): Removed "group" property, added
+ "settings" property.
+ (webkitWebViewHandleAuthenticationChallenge): Access the
+ WebKitWebSettings directly.
+ (webkit_web_view_new_with_related_view): Make new views share
+ settings with their related view.
+ (webkit_web_view_new_with_settings): Added.
+ (webkit_web_view_set_settings): Access the settings directly in
+ the WebKitWebView.
+ (webkit_web_view_get_settings): Ditto.
+ (webkit_web_view_set_zoom_level): Ditto.
+ (webkit_web_view_get_zoom_level): Ditto.
+ (webkitWebViewSettingsChanged): Deleted.
+ (webkitWebViewDisconnectSettingsChangedSignalHandler): Deleted.
+ (webkit_web_view_new_with_group): Deleted.
+ (webkit_web_view_get_group): Deleted.
+ * UIProcess/API/gtk/WebKitWebView.h: Removed API methods related
+ to WebKitWebViewGroup.
+ * UIProcess/API/gtk/WebKitWebViewBase.cpp:
+ (webkitWebViewBaseCreate): Allow passing a WebPreferences object
+ for constructing the WebPageProxy.
+ (webkitWebViewBaseUpdatePreferences): Instead of going through
+ the page group, use WebPageProxy::preferences() directly.
+ (webkitWebViewBaseCreateWebPage): Allow passing a WebPreferences
+ object for constructing the WebPageProxy.
+ * UIProcess/API/gtk/WebKitWebViewBasePrivate.h: Update the
+ prototypes of the internal functions.
+ * UIProcess/API/gtk/WebKitWebViewGroup.cpp: Removed.
+ * UIProcess/API/gtk/WebKitWebViewGroup.h: Removed.
+ * UIProcess/API/gtk/WebKitWebViewGroupPrivate.h: Removed.
+ * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Change public API
+ bits in the documentation.
+ * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Ditto.
+ * UIProcess/API/gtk/docs/webkit2gtk.types: Ditto.
+ * UIProcess/API/gtk/webkit2.h: Removed WebKitWebViewGroup.h header.
+ * UIProcess/gtk/WebInspectorProxyGtk.cpp:
+ (WebKit::WebInspectorProxy::platformCreateInspectorPage):
+ Accomodate for changes in the signature of
+ webkitWebViewBaseCreate().
+
</ins><span class="cx"> 2014-07-29 Carlos Garcia Campos <cgarcia@igalia.com>
</span><span class="cx">
</span><span class="cx"> Implement webkit_web_view_load_string() in WebKit2
</span></span></pre></div>
<a id="trunkSourceWebKit2PlatformGTKcmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/PlatformGTK.cmake (171741 => 171742)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/PlatformGTK.cmake        2014-07-29 11:41:21 UTC (rev 171741)
+++ trunk/Source/WebKit2/PlatformGTK.cmake        2014-07-29 12:42:53 UTC (rev 171742)
</span><span class="lines">@@ -234,9 +234,6 @@
</span><span class="cx"> UIProcess/API/gtk/WebKitWebViewBaseAccessible.cpp
</span><span class="cx"> UIProcess/API/gtk/WebKitWebViewBaseAccessible.h
</span><span class="cx"> UIProcess/API/gtk/WebKitWebViewBasePrivate.h
</span><del>- UIProcess/API/gtk/WebKitWebViewGroup.cpp
- UIProcess/API/gtk/WebKitWebViewGroup.h
- UIProcess/API/gtk/WebKitWebViewGroupPrivate.h
</del><span class="cx"> UIProcess/API/gtk/WebKitWebViewPrivate.h
</span><span class="cx"> UIProcess/API/gtk/WebKitWindowProperties.cpp
</span><span class="cx"> UIProcess/API/gtk/WebKitWindowProperties.h
</span><span class="lines">@@ -366,7 +363,6 @@
</span><span class="cx"> ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitWebResource.h
</span><span class="cx"> ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitWebView.h
</span><span class="cx"> ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitWebViewBase.h
</span><del>- ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitWebViewGroup.h
</del><span class="cx"> ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitWindowProperties.h
</span><span class="cx"> ${WEBKIT2_DIR}/UIProcess/API/gtk/webkit2.h
</span><span class="cx"> )
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICgtkWKViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/gtk/WKView.cpp (171741 => 171742)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/gtk/WKView.cpp        2014-07-29 11:41:21 UTC (rev 171741)
+++ trunk/Source/WebKit2/UIProcess/API/C/gtk/WKView.cpp        2014-07-29 12:42:53 UTC (rev 171742)
</span><span class="lines">@@ -37,7 +37,7 @@
</span><span class="cx">
</span><span class="cx"> WKViewRef WKViewCreate(WKContextRef contextRef, WKPageGroupRef pageGroupRef)
</span><span class="cx"> {
</span><del>- return toAPI(webkitWebViewBaseCreate(toImpl(contextRef), toImpl(pageGroupRef), nullptr, nullptr));
</del><ins>+ return toAPI(webkitWebViewBaseCreate(toImpl(contextRef), nullptr, toImpl(pageGroupRef), nullptr, nullptr));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> WKPageRef WKViewGetPage(WKViewRef viewRef)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkWebKitSettingscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp (171741 => 171742)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp        2014-07-29 11:41:21 UTC (rev 171741)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp        2014-07-29 12:42:53 UTC (rev 171742)
</span><span class="lines">@@ -34,6 +34,8 @@
</span><span class="cx"> #include "ExperimentalFeatures.h"
</span><span class="cx"> #include "WebKitPrivate.h"
</span><span class="cx"> #include "WebKitSettingsPrivate.h"
</span><ins>+#include "WebPageProxy.h"
+#include "WebPreferences.h"
</ins><span class="cx"> #include <WebCore/UserAgentGtk.h>
</span><span class="cx"> #include <glib/gi18n-lib.h>
</span><span class="cx"> #include <wtf/text/CString.h>
</span><span class="lines">@@ -70,13 +72,12 @@
</span><span class="cx">
</span><span class="cx"> /**
</span><span class="cx"> * SECTION:WebKitSettings
</span><del>- * @short_description: Control the behaviour of #WebKitWebView<!-- -->s
- * @see_also: #WebKitWebViewGroup, #WebKitWebView
</del><ins>+ * @short_description: Control the behaviour of a #WebKitWebView
</ins><span class="cx"> *
</span><del>- * #WebKitSettings can be applied to a #WebKitWebViewGroup to control text charset,
</del><ins>+ * #WebKitSettings can be applied to a #WebKitWebView to control text charset,
</ins><span class="cx"> * color, font sizes, printing mode, script support, loading of images and various
</span><del>- * other things on the #WebKitWebView<!-- -->s of the group.
- * After creation, a #WebKitSettings object contains default settings.
</del><ins>+ * other things on a #WebKitWebView. After creation, a #WebKitSettings object
+ * contains default settings.
</ins><span class="cx"> *
</span><span class="cx"> * <informalexample><programlisting>
</span><span class="cx"> * /<!-- -->* Disable JavaScript. *<!-- -->/
</span><span class="lines">@@ -1223,7 +1224,7 @@
</span><span class="cx"> * webkit_settings_new:
</span><span class="cx"> *
</span><span class="cx"> * Creates a new #WebKitSettings instance with default values. It must
</span><del>- * be manually attached to a #WebKitWebViewGroup.
</del><ins>+ * be manually attached to a #WebKitWebView.
</ins><span class="cx"> * See also webkit_settings_new_with_settings().
</span><span class="cx"> *
</span><span class="cx"> * Returns: a new #WebKitSettings instance.
</span><span class="lines">@@ -1240,7 +1241,7 @@
</span><span class="cx"> * %NULL-terminated
</span><span class="cx"> *
</span><span class="cx"> * Creates a new #WebKitSettings instance with the given settings. It must
</span><del>- * be manually attached to a #WebKitWebViewGroup.
</del><ins>+ * be manually attached to a #WebKitWebView.
</ins><span class="cx"> *
</span><span class="cx"> * Returns: a new #WebKitSettings instance.
</span><span class="cx"> */
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkWebKitWebContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp (171741 => 171742)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp        2014-07-29 11:41:21 UTC (rev 171741)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp        2014-07-29 12:42:53 UTC (rev 171742)
</span><span class="lines">@@ -37,12 +37,13 @@
</span><span class="cx"> #include "WebKitPrivate.h"
</span><span class="cx"> #include "WebKitRequestManagerClient.h"
</span><span class="cx"> #include "WebKitSecurityManagerPrivate.h"
</span><ins>+#include "WebKitSettingsPrivate.h"
</ins><span class="cx"> #include "WebKitTextChecker.h"
</span><span class="cx"> #include "WebKitURISchemeRequestPrivate.h"
</span><span class="cx"> #include "WebKitUserContentManagerPrivate.h"
</span><span class="cx"> #include "WebKitWebContextPrivate.h"
</span><span class="cx"> #include "WebKitWebViewBasePrivate.h"
</span><del>-#include "WebKitWebViewGroupPrivate.h"
</del><ins>+#include "WebKitWebViewPrivate.h"
</ins><span class="cx"> #include "WebResourceCacheManagerProxy.h"
</span><span class="cx"> #include <WebCore/FileSystem.h>
</span><span class="cx"> #include <WebCore/IconDatabase.h>
</span><span class="lines">@@ -156,7 +157,6 @@
</span><span class="cx"> WebKitTLSErrorsPolicy tlsErrorsPolicy;
</span><span class="cx">
</span><span class="cx"> HashMap<uint64_t, WebKitWebView*> webViews;
</span><del>- GRefPtr<WebKitWebViewGroup> defaultWebViewGroup;
</del><span class="cx">
</span><span class="cx"> CString webExtensionsDirectory;
</span><span class="cx"> GRefPtr<GVariant> webExtensionsInitializationUserData;
</span><span class="lines">@@ -1051,19 +1051,16 @@
</span><span class="cx"> context->priv->uriSchemeRequests.remove(customProtocolID);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void webkitWebContextCreatePageForWebView(WebKitWebContext* context, WebKitWebView* webView, WebKitWebViewGroup* webViewGroup, WebKitUserContentManager* userContentManager, WebKitWebView* relatedView)
</del><ins>+void webkitWebContextCreatePageForWebView(WebKitWebContext* context, WebKitWebView* webView, WebKitUserContentManager* userContentManager, WebKitWebView* relatedView)
</ins><span class="cx"> {
</span><span class="cx"> WebKitWebViewBase* webViewBase = WEBKIT_WEB_VIEW_BASE(webView);
</span><del>- WebPageGroup* pageGroup = webViewGroup ? webkitWebViewGroupGetPageGroup(webViewGroup) : 0;
</del><span class="cx"> WebPageProxy* relatedPage = relatedView ? webkitWebViewBaseGetPage(WEBKIT_WEB_VIEW_BASE(relatedView)) : nullptr;
</span><ins>+ WebPreferences* preferences = webkitSettingsGetPreferences(webkit_web_view_get_settings(webView));
</ins><span class="cx"> WebUserContentControllerProxy* userContentControllerProxy = userContentManager ? webkitUserContentManagerGetUserContentControllerProxy(userContentManager) : nullptr;
</span><del>- webkitWebViewBaseCreateWebPage(webViewBase, context->priv->context.get(), pageGroup, userContentControllerProxy, relatedPage);
</del><ins>+ webkitWebViewBaseCreateWebPage(webViewBase, context->priv->context.get(), preferences, nullptr, userContentControllerProxy, relatedPage);
</ins><span class="cx">
</span><span class="cx"> WebPageProxy* page = webkitWebViewBaseGetPage(webViewBase);
</span><span class="cx"> context->priv->webViews.set(page->pageID(), webView);
</span><del>-
- if (!pageGroup && !context->priv->defaultWebViewGroup)
- context->priv->defaultWebViewGroup = adoptGRef(webkitWebViewGroupCreate(&page->pageGroup()));
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void webkitWebContextWebViewDestroyed(WebKitWebContext* context, WebKitWebView* webView)
</span><span class="lines">@@ -1076,8 +1073,3 @@
</span><span class="cx"> {
</span><span class="cx"> return page ? context->priv->webViews.get(page->pageID()) : 0;
</span><span class="cx"> }
</span><del>-
-WebKitWebViewGroup* webkitWebContextGetDefaultWebViewGroup(WebKitWebContext* context)
-{
- return context->priv->defaultWebViewGroup.get();
-}
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkWebKitWebContextPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContextPrivate.h (171741 => 171742)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContextPrivate.h        2014-07-29 11:41:21 UTC (rev 171741)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContextPrivate.h        2014-07-29 12:42:53 UTC (rev 171742)
</span><span class="lines">@@ -31,7 +31,6 @@
</span><span class="cx"> #include "WebKitPrivate.h"
</span><span class="cx"> #include "WebKitUserContentManager.h"
</span><span class="cx"> #include "WebKitWebContext.h"
</span><del>-#include "WebKitWebViewGroup.h"
</del><span class="cx"> #include "WebSoupCustomProtocolRequestManager.h"
</span><span class="cx">
</span><span class="cx"> WebKit::WebContext* webkitWebContextGetContext(WebKitWebContext*);
</span><span class="lines">@@ -43,10 +42,9 @@
</span><span class="cx"> void webkitWebContextStartLoadingCustomProtocol(WebKitWebContext*, uint64_t customProtocolID, API::URLRequest*);
</span><span class="cx"> void webkitWebContextStopLoadingCustomProtocol(WebKitWebContext*, uint64_t customProtocolID);
</span><span class="cx"> void webkitWebContextDidFinishLoadingCustomProtocol(WebKitWebContext*, uint64_t customProtocolID);
</span><del>-void webkitWebContextCreatePageForWebView(WebKitWebContext*, WebKitWebView*, WebKitWebViewGroup*, WebKitUserContentManager*, WebKitWebView*);
</del><ins>+void webkitWebContextCreatePageForWebView(WebKitWebContext*, WebKitWebView*, WebKitUserContentManager*, WebKitWebView*);
</ins><span class="cx"> void webkitWebContextWebViewDestroyed(WebKitWebContext*, WebKitWebView*);
</span><span class="cx"> WebKitWebView* webkitWebContextGetWebViewForPage(WebKitWebContext*, WebKit::WebPageProxy*);
</span><del>-WebKitWebViewGroup* webkitWebContextGetDefaultWebViewGroup(WebKitWebContext*);
</del><span class="cx"> GVariant* webkitWebContextInitializeWebExtensions(WebKitWebContext*);
</span><span class="cx">
</span><span class="cx"> #endif // WebKitWebContextPrivate_h
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkWebKitWebViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp (171741 => 171742)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp        2014-07-29 11:41:21 UTC (rev 171741)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp        2014-07-29 12:42:53 UTC (rev 171742)
</span><span class="lines">@@ -48,6 +48,7 @@
</span><span class="cx"> #include "WebKitPrivate.h"
</span><span class="cx"> #include "WebKitResponsePolicyDecision.h"
</span><span class="cx"> #include "WebKitScriptDialogPrivate.h"
</span><ins>+#include "WebKitSettingsPrivate.h"
</ins><span class="cx"> #include "WebKitUIClient.h"
</span><span class="cx"> #include "WebKitURIRequestPrivate.h"
</span><span class="cx"> #include "WebKitURIResponsePrivate.h"
</span><span class="lines">@@ -55,7 +56,6 @@
</span><span class="cx"> #include "WebKitWebInspectorPrivate.h"
</span><span class="cx"> #include "WebKitWebResourcePrivate.h"
</span><span class="cx"> #include "WebKitWebViewBasePrivate.h"
</span><del>-#include "WebKitWebViewGroupPrivate.h"
</del><span class="cx"> #include "WebKitWebViewPrivate.h"
</span><span class="cx"> #include "WebKitWindowPropertiesPrivate.h"
</span><span class="cx"> #include <JavaScriptCore/APICast.h>
</span><span class="lines">@@ -132,7 +132,7 @@
</span><span class="cx">
</span><span class="cx"> PROP_WEB_CONTEXT,
</span><span class="cx"> PROP_RELATED_VIEW,
</span><del>- PROP_GROUP,
</del><ins>+ PROP_SETTINGS,
</ins><span class="cx"> PROP_USER_CONTENT_MANAGER,
</span><span class="cx"> PROP_TITLE,
</span><span class="cx"> PROP_ESTIMATED_LOAD_PROGRESS,
</span><span class="lines">@@ -170,8 +170,6 @@
</span><span class="cx">
</span><span class="cx"> GRefPtr<WebKitBackForwardList> backForwardList;
</span><span class="cx"> GRefPtr<WebKitSettings> settings;
</span><del>- unsigned long settingsChangedHandlerID;
- GRefPtr<WebKitWebViewGroup> group;
</del><span class="cx"> GRefPtr<WebKitUserContentManager> userContentManager;
</span><span class="cx"> GRefPtr<WebKitWindowProperties> windowProperties;
</span><span class="cx">
</span><span class="lines">@@ -376,11 +374,15 @@
</span><span class="cx">
</span><span class="cx"> static void webkitWebViewUpdateSettings(WebKitWebView* webView)
</span><span class="cx"> {
</span><del>- // We keep a ref of the current settings to disconnect the signals when settings change in the group.
- webView->priv->settings = webkit_web_view_get_settings(webView);
</del><ins>+ // The "settings" property is set on construction, and in that
+ // case webkit_web_view_set_settings() will be called *before* the
+ // WebPageProxy has been created so we should do an early return.
+ WebPageProxy* page = getPage(webView);
+ if (!page)
+ return;
</ins><span class="cx">
</span><span class="cx"> WebKitSettings* settings = webView->priv->settings.get();
</span><del>- WebPageProxy* page = getPage(webView);
</del><ins>+ page->setPreferences(*webkitSettingsGetPreferences(settings));
</ins><span class="cx"> page->setCanRunModal(webkit_settings_get_allow_modal_dialogs(settings));
</span><span class="cx"> page->setCustomUserAgent(String::fromUTF8(webkit_settings_get_user_agent(settings)));
</span><span class="cx">
</span><span class="lines">@@ -399,20 +401,6 @@
</span><span class="cx"> g_signal_handlers_disconnect_by_func(settings, reinterpret_cast<gpointer>(userAgentChanged), webView);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static void webkitWebViewSettingsChanged(WebKitWebViewGroup*, GParamSpec*, WebKitWebView* webView)
-{
- webkitWebViewDisconnectSettingsSignalHandlers(webView);
- webkitWebViewUpdateSettings(webView);
-}
-
-static void webkitWebViewDisconnectSettingsChangedSignalHandler(WebKitWebView* webView)
-{
- WebKitWebViewPrivate* priv = webView->priv;
- if (priv->settingsChangedHandlerID)
- g_signal_handler_disconnect(webkit_web_view_get_group(webView), priv->settingsChangedHandlerID);
- priv->settingsChangedHandlerID = 0;
-}
-
</del><span class="cx"> static void webkitWebViewDisconnectMainResourceResponseChangedSignalHandler(WebKitWebView* webView)
</span><span class="cx"> {
</span><span class="cx"> WebKitWebViewPrivate* priv = webView->priv;
</span><span class="lines">@@ -503,10 +491,13 @@
</span><span class="cx">
</span><span class="cx"> WebKitWebView* webView = WEBKIT_WEB_VIEW(object);
</span><span class="cx"> WebKitWebViewPrivate* priv = webView->priv;
</span><del>- webkitWebContextCreatePageForWebView(priv->context, webView, priv->group.get(), priv->userContentManager.get(), priv->relatedView);
</del><ins>+ if (!priv->settings)
+ priv->settings = adoptGRef(webkit_settings_new());
+ webkitWebContextCreatePageForWebView(priv->context, webView, priv->userContentManager.get(), priv->relatedView);
</ins><span class="cx"> // The related view is only valid during the construction.
</span><span class="cx"> priv->relatedView = nullptr;
</span><span class="cx">
</span><ins>+ webkitWebViewUpdateSettings(webView);
</ins><span class="cx"> webkitWebViewBaseSetDownloadRequestHandler(WEBKIT_WEB_VIEW_BASE(webView), webkitWebViewHandleDownloadRequest);
</span><span class="cx">
</span><span class="cx"> attachLoaderClientToView(webView);
</span><span class="lines">@@ -518,10 +509,6 @@
</span><span class="cx">
</span><span class="cx"> priv->backForwardList = adoptGRef(webkitBackForwardListCreate(&getPage(webView)->backForwardList()));
</span><span class="cx"> priv->windowProperties = adoptGRef(webkitWindowPropertiesCreate());
</span><del>-
- webkitWebViewUpdateSettings(webView);
- priv->settingsChangedHandlerID =
- g_signal_connect(webkit_web_view_get_group(webView), "notify::settings", G_CALLBACK(webkitWebViewSettingsChanged), webView);
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static void webkitWebViewSetProperty(GObject* object, guint propId, const GValue* value, GParamSpec* paramSpec)
</span><span class="lines">@@ -539,9 +526,9 @@
</span><span class="cx"> webView->priv->relatedView = relatedView ? WEBKIT_WEB_VIEW(relatedView) : nullptr;
</span><span class="cx"> break;
</span><span class="cx"> }
</span><del>- case PROP_GROUP: {
- gpointer group = g_value_get_object(value);
- webView->priv->group = group ? WEBKIT_WEB_VIEW_GROUP(group) : 0;
</del><ins>+ case PROP_SETTINGS: {
+ if (gpointer settings = g_value_get_object(value))
+ webkit_web_view_set_settings(webView, WEBKIT_SETTINGS(settings));
</ins><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> case PROP_USER_CONTENT_MANAGER: {
</span><span class="lines">@@ -565,8 +552,8 @@
</span><span class="cx"> case PROP_WEB_CONTEXT:
</span><span class="cx"> g_value_set_object(value, webView->priv->context);
</span><span class="cx"> break;
</span><del>- case PROP_GROUP:
- g_value_set_object(value, webkit_web_view_get_group(webView));
</del><ins>+ case PROP_SETTINGS:
+ g_value_set_object(value, webkit_web_view_get_settings(webView));
</ins><span class="cx"> break;
</span><span class="cx"> case PROP_USER_CONTENT_MANAGER:
</span><span class="cx"> g_value_set_object(value, webkit_web_view_get_user_content_manager(webView));
</span><span class="lines">@@ -599,7 +586,6 @@
</span><span class="cx"> WebKitWebView* webView = WEBKIT_WEB_VIEW(object);
</span><span class="cx"> webkitWebViewCancelFaviconRequest(webView);
</span><span class="cx"> webkitWebViewDisconnectMainResourceResponseChangedSignalHandler(webView);
</span><del>- webkitWebViewDisconnectSettingsChangedSignalHandler(webView);
</del><span class="cx"> webkitWebViewDisconnectSettingsSignalHandlers(webView);
</span><span class="cx"> webkitWebViewDisconnectFaviconDatabaseSignalHandlers(webView);
</span><span class="cx">
</span><span class="lines">@@ -666,19 +652,21 @@
</span><span class="cx"> static_cast<GParamFlags>(WEBKIT_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)));
</span><span class="cx">
</span><span class="cx"> /**
</span><del>- * WebKitWebView:group:
</del><ins>+ * WebKitWebView:settings:
</ins><span class="cx"> *
</span><del>- * The #WebKitWebViewGroup of the view.
</del><ins>+ * The #WebKitSettings of the view.
+ *
+ * Since: 2.6
</ins><span class="cx"> */
</span><span class="cx"> g_object_class_install_property(
</span><span class="cx"> gObjectClass,
</span><del>- PROP_GROUP,
</del><ins>+ PROP_SETTINGS,
</ins><span class="cx"> g_param_spec_object(
</span><del>- "group",
- _("WebView Group"),
- _("The WebKitWebViewGroup of the view"),
- WEBKIT_TYPE_WEB_VIEW_GROUP,
- static_cast<GParamFlags>(WEBKIT_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)));
</del><ins>+ "settings",
+ _("WebView settings"),
+ _("The WebKitSettings of the view"),
+ WEBKIT_TYPE_SETTINGS,
+ static_cast<GParamFlags>(WEBKIT_PARAM_WRITABLE | G_PARAM_CONSTRUCT)));
</ins><span class="cx">
</span><span class="cx"> /**
</span><span class="cx"> * WebKitWebView:user-content-manager:
</span><span class="lines">@@ -1897,7 +1885,7 @@
</span><span class="cx">
</span><span class="cx"> void webkitWebViewHandleAuthenticationChallenge(WebKitWebView* webView, AuthenticationChallengeProxy* authenticationChallenge)
</span><span class="cx"> {
</span><del>- gboolean privateBrowsingEnabled = webkit_settings_get_enable_private_browsing(webkit_web_view_get_settings(webView));
</del><ins>+ gboolean privateBrowsingEnabled = webkit_settings_get_enable_private_browsing(webView->priv->settings.get());
</ins><span class="cx"> webView->priv->authenticationRequest = adoptGRef(webkitAuthenticationRequestCreate(authenticationChallenge, privateBrowsingEnabled));
</span><span class="cx"> gboolean returnValue;
</span><span class="cx"> g_signal_emit(webView, signals[AUTHENTICATE], 0, webView->priv->authenticationRequest.get(), &returnValue);
</span><span class="lines">@@ -1911,9 +1899,11 @@
</span><span class="cx"> /**
</span><span class="cx"> * webkit_web_view_new:
</span><span class="cx"> *
</span><del>- * Creates a new #WebKitWebView with the default #WebKitWebContext and the
- * default #WebKitWebViewGroup.
- * See also webkit_web_view_new_with_context() and webkit_web_view_new_with_group().
</del><ins>+ * Creates a new #WebKitWebView with the default #WebKitWebContext and
+ * no #WebKitUserContentManager associated with it.
+ * See also webkit_web_view_new_with_context(),
+ * webkit_web_view_new_with_user_content_manager(), and
+ * webkit_web_view_new_with_settings().
</ins><span class="cx"> *
</span><span class="cx"> * Returns: The newly created #WebKitWebView widget
</span><span class="cx"> */
</span><span class="lines">@@ -1926,9 +1916,10 @@
</span><span class="cx"> * webkit_web_view_new_with_context:
</span><span class="cx"> * @context: the #WebKitWebContext to be used by the #WebKitWebView
</span><span class="cx"> *
</span><del>- * Creates a new #WebKitWebView with the given #WebKitWebContext and the
- * default #WebKitWebViewGroup.
- * See also webkit_web_view_new_with_group().
</del><ins>+ * Creates a new #WebKitWebView with the given #WebKitWebContext and
+ * no #WebKitUserContentManager associated with it.
+ * See also webkit_web_view_new_with_user_content_manager() and
+ * webkit_web_view_new_with_settings().
</ins><span class="cx"> *
</span><span class="cx"> * Returns: The newly created #WebKitWebView widget
</span><span class="cx"> */
</span><span class="lines">@@ -1951,7 +1942,8 @@
</span><span class="cx"> * You can also use this method to implement other process models based on %WEBKIT_PROCESS_MODEL_MULTIPLE_SECONDARY_PROCESSES,
</span><span class="cx"> * like for example, sharing the same web process for all the views in the same security domain.
</span><span class="cx"> *
</span><del>- * The newly created #WebKitWebView will also have the same #WebKitUserContentManager as @web_view.
</del><ins>+ * The newly created #WebKitWebView will also have the same #WebKitUserContentManager
+ * and #WebKitSettings as @web_view.
</ins><span class="cx"> *
</span><span class="cx"> * Returns: (transfer full): The newly created #WebKitWebView widget
</span><span class="cx"> *
</span><span class="lines">@@ -1963,25 +1955,27 @@
</span><span class="cx">
</span><span class="cx"> return GTK_WIDGET(g_object_new(WEBKIT_TYPE_WEB_VIEW,
</span><span class="cx"> "user-content-manager", webView->priv->userContentManager.get(),
</span><ins>+ "settings", webView->priv->settings.get(),
</ins><span class="cx"> "related-view", webView,
</span><span class="cx"> nullptr));
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><del>- * webkit_web_view_new_with_group:
- * @group: a #WebKitWebViewGroup
</del><ins>+ * webkit_web_view_new_with_settings:
+ * @settings: a #WebKitSettings
</ins><span class="cx"> *
</span><del>- * Creates a new #WebKitWebView with the given #WebKitWebViewGroup.
- * The view will be part of @group and it will be affected by the
- * group properties like the settings.
</del><ins>+ * Creates a new #WebKitWebView with the given #WebKitSettings.
+ * See also webkit_web_view_new_with_context(), and
+ * webkit_web_view_new_with_user_content_manager().
</ins><span class="cx"> *
</span><span class="cx"> * Returns: The newly created #WebKitWebView widget
</span><ins>+ *
+ * Since: 2.6
</ins><span class="cx"> */
</span><del>-GtkWidget* webkit_web_view_new_with_group(WebKitWebViewGroup* group)
</del><ins>+GtkWidget* webkit_web_view_new_with_settings(WebKitSettings* settings)
</ins><span class="cx"> {
</span><del>- g_return_val_if_fail(WEBKIT_IS_WEB_VIEW_GROUP(group), 0);
-
- return GTK_WIDGET(g_object_new(WEBKIT_TYPE_WEB_VIEW, "group", group, NULL));
</del><ins>+ g_return_val_if_fail(WEBKIT_IS_SETTINGS(settings), nullptr);
+ return GTK_WIDGET(g_object_new(WEBKIT_TYPE_WEB_VIEW, "settings", settings, nullptr));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><span class="lines">@@ -2019,24 +2013,6 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><del>- * webkit_web_view_get_group:
- * @web_view: a #WebKitWebView
- *
- * Gets the group @web_view belongs to.
- *
- * Returns: (transfer none): the #WebKitWebViewGroup to which the view belongs
- */
-WebKitWebViewGroup* webkit_web_view_get_group(WebKitWebView* webView)
-{
- g_return_val_if_fail(WEBKIT_IS_WEB_VIEW(webView), 0);
-
- if (webView->priv->group)
- return webView->priv->group.get();
-
- return webkitWebContextGetDefaultWebViewGroup(webView->priv->context);
-}
-
-/**
</del><span class="cx"> * webkit_web_view_get_user_content_manager:
</span><span class="cx"> * @web_view: a #WebKitWebView
</span><span class="cx"> *
</span><span class="lines">@@ -2530,16 +2506,30 @@
</span><span class="cx"> * @web_view: a #WebKitWebView
</span><span class="cx"> * @settings: a #WebKitSettings
</span><span class="cx"> *
</span><del>- * Sets the #WebKitSettings to be applied to @web_view.
- * This is a convenient method to set new settings to the
- * #WebKitWebViewGroup @web_view belongs to.
- * New settings are applied immediately on all #WebKitWebView<!-- -->s
- * in the @web_view group.
- * See also webkit_web_view_group_set_settings().
</del><ins>+ * Sets the #WebKitSettings to be applied to @web_view. The
+ * existing #WebKitSettings of @web_view will be replaced by
+ * @settings. New settings are applied immediately on @web_view.
+ * The same #WebKitSettings object can be shared
+ * by multiple #WebKitWebView<!-- -->s.
</ins><span class="cx"> */
</span><span class="cx"> void webkit_web_view_set_settings(WebKitWebView* webView, WebKitSettings* settings)
</span><span class="cx"> {
</span><del>- webkit_web_view_group_set_settings(webkit_web_view_get_group(webView), settings);
</del><ins>+ g_return_if_fail(WEBKIT_IS_WEB_VIEW(webView));
+ g_return_if_fail(WEBKIT_IS_SETTINGS(settings));
+
+ if (webView->priv->settings == settings)
+ return;
+
+ // The "settings" property is set on construction, and in that
+ // case webkit_web_view_set_settings() will be called *before*
+ // any settings have been assigned. In that case there are no
+ // signal handlers to disconnect.
+ if (webView->priv->settings)
+ webkitWebViewDisconnectSettingsSignalHandlers(webView);
+
+ webView->priv->settings = settings;
+ webkitWebViewUpdateSettings(webView);
+ g_object_notify(G_OBJECT(webView), "settings");
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><span class="lines">@@ -2547,19 +2537,25 @@
</span><span class="cx"> * @web_view: a #WebKitWebView
</span><span class="cx"> *
</span><span class="cx"> * Gets the #WebKitSettings currently applied to @web_view.
</span><del>- * This is a convenient method to get the settings of the
- * #WebKitWebViewGroup @web_view belongs to.
- * #WebKitSettings objects are shared by all the #WebKitWebView<!-- -->s
- * in the same #WebKitWebViewGroup, so modifying
</del><ins>+ * If no other #WebKitSettings have been explicitly applied to
+ * @web_view with webkit_web_view_set_settings(), the default
+ * #WebKitSettings will be returned. This method always returns
+ * a valid #WebKitSettings object.
+ * To modify any of the @web_view settings, you can either create
+ * a new #WebKitSettings object with webkit_settings_new(), setting
+ * the desired preferences, and then replace the existing @web_view
+ * settings with webkit_web_view_set_settings() or get the existing
+ * @web_view settings and update it directly. #WebKitSettings objects
+ * can be shared by multiple #WebKitWebView<!-- -->s, so modifying
</ins><span class="cx"> * the settings of a #WebKitWebView would affect other
</span><del>- * #WebKitWebView<!-- -->s of the same group.
- * See also webkit_web_view_group_get_settings().
</del><ins>+ * #WebKitWebView<!-- -->s using the same #WebKitSettings.
</ins><span class="cx"> *
</span><span class="cx"> * Returns: (transfer none): the #WebKitSettings attached to @web_view
</span><span class="cx"> */
</span><span class="cx"> WebKitSettings* webkit_web_view_get_settings(WebKitWebView* webView)
</span><span class="cx"> {
</span><del>- return webkit_web_view_group_get_settings(webkit_web_view_get_group(webView));
</del><ins>+ g_return_val_if_fail(WEBKIT_IS_WEB_VIEW(webView), nullptr);
+ return webView->priv->settings.get();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><span class="lines">@@ -2594,7 +2590,7 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> WebPageProxy* page = getPage(webView);
</span><del>- if (webkit_settings_get_zoom_text_only(webkit_web_view_get_settings(webView)))
</del><ins>+ if (webkit_settings_get_zoom_text_only(webView->priv->settings.get()))
</ins><span class="cx"> page->setTextZoomFactor(zoomLevel);
</span><span class="cx"> else
</span><span class="cx"> page->setPageZoomFactor(zoomLevel);
</span><span class="lines">@@ -2615,7 +2611,7 @@
</span><span class="cx"> g_return_val_if_fail(WEBKIT_IS_WEB_VIEW(webView), 1);
</span><span class="cx">
</span><span class="cx"> WebPageProxy* page = getPage(webView);
</span><del>- gboolean zoomTextOnly = webkit_settings_get_zoom_text_only(webkit_web_view_get_settings(webView));
</del><ins>+ gboolean zoomTextOnly = webkit_settings_get_zoom_text_only(webView->priv->settings.get());
</ins><span class="cx"> return zoomTextOnly ? page->textZoomFactor() : page->pageZoomFactor();
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkWebKitWebViewh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebView.h (171741 => 171742)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebView.h        2014-07-29 11:41:21 UTC (rev 171741)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebView.h        2014-07-29 12:42:53 UTC (rev 171742)
</span><span class="lines">@@ -49,7 +49,6 @@
</span><span class="cx"> #include <webkit2/WebKitWebInspector.h>
</span><span class="cx"> #include <webkit2/WebKitWebResource.h>
</span><span class="cx"> #include <webkit2/WebKitWebViewBase.h>
</span><del>-#include <webkit2/WebKitWebViewGroup.h>
</del><span class="cx"> #include <webkit2/WebKitWindowProperties.h>
</span><span class="cx">
</span><span class="cx"> G_BEGIN_DECLS
</span><span class="lines">@@ -256,10 +255,10 @@
</span><span class="cx"> webkit_web_view_new_with_context (WebKitWebContext *context);
</span><span class="cx">
</span><span class="cx"> WEBKIT_API GtkWidget *
</span><del>-webkit_web_view_new_with_related_view (WebKitWebView *web_view);
</del><ins>+webkit_web_view_new_with_settings (WebKitSettings *settings);
</ins><span class="cx">
</span><span class="cx"> WEBKIT_API GtkWidget *
</span><del>-webkit_web_view_new_with_group (WebKitWebViewGroup *group);
</del><ins>+webkit_web_view_new_with_related_view (WebKitWebView *web_view);
</ins><span class="cx">
</span><span class="cx"> WEBKIT_API GtkWidget *
</span><span class="cx"> webkit_web_view_new_with_user_content_manager (WebKitUserContentManager *user_content_manager);
</span><span class="lines">@@ -267,9 +266,6 @@
</span><span class="cx"> WEBKIT_API WebKitWebContext *
</span><span class="cx"> webkit_web_view_get_context (WebKitWebView *web_view);
</span><span class="cx">
</span><del>-WEBKIT_API WebKitWebViewGroup *
-webkit_web_view_get_group (WebKitWebView *web_view);
-
</del><span class="cx"> WEBKIT_API void
</span><span class="cx"> webkit_web_view_load_uri (WebKitWebView *web_view,
</span><span class="cx"> const gchar *uri);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkWebKitWebViewBasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp (171741 => 171742)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp        2014-07-29 11:41:21 UTC (rev 171741)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp        2014-07-29 12:42:53 UTC (rev 171742)
</span><span class="lines">@@ -946,10 +946,10 @@
</span><span class="cx"> containerClass->forall = webkitWebViewBaseContainerForall;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-WebKitWebViewBase* webkitWebViewBaseCreate(WebContext* context, WebPageGroup* pageGroup, WebUserContentControllerProxy* userContentController, WebPageProxy* relatedPage)
</del><ins>+WebKitWebViewBase* webkitWebViewBaseCreate(WebContext* context, WebPreferences* preferences, WebPageGroup* pageGroup, WebUserContentControllerProxy* userContentController, WebPageProxy* relatedPage)
</ins><span class="cx"> {
</span><span class="cx"> WebKitWebViewBase* webkitWebViewBase = WEBKIT_WEB_VIEW_BASE(g_object_new(WEBKIT_TYPE_WEB_VIEW_BASE, NULL));
</span><del>- webkitWebViewBaseCreateWebPage(webkitWebViewBase, context, pageGroup, userContentController, relatedPage);
</del><ins>+ webkitWebViewBaseCreateWebPage(webkitWebViewBase, context, preferences, pageGroup, userContentController, relatedPage);
</ins><span class="cx"> return webkitWebViewBase;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -972,7 +972,7 @@
</span><span class="cx"> return;
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>- priv->pageProxy->pageGroup().preferences().setAcceleratedCompositingEnabled(false);
</del><ins>+ priv->pageProxy->preferences().setAcceleratedCompositingEnabled(false);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if HAVE(GTK_SCALE_FACTOR)
</span><span class="lines">@@ -982,11 +982,12 @@
</span><span class="cx"> }
</span><span class="cx"> #endif // HAVE(GTK_SCALE_FACTOR)
</span><span class="cx">
</span><del>-void webkitWebViewBaseCreateWebPage(WebKitWebViewBase* webkitWebViewBase, WebContext* context, WebPageGroup* pageGroup, WebUserContentControllerProxy* userContentController, WebPageProxy* relatedPage)
</del><ins>+void webkitWebViewBaseCreateWebPage(WebKitWebViewBase* webkitWebViewBase, WebContext* context, WebPreferences* preferences, WebPageGroup* pageGroup, WebUserContentControllerProxy* userContentController, WebPageProxy* relatedPage)
</ins><span class="cx"> {
</span><span class="cx"> WebKitWebViewBasePrivate* priv = webkitWebViewBase->priv;
</span><span class="cx">
</span><span class="cx"> WebPageConfiguration webPageConfiguration;
</span><ins>+ webPageConfiguration.preferences = preferences;
</ins><span class="cx"> webPageConfiguration.pageGroup = pageGroup;
</span><span class="cx"> webPageConfiguration.relatedPage = relatedPage;
</span><span class="cx"> webPageConfiguration.userContentController = userContentController;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkWebKitWebViewBasePrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBasePrivate.h (171741 => 171742)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBasePrivate.h        2014-07-29 11:41:21 UTC (rev 171741)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBasePrivate.h        2014-07-29 12:42:53 UTC (rev 171742)
</span><span class="lines">@@ -34,10 +34,10 @@
</span><span class="cx"> #include "WebKitWebViewBase.h"
</span><span class="cx"> #include "WebPageProxy.h"
</span><span class="cx">
</span><del>-WebKitWebViewBase* webkitWebViewBaseCreate(WebKit::WebContext*, WebKit::WebPageGroup*, WebKit::WebUserContentControllerProxy*, WebKit::WebPageProxy*);
</del><ins>+WebKitWebViewBase* webkitWebViewBaseCreate(WebKit::WebContext*, WebKit::WebPreferences*, WebKit::WebPageGroup*, WebKit::WebUserContentControllerProxy*, WebKit::WebPageProxy*);
</ins><span class="cx"> GtkIMContext* webkitWebViewBaseGetIMContext(WebKitWebViewBase*);
</span><span class="cx"> WebKit::WebPageProxy* webkitWebViewBaseGetPage(WebKitWebViewBase*);
</span><del>-void webkitWebViewBaseCreateWebPage(WebKitWebViewBase*, WebKit::WebContext*, WebKit::WebPageGroup*, WebKit::WebUserContentControllerProxy*, WebKit::WebPageProxy*);
</del><ins>+void webkitWebViewBaseCreateWebPage(WebKitWebViewBase*, WebKit::WebContext*, WebKit::WebPreferences*, WebKit::WebPageGroup*, WebKit::WebUserContentControllerProxy*, WebKit::WebPageProxy*);
</ins><span class="cx"> void webkitWebViewBaseSetTooltipText(WebKitWebViewBase*, const char*);
</span><span class="cx"> void webkitWebViewBaseSetTooltipArea(WebKitWebViewBase*, const WebCore::IntRect&);
</span><span class="cx"> void webkitWebViewBaseForwardNextKeyEvent(WebKitWebViewBase*);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkWebKitWebViewGroupcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewGroup.cpp (171741 => 171742)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewGroup.cpp        2014-07-29 11:41:21 UTC (rev 171741)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewGroup.cpp        2014-07-29 12:42:53 UTC (rev 171742)
</span><span class="lines">@@ -1,238 +0,0 @@
</span><del>-/*
- * Copyright (C) 2013 Igalia S.L.
- *
- * 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 "WebKitWebViewGroup.h"
-
-#include "APIArray.h"
-#include "APIString.h"
-#include "WebKitPrivate.h"
-#include "WebKitSettingsPrivate.h"
-#include "WebKitWebViewGroupPrivate.h"
-#include <glib/gi18n-lib.h>
-#include <wtf/gobject/GRefPtr.h>
-#include <wtf/text/CString.h>
-
-using namespace WebKit;
-
-/**
- * SECTION: WebKitWebViewGroup
- * @Short_description: Group of web views
- * @Title: WebKitWebViewGroup
- * @See_also: #WebKitWebView, #WebKitSettings
- *
- * A WebKitWebViewGroup represents a group of #WebKitWebView<!-- -->s that
- * share things like settings. There's a default WebKitWebViewGroup where
- * all #WebKitWebView<!-- -->s of the same #WebKitWebContext are added by default.
- * To create a #WebKitWebView in a different WebKitWebViewGroup you can use
- * webkit_web_view_new_with_group().
- *
- * WebKitWebViewGroups are identified by a unique name given when the group is
- * created with webkit_web_view_group_new().
- * WebKitWebViewGroups have a #WebKitSettings to control the settings of all
- * #WebKitWebView<!-- -->s of the group. You can get the settings with
- * webkit_web_view_group_get_settings() to handle the settings, or you can set
- * your own #WebKitSettings with webkit_web_view_group_set_settings(). When
- * the #WebKitSettings of a WebKitWebViewGroup changes, the signal notify::settings
- * is emitted on the group.
- */
-
-enum {
- PROP_0,
-
- PROP_SETTINGS
-};
-
-struct _WebKitWebViewGroupPrivate {
- RefPtr<WebPageGroup> pageGroup;
- CString name;
- GRefPtr<WebKitSettings> settings;
-};
-
-WEBKIT_DEFINE_TYPE(WebKitWebViewGroup, webkit_web_view_group, G_TYPE_OBJECT)
-
-static inline WebCore::UserContentInjectedFrames toWebCoreUserContentInjectedFrames(WebKitInjectedContentFrames kitFrames)
-{
- switch (kitFrames) {
- case WEBKIT_INJECTED_CONTENT_FRAMES_ALL:
- return WebCore::InjectInAllFrames;
- case WEBKIT_INJECTED_CONTENT_FRAMES_TOP_ONLY:
- return WebCore::InjectInTopFrameOnly;
- default:
- ASSERT_NOT_REACHED();
- return WebCore::InjectInAllFrames;
- }
-}
-
-static void webkitWebViewGroupSetProperty(GObject* object, guint propId, const GValue* value, GParamSpec* paramSpec)
-{
- WebKitWebViewGroup* group = WEBKIT_WEB_VIEW_GROUP(object);
-
- switch (propId) {
- case PROP_SETTINGS:
- webkit_web_view_group_set_settings(group, WEBKIT_SETTINGS(g_value_get_object(value)));
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID(object, propId, paramSpec);
- }
-}
-
-static void webkitWebViewGroupGetProperty(GObject* object, guint propId, GValue* value, GParamSpec* paramSpec)
-{
- WebKitWebViewGroup* group = WEBKIT_WEB_VIEW_GROUP(object);
-
- switch (propId) {
- case PROP_SETTINGS:
- g_value_set_object(value, webkit_web_view_group_get_settings(group));
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID(object, propId, paramSpec);
- }
-}
-
-static void webkitWebViewGroupConstructed(GObject* object)
-{
- G_OBJECT_CLASS(webkit_web_view_group_parent_class)->constructed(object);
-
- WebKitWebViewGroupPrivate* priv = WEBKIT_WEB_VIEW_GROUP(object)->priv;
- priv->settings = adoptGRef(webkit_settings_new());
-}
-
-static void webkit_web_view_group_class_init(WebKitWebViewGroupClass* hitTestResultClass)
-{
- GObjectClass* objectClass = G_OBJECT_CLASS(hitTestResultClass);
- objectClass->set_property = webkitWebViewGroupSetProperty;
- objectClass->get_property = webkitWebViewGroupGetProperty;
- objectClass->constructed = webkitWebViewGroupConstructed;
-
- /**
- * WebKitWebViewGroup:settings:
- *
- * The #WebKitSettings of the web view group.
- */
- g_object_class_install_property(
- objectClass,
- PROP_SETTINGS,
- g_param_spec_object(
- "settings",
- _("Settings"),
- _("The settings of the web view group"),
- WEBKIT_TYPE_SETTINGS,
- WEBKIT_PARAM_READWRITE));
-}
-
-static void webkitWebViewGroupAttachSettingsToPageGroup(WebKitWebViewGroup* group)
-{
- group->priv->pageGroup->setPreferences(webkitSettingsGetPreferences(group->priv->settings.get()));
-}
-
-WebKitWebViewGroup* webkitWebViewGroupCreate(WebPageGroup* pageGroup)
-{
- WebKitWebViewGroup* group = WEBKIT_WEB_VIEW_GROUP(g_object_new(WEBKIT_TYPE_WEB_VIEW_GROUP, NULL));
- group->priv->pageGroup = pageGroup;
- webkitWebViewGroupAttachSettingsToPageGroup(group);
- return group;
-}
-
-WebPageGroup* webkitWebViewGroupGetPageGroup(WebKitWebViewGroup* group)
-{
- return group->priv->pageGroup.get();
-}
-
-/**
- * webkit_web_view_group_new:
- * @name: (allow-none): the name of the group
- *
- * Creates a new #WebKitWebViewGroup with the given @name.
- * If @name is %NULL a unique identifier name will be created
- * automatically.
- * The newly created #WebKitWebViewGroup doesn't contain any
- * #WebKitWebView, web views are added to the new group when created
- * with webkit_web_view_new_with_group() passing the group.
- *
- * Returns: (transfer full): a new #WebKitWebViewGroup
- */
-WebKitWebViewGroup* webkit_web_view_group_new(const char* name)
-{
- WebKitWebViewGroup* group = WEBKIT_WEB_VIEW_GROUP(g_object_new(WEBKIT_TYPE_WEB_VIEW_GROUP, NULL));
- group->priv->pageGroup = WebPageGroup::create(name ? String::fromUTF8(name) : String());
- webkitWebViewGroupAttachSettingsToPageGroup(group);
- return group;
-}
-
-/**
- * webkit_web_view_group_get_name:
- * @group: a #WebKitWebViewGroup
- *
- * Gets the name that uniquely identifies the #WebKitWebViewGroup.
- *
- * Returns: the name of @group
- */
-const char* webkit_web_view_group_get_name(WebKitWebViewGroup* group)
-{
- g_return_val_if_fail(WEBKIT_IS_WEB_VIEW_GROUP(group), 0);
-
- WebKitWebViewGroupPrivate* priv = group->priv;
- if (priv->name.isNull())
- priv->name = priv->pageGroup->identifier().utf8();
-
- return priv->name.data();
-}
-
-/**
- * webkit_web_view_group_get_settings:
- * @group: a #WebKitWebViewGroup
- *
- * Gets the #WebKitSettings of the #WebKitWebViewGroup.
- *
- * Returns: (transfer none): the settings of @group
- */
-WebKitSettings* webkit_web_view_group_get_settings(WebKitWebViewGroup* group)
-{
- g_return_val_if_fail(WEBKIT_IS_WEB_VIEW_GROUP(group), 0);
-
- return group->priv->settings.get();
-}
-
-/**
- * webkit_web_view_group_set_settings:
- * @group: a #WebKitWebViewGroup
- * @settings: a #WebKitSettings
- *
- * Sets a new #WebKitSettings for the #WebKitWebViewGroup. The settings will
- * affect to all the #WebKitWebView<!-- -->s of the group.
- * #WebKitWebViewGroup<!-- -->s always have a #WebKitSettings so if you just want to
- * modify a setting you can use webkit_web_view_group_get_settings() and modify the
- * returned #WebKitSettings instead.
- * Setting the same #WebKitSettings multiple times doesn't have any effect.
- * You can monitor the settings of a #WebKitWebViewGroup by connecting to the
- * notify::settings signal of @group.
- */
-void webkit_web_view_group_set_settings(WebKitWebViewGroup* group, WebKitSettings* settings)
-{
- g_return_if_fail(WEBKIT_IS_WEB_VIEW_GROUP(group));
- g_return_if_fail(WEBKIT_IS_SETTINGS(settings));
-
- if (group->priv->settings == settings)
- return;
-
- group->priv->settings = settings;
- webkitWebViewGroupAttachSettingsToPageGroup(group);
- g_object_notify(G_OBJECT(group), "settings");
-}
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkWebKitWebViewGrouph"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewGroup.h (171741 => 171742)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewGroup.h        2014-07-29 11:41:21 UTC (rev 171741)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewGroup.h        2014-07-29 12:42:53 UTC (rev 171742)
</span><span class="lines">@@ -1,89 +0,0 @@
</span><del>-/*
- * Copyright (C) 2013 Igalia S.L.
- *
- * 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.
- */
-
-#if !defined(__WEBKIT2_H_INSIDE__) && !defined(WEBKIT2_COMPILATION)
-#error "Only <webkit2/webkit2.h> can be included directly."
-#endif
-
-#ifndef WebKitWebViewGroup_h
-#define WebKitWebViewGroup_h
-
-#include <glib-object.h>
-#include <webkit2/WebKitDefines.h>
-#include <webkit2/WebKitSettings.h>
-
-G_BEGIN_DECLS
-
-#define WEBKIT_TYPE_WEB_VIEW_GROUP (webkit_web_view_group_get_type())
-#define WEBKIT_WEB_VIEW_GROUP(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_TYPE_WEB_VIEW_GROUP, WebKitWebViewGroup))
-#define WEBKIT_IS_WEB_VIEW_GROUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_TYPE_WEB_VIEW_GROUP))
-#define WEBKIT_WEB_VIEW_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), WEBKIT_TYPE_WEB_VIEW_GROUP, WebKitWebViewGroupClass))
-#define WEBKIT_IS_WEB_VIEW_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), WEBKIT_TYPE_WEB_VIEW_GROUP))
-#define WEBKIT_WEB_VIEW_GROUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), WEBKIT_TYPE_WEB_VIEW_GROUP, WebKitWebViewGroupClass))
-
-typedef struct _WebKitWebViewGroup WebKitWebViewGroup;
-typedef struct _WebKitWebViewGroupClass WebKitWebViewGroupClass;
-typedef struct _WebKitWebViewGroupPrivate WebKitWebViewGroupPrivate;
-
-struct _WebKitWebViewGroup {
- GObject parent;
-
- WebKitWebViewGroupPrivate *priv;
-};
-
-struct _WebKitWebViewGroupClass {
- GObjectClass parent_class;
-
- void (*_webkit_reserved0) (void);
- void (*_webkit_reserved1) (void);
- void (*_webkit_reserved2) (void);
- void (*_webkit_reserved3) (void);
-};
-
-/**
- * WebKitInjectedContentFrames:
- * @WEBKIT_INJECTED_CONTENT_FRAMES_ALL: Content will be injected into all frames.
- * @WEBKIT_INJECTED_CONTENT_FRAMES_TOP_ONLY: Content will only be injected into the main frame.
- *
- * Enum values used for determining into which frames content is injected.
- */
-typedef enum {
- WEBKIT_INJECTED_CONTENT_FRAMES_ALL,
- WEBKIT_INJECTED_CONTENT_FRAMES_TOP_ONLY,
-} WebKitInjectedContentFrames;
-
-WEBKIT_API GType
-webkit_web_view_group_get_type (void);
-
-WEBKIT_API WebKitWebViewGroup *
-webkit_web_view_group_new (const gchar *name);
-
-WEBKIT_API const gchar *
-webkit_web_view_group_get_name (WebKitWebViewGroup *group);
-
-WEBKIT_API WebKitSettings *
-webkit_web_view_group_get_settings (WebKitWebViewGroup *group);
-
-WEBKIT_API void
-webkit_web_view_group_set_settings (WebKitWebViewGroup *group,
- WebKitSettings *settings);
-
-G_END_DECLS
-
-#endif
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkWebKitWebViewGroupPrivateh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewGroupPrivate.h (171741 => 171742)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewGroupPrivate.h        2014-07-29 11:41:21 UTC (rev 171741)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewGroupPrivate.h        2014-07-29 12:42:53 UTC (rev 171742)
</span><span class="lines">@@ -1,29 +0,0 @@
</span><del>-/*
- * Copyright (C) 2013 Igalia S.L.
- *
- * 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 WebKitWebViewGroupPrivate_h
-#define WebKitWebViewGroupPrivate_h
-
-#include "WebKitWebViewGroup.h"
-#include "WebPageGroup.h"
-
-WebKitWebViewGroup* webkitWebViewGroupCreate(WebKit::WebPageGroup*);
-WebKit::WebPageGroup* webkitWebViewGroupGetPageGroup(WebKitWebViewGroup*);
-
-#endif // WebKitWebViewGroupPrivate_h
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkdocswebkit2gtkdocssgml"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-docs.sgml (171741 => 171742)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-docs.sgml        2014-07-29 11:41:21 UTC (rev 171741)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-docs.sgml        2014-07-29 12:42:53 UTC (rev 171742)
</span><span class="lines">@@ -43,7 +43,6 @@
</span><span class="cx"> <xi:include href="xml/WebKitContextMenuItem.xml"/>
</span><span class="cx"> <xi:include href="xml/WebKitFormSubmissionRequest.xml"/>
</span><span class="cx"> <xi:include href="xml/WebKitSecurityManager.xml"/>
</span><del>- <xi:include href="xml/WebKitWebViewGroup.xml"/>
</del><span class="cx"> <xi:include href="xml/WebKitCertificateInfo.xml"/>
</span><span class="cx"> </chapter>
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkdocswebkit2gtksectionstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-sections.txt (171741 => 171742)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-sections.txt        2014-07-29 11:41:21 UTC (rev 171741)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-sections.txt        2014-07-29 12:42:53 UTC (rev 171742)
</span><span class="lines">@@ -134,10 +134,9 @@
</span><span class="cx"> webkit_web_view_new
</span><span class="cx"> webkit_web_view_new_with_context
</span><span class="cx"> webkit_web_view_new_with_related_view
</span><del>-webkit_web_view_new_with_group
</del><ins>+webkit_web_view_new_with_settings
</ins><span class="cx"> webkit_web_view_new_with_user_content_manager
</span><span class="cx"> webkit_web_view_get_context
</span><del>-webkit_web_view_get_group
</del><span class="cx"> webkit_web_view_get_user_content_manager
</span><span class="cx"> webkit_web_view_load_uri
</span><span class="cx"> webkit_web_view_load_html
</span><span class="lines">@@ -1060,29 +1059,6 @@
</span><span class="cx"> </SECTION>
</span><span class="cx">
</span><span class="cx"> <SECTION>
</span><del>-<FILE>WebKitWebViewGroup</FILE>
-WebKitWebViewGroup
-WebKitInjectedContentFrames
-webkit_web_view_group_new
-webkit_web_view_group_get_name
-webkit_web_view_group_get_settings
-webkit_web_view_group_set_settings
-
-<SUBSECTION Standard>
-WebKitWebViewGroupClass
-WEBKIT_TYPE_WEB_VIEW_GROUP
-WEBKIT_WEB_VIEW_GROUP
-WEBKIT_IS_WEB_VIEW_GROUP
-WEBKIT_WEB_VIEW_GROUP_CLASS
-WEBKIT_IS_WEB_VIEW_GROUP_CLASS
-WEBKIT_WEB_VIEW_GROUP_GET_CLASS
-
-<SUBSECTION Private>
-WebKitWebViewGroupPrivate
-webkit_web_view_group_get_type
-</SECTION>
-
-<SECTION>
</del><span class="cx"> <FILE>WebKitWebExtension</FILE>
</span><span class="cx"> WebKitWebExtension
</span><span class="cx"> WebKitWebExtensionInitializeFunction
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkdocswebkit2gtktypes"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk.types (171741 => 171742)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk.types        2014-07-29 11:41:21 UTC (rev 171741)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk.types        2014-07-29 12:42:53 UTC (rev 171742)
</span><span class="lines">@@ -21,7 +21,6 @@
</span><span class="cx"> webkit_uri_scheme_request_get_type
</span><span class="cx"> webkit_context_menu_get_type
</span><span class="cx"> webkit_context_menu_item_get_type
</span><del>-webkit_web_view_group_get_type
</del><span class="cx"> webkit_web_extension_get_type
</span><span class="cx"> webkit_web_page_get_type
</span><span class="cx"> webkit_authentication_request_get_type
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkwebkit2h"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/gtk/webkit2.h (171741 => 171742)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/webkit2.h        2014-07-29 11:41:21 UTC (rev 171741)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/webkit2.h        2014-07-29 12:42:53 UTC (rev 171742)
</span><span class="lines">@@ -69,7 +69,6 @@
</span><span class="cx"> #include <webkit2/WebKitWebResource.h>
</span><span class="cx"> #include <webkit2/WebKitWebView.h>
</span><span class="cx"> #include <webkit2/WebKitWebViewBase.h>
</span><del>-#include <webkit2/WebKitWebViewGroup.h>
</del><span class="cx"> #include <webkit2/WebKitWindowProperties.h>
</span><span class="cx">
</span><span class="cx"> #undef __WEBKIT2_H_INSIDE__
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessgtkWebInspectorProxyGtkcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/gtk/WebInspectorProxyGtk.cpp (171741 => 171742)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/gtk/WebInspectorProxyGtk.cpp        2014-07-29 11:41:21 UTC (rev 171741)
+++ trunk/Source/WebKit2/UIProcess/gtk/WebInspectorProxyGtk.cpp        2014-07-29 12:42:53 UTC (rev 171742)
</span><span class="lines">@@ -62,7 +62,7 @@
</span><span class="cx"> {
</span><span class="cx"> ASSERT(m_page);
</span><span class="cx"> ASSERT(!m_inspectorView);
</span><del>- m_inspectorView = GTK_WIDGET(webkitWebViewBaseCreate(&page()->process().context(), inspectorPageGroup(), nullptr, m_page));
</del><ins>+ m_inspectorView = GTK_WIDGET(webkitWebViewBaseCreate(&page()->process().context(), nullptr, inspectorPageGroup(), nullptr, m_page));
</ins><span class="cx"> g_object_add_weak_pointer(G_OBJECT(m_inspectorView), reinterpret_cast<void**>(&m_inspectorView));
</span><span class="cx"> return webkitWebViewBaseGetPage(WEBKIT_WEB_VIEW_BASE(m_inspectorView));
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (171741 => 171742)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2014-07-29 11:41:21 UTC (rev 171741)
+++ trunk/Tools/ChangeLog        2014-07-29 12:42:53 UTC (rev 171742)
</span><span class="lines">@@ -1,3 +1,23 @@
</span><ins>+2014-07-29 Adrian Perez de Castro <aperez@igalia.com>
+
+ [GTK] Remove WebKitWebViewGroup from WebKit2 GTK+ API
+ https://bugs.webkit.org/show_bug.cgi?id=133729
+
+ Reviewed by Carlos Garcia Campos.
+
+ Removes WebKitWebViewGroup, effectively reverting the changes
+ introduced by r149117. The motivation for WebKitWebViewGroup
+ was using the user style sheet injection API, which has been
+ moved into WebKitUserContentManager, rendering it unneeded.
+
+ * TestWebKitAPI/Tests/WebKit2Gtk/CMakeLists.txt: Remove tests
+ for WebKitWebViewGroup.
+ * TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebView.cpp:
+ (testWebViewSettings):
+ Restore the assertions that check that settings objects are
+ released. Add test for webkit_web_view_new_with_settings().
+ * TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebViewGroup.cpp: Removed.
+
</ins><span class="cx"> 2014-07-29 Carlos Garcia Campos <cgarcia@igalia.com>
</span><span class="cx">
</span><span class="cx"> Implement webkit_web_view_load_string() in WebKit2
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWebKit2GtkCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/Tests/WebKit2Gtk/CMakeLists.txt (171741 => 171742)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WebKit2Gtk/CMakeLists.txt        2014-07-29 11:41:21 UTC (rev 171741)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit2Gtk/CMakeLists.txt        2014-07-29 12:42:53 UTC (rev 171742)
</span><span class="lines">@@ -109,7 +109,6 @@
</span><span class="cx"> ADD_WK2_TEST(TestWebKitSettings TestWebKitSettings.cpp)
</span><span class="cx"> ADD_WK2_TEST(TestWebKitVersion TestWebKitVersion.cpp)
</span><span class="cx"> ADD_WK2_TEST(TestWebViewEditor TestWebViewEditor.cpp)
</span><del>-ADD_WK2_TEST(TestWebKitWebViewGroup TestWebKitWebViewGroup.cpp)
</del><span class="cx"> ADD_WK2_TEST(TestWebKitWebContext TestWebKitWebContext.cpp)
</span><span class="cx"> ADD_WK2_TEST(TestWebKitWebView TestWebKitWebView.cpp)
</span><span class="cx"> ADD_WK2_TEST(TestWebKitUserContentManager TestWebKitUserContentManager.cpp)
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWebKit2GtkTestWebKitWebViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebView.cpp (171741 => 171742)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebView.cpp        2014-07-29 11:41:21 UTC (rev 171741)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebView.cpp        2014-07-29 12:42:53 UTC (rev 171742)
</span><span class="lines">@@ -46,10 +46,12 @@
</span><span class="cx"> static void testWebViewSettings(WebViewTest* test, gconstpointer)
</span><span class="cx"> {
</span><span class="cx"> WebKitSettings* defaultSettings = webkit_web_view_get_settings(test->m_webView);
</span><ins>+ test->assertObjectIsDeletedWhenTestFinishes(G_OBJECT(defaultSettings));
</ins><span class="cx"> g_assert(defaultSettings);
</span><span class="cx"> g_assert(webkit_settings_get_enable_javascript(defaultSettings));
</span><span class="cx">
</span><span class="cx"> GRefPtr<WebKitSettings> newSettings = adoptGRef(webkit_settings_new());
</span><ins>+ test->assertObjectIsDeletedWhenTestFinishes(G_OBJECT(newSettings.get()));
</ins><span class="cx"> g_object_set(G_OBJECT(newSettings.get()), "enable-javascript", FALSE, NULL);
</span><span class="cx"> webkit_web_view_set_settings(test->m_webView, newSettings.get());
</span><span class="cx">
</span><span class="lines">@@ -63,10 +65,15 @@
</span><span class="cx"> g_assert(webkit_web_view_get_settings(WEBKIT_WEB_VIEW(webView2.get())) == settings);
</span><span class="cx">
</span><span class="cx"> GRefPtr<WebKitSettings> newSettings2 = adoptGRef(webkit_settings_new());
</span><ins>+ test->assertObjectIsDeletedWhenTestFinishes(G_OBJECT(newSettings2.get()));
</ins><span class="cx"> webkit_web_view_set_settings(WEBKIT_WEB_VIEW(webView2.get()), newSettings2.get());
</span><span class="cx"> settings = webkit_web_view_get_settings(WEBKIT_WEB_VIEW(webView2.get()));
</span><span class="cx"> g_assert(settings == newSettings2.get());
</span><span class="cx"> g_assert(webkit_settings_get_enable_javascript(settings));
</span><ins>+
+ GRefPtr<GtkWidget> webView3 = webkit_web_view_new_with_settings(newSettings2.get());
+ test->assertObjectIsDeletedWhenTestFinishes(G_OBJECT(webView3.get()));
+ g_assert(webkit_web_view_get_settings(WEBKIT_WEB_VIEW(webView3.get())) == newSettings2.get());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static void testWebViewZoomLevel(WebViewTest* test, gconstpointer)
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWebKit2GtkTestWebKitWebViewGroupcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebViewGroup.cpp (171741 => 171742)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebViewGroup.cpp        2014-07-29 11:41:21 UTC (rev 171741)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebViewGroup.cpp        2014-07-29 12:42:53 UTC (rev 171742)
</span><span class="lines">@@ -1,103 +0,0 @@
</span><del>-/*
- * Copyright (C) 2013 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2,1 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 "WebKitTestServer.h"
-#include "WebViewTest.h"
-#include <cstdarg>
-#include <gtk/gtk.h>
-#include <webkit2/webkit2.h>
-#include <wtf/gobject/GRefPtr.h>
-
-static void testWebViewGroupDefault(Test* test, gconstpointer)
-{
- // Default group is shared by all WebViews by default.
- GRefPtr<WebKitWebView> webView1 = WEBKIT_WEB_VIEW(webkit_web_view_new());
- GRefPtr<WebKitWebView> webView2 = WEBKIT_WEB_VIEW(webkit_web_view_new());
- g_assert(webkit_web_view_get_group(webView1.get()) == webkit_web_view_get_group(webView2.get()));
-
- // Settings are shared by all web view in the same group.
- g_assert(webkit_web_view_get_settings(webView1.get()) == webkit_web_view_get_settings(webView2.get()));
- g_assert(webkit_web_view_get_settings(webView1.get()) == webkit_web_view_group_get_settings(webkit_web_view_get_group(webView2.get())));
-}
-
-static void testWebViewGroupNewGroup(Test* test, gconstpointer)
-{
- // Passing 0 as group name generates the name automatically.
- GRefPtr<WebKitWebViewGroup> viewGroup1 = adoptGRef(webkit_web_view_group_new(0));
- test->assertObjectIsDeletedWhenTestFinishes(G_OBJECT(viewGroup1.get()));
- g_assert(webkit_web_view_group_get_name(viewGroup1.get()));
-
- // New group with a given name.
- GRefPtr<WebKitWebViewGroup> viewGroup2 = adoptGRef(webkit_web_view_group_new("TestGroup2"));
- test->assertObjectIsDeletedWhenTestFinishes(G_OBJECT(viewGroup2.get()));
- g_assert_cmpstr(webkit_web_view_group_get_name(viewGroup2.get()), ==, "TestGroup2");
- g_assert_cmpstr(webkit_web_view_group_get_name(viewGroup2.get()), !=, webkit_web_view_group_get_name(viewGroup1.get()));
-
- // Every group has its own settings.
- g_assert(webkit_web_view_group_get_settings(viewGroup1.get()) != webkit_web_view_group_get_settings(viewGroup2.get()));
-}
-
-static void testWebViewNewWithGroup(Test* test, gconstpointer)
-{
- GRefPtr<WebKitWebViewGroup> viewGroup1 = adoptGRef(webkit_web_view_group_new("TestGroup1"));
- test->assertObjectIsDeletedWhenTestFinishes(G_OBJECT(viewGroup1.get()));
- GRefPtr<WebKitWebView> webView1 = WEBKIT_WEB_VIEW(webkit_web_view_new_with_group(viewGroup1.get()));
- g_assert(webkit_web_view_get_group(webView1.get()) == viewGroup1.get());
-
- GRefPtr<WebKitWebView> webView2 = WEBKIT_WEB_VIEW(webkit_web_view_new());
- g_assert(webkit_web_view_get_group(webView2.get()) != viewGroup1.get());
-
- // Settings should be different for views in different groups.
- g_assert(webkit_web_view_get_settings(webView1.get()) != webkit_web_view_get_settings(webView2.get()));
-}
-
-static void testWebViewGroupSettings(Test* test, gconstpointer)
-{
- GRefPtr<WebKitWebViewGroup> viewGroup1 = adoptGRef(webkit_web_view_group_new("TestGroup1"));
- test->assertObjectIsDeletedWhenTestFinishes(G_OBJECT(viewGroup1.get()));
- GRefPtr<WebKitSettings> newSettings = adoptGRef(webkit_settings_new_with_settings("enable-javascript", FALSE, nullptr));
- test->assertObjectIsDeletedWhenTestFinishes(G_OBJECT(newSettings.get()));
- webkit_web_view_group_set_settings(viewGroup1.get(), newSettings.get());
- g_assert(webkit_web_view_group_get_settings(viewGroup1.get()) == newSettings.get());
-
- GRefPtr<WebKitWebView> webView1 = WEBKIT_WEB_VIEW(webkit_web_view_new_with_group(viewGroup1.get()));
- GRefPtr<WebKitWebView> webView2 = WEBKIT_WEB_VIEW(webkit_web_view_new());
- WebKitSettings* webView1Settings = webkit_web_view_get_settings(webView1.get());
- WebKitSettings* webView2Settings = webkit_web_view_get_settings(webView2.get());
- g_assert(webView1Settings != webView2Settings);
- g_assert(webkit_settings_get_enable_javascript(webView1Settings) != webkit_settings_get_enable_javascript(webView2Settings));
-
- webkit_web_view_set_settings(webView1.get(), webView2Settings);
- g_assert(webkit_web_view_get_settings(webView1.get()) == webView2Settings);
- g_assert(webkit_web_view_group_get_settings(webkit_web_view_get_group(webView1.get())) == webView2Settings);
-}
-
-void beforeAll()
-{
- Test::add("WebKitWebViewGroup", "default-group", testWebViewGroupDefault);
- Test::add("WebKitWebViewGroup", "new-group", testWebViewGroupNewGroup);
- Test::add("WebKitWebView", "new-with-group", testWebViewNewWithGroup);
- Test::add("WebKitWebViewGroup", "settings", testWebViewGroupSettings);
-}
-
-void afterAll()
-{
-}
</del></span></pre>
</div>
</div>
</body>
</html>