<!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>[163597] trunk/Source/WebKit2</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/163597">163597</a></dd>
<dt>Author</dt> <dd>andersca@apple.com</dd>
<dt>Date</dt> <dd>2014-02-06 18:12:18 -0800 (Thu, 06 Feb 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Begin work on making preferences per page instead of per page group
https://bugs.webkit.org/show_bug.cgi?id=128349

Reviewed by Andreas Kling.

* UIProcess/API/C/WKPageGroup.cpp:
(WKPageGroupGetPreferences):
* UIProcess/API/C/mac/WKPagePrivateMac.cpp:
(WKPageIsURLKnownHSTSHost):
* UIProcess/API/mac/WKView.mm:
(-[WKView _preferencesDidChange]):
(-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]):
* UIProcess/WebContext.cpp:
(WebKit::WebContext::createWebPage):
* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorPageGroups::createInspectorPageGroup):
(WebKit::WebInspectorProxy::attach):
(WebKit::WebInspectorProxy::detach):
(WebKit::WebInspectorProxy::setAttachedWindowHeight):
(WebKit::WebInspectorProxy::setAttachedWindowWidth):
(WebKit::WebInspectorProxy::createInspectorPage):
(WebKit::WebInspectorProxy::shouldOpenAttached):
* UIProcess/WebPageGroup.cpp:
(WebKit::WebPageGroup::preferences):
* UIProcess/WebPageGroup.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::create):
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::isProcessSuppressible):
(WebKit::WebPageProxy::canShowMIMEType):
(WebKit::WebPageProxy::preferencesDidChange):
(WebKit::WebPageProxy::creationParameters):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::preferences):
(WebKit::WebPageProxy::setPreferences):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::createWebPage):
* UIProcess/mac/ViewGestureController.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::createInspectorWindow):
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
(WebKit::WebInspectorProxy::windowFrameDidChange):
(WebKit::WebInspectorProxy::platformAttach):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKPageGroupcpp">trunk/Source/WebKit2/UIProcess/API/C/WKPageGroup.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICmacWKPagePrivateMaccpp">trunk/Source/WebKit2/UIProcess/API/C/mac/WKPagePrivateMac.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPImacWKViewmm">trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebContextcpp">trunk/Source/WebKit2/UIProcess/WebContext.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebInspectorProxycpp">trunk/Source/WebKit2/UIProcess/WebInspectorProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageGroupcpp">trunk/Source/WebKit2/UIProcess/WebPageGroup.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageGrouph">trunk/Source/WebKit2/UIProcess/WebPageGroup.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxycpp">trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxyh">trunk/Source/WebKit2/UIProcess/WebPageProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebProcessProxycpp">trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacViewGestureControllermm">trunk/Source/WebKit2/UIProcess/mac/ViewGestureController.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacWebInspectorProxyMacmm">trunk/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (163596 => 163597)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-02-07 02:04:27 UTC (rev 163596)
+++ trunk/Source/WebKit2/ChangeLog        2014-02-07 02:12:18 UTC (rev 163597)
</span><span class="lines">@@ -1,3 +1,50 @@
</span><ins>+2014-02-06  Anders Carlsson  &lt;andersca@apple.com&gt;
+
+        Begin work on making preferences per page instead of per page group
+        https://bugs.webkit.org/show_bug.cgi?id=128349
+
+        Reviewed by Andreas Kling.
+
+        * UIProcess/API/C/WKPageGroup.cpp:
+        (WKPageGroupGetPreferences):
+        * UIProcess/API/C/mac/WKPagePrivateMac.cpp:
+        (WKPageIsURLKnownHSTSHost):
+        * UIProcess/API/mac/WKView.mm:
+        (-[WKView _preferencesDidChange]):
+        (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]):
+        * UIProcess/WebContext.cpp:
+        (WebKit::WebContext::createWebPage):
+        * UIProcess/WebInspectorProxy.cpp:
+        (WebKit::WebInspectorPageGroups::createInspectorPageGroup):
+        (WebKit::WebInspectorProxy::attach):
+        (WebKit::WebInspectorProxy::detach):
+        (WebKit::WebInspectorProxy::setAttachedWindowHeight):
+        (WebKit::WebInspectorProxy::setAttachedWindowWidth):
+        (WebKit::WebInspectorProxy::createInspectorPage):
+        (WebKit::WebInspectorProxy::shouldOpenAttached):
+        * UIProcess/WebPageGroup.cpp:
+        (WebKit::WebPageGroup::preferences):
+        * UIProcess/WebPageGroup.h:
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::create):
+        (WebKit::WebPageProxy::WebPageProxy):
+        (WebKit::WebPageProxy::isProcessSuppressible):
+        (WebKit::WebPageProxy::canShowMIMEType):
+        (WebKit::WebPageProxy::preferencesDidChange):
+        (WebKit::WebPageProxy::creationParameters):
+        * UIProcess/WebPageProxy.h:
+        (WebKit::WebPageProxy::preferences):
+        (WebKit::WebPageProxy::setPreferences):
+        * UIProcess/WebProcessProxy.cpp:
+        (WebKit::WebProcessProxy::createWebPage):
+        * UIProcess/mac/ViewGestureController.mm:
+        (WebKit::ViewGestureController::beginSwipeGesture):
+        * UIProcess/mac/WebInspectorProxyMac.mm:
+        (WebKit::WebInspectorProxy::createInspectorWindow):
+        (WebKit::WebInspectorProxy::platformCreateInspectorPage):
+        (WebKit::WebInspectorProxy::windowFrameDidChange):
+        (WebKit::WebInspectorProxy::platformAttach):
+
</ins><span class="cx"> 2014-02-06  Gavin Barraclough  &lt;barraclough@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Remove ChildProcess::m_activeTasks
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKPageGroupcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPageGroup.cpp (163596 => 163597)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKPageGroup.cpp        2014-02-07 02:04:27 UTC (rev 163596)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPageGroup.cpp        2014-02-07 02:12:18 UTC (rev 163597)
</span><span class="lines">@@ -55,7 +55,7 @@
</span><span class="cx"> 
</span><span class="cx"> WKPreferencesRef WKPageGroupGetPreferences(WKPageGroupRef pageGroupRef)
</span><span class="cx"> {
</span><del>-    return toAPI(toImpl(pageGroupRef)-&gt;preferences());
</del><ins>+    return toAPI(&amp;toImpl(pageGroupRef)-&gt;preferences());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WKPageGroupAddUserStyleSheet(WKPageGroupRef pageGroupRef, WKStringRef sourceRef, WKURLRef baseURL, WKArrayRef whitelistedURLPatterns, WKArrayRef blacklistedURLPatterns, WKUserContentInjectedFrames injectedFrames)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICmacWKPagePrivateMaccpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/mac/WKPagePrivateMac.cpp (163596 => 163597)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/mac/WKPagePrivateMac.cpp        2014-02-07 02:04:27 UTC (rev 163596)
+++ trunk/Source/WebKit2/UIProcess/API/C/mac/WKPagePrivateMac.cpp        2014-02-07 02:12:18 UTC (rev 163597)
</span><span class="lines">@@ -42,7 +42,7 @@
</span><span class="cx"> bool WKPageIsURLKnownHSTSHost(WKPageRef page, WKURLRef url)
</span><span class="cx"> {
</span><span class="cx">     WebPageProxy* webPageProxy = toImpl(page);
</span><del>-    bool privateBrowsingEnabled = webPageProxy-&gt;pageGroup().preferences()-&gt;privateBrowsingEnabled();
</del><ins>+    bool privateBrowsingEnabled = webPageProxy-&gt;pageGroup().preferences().privateBrowsingEnabled();
</ins><span class="cx"> 
</span><span class="cx">     return webPageProxy-&gt;process().context().isURLKnownHSTSHost(toImpl(url)-&gt;string(), privateBrowsingEnabled);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPImacWKViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm (163596 => 163597)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm        2014-02-07 02:04:27 UTC (rev 163596)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm        2014-02-07 02:12:18 UTC (rev 163597)
</span><span class="lines">@@ -2241,7 +2241,7 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_preferencesDidChange
</span><span class="cx"> {
</span><del>-    BOOL needsViewFrameInWindowCoordinates = _data-&gt;_page-&gt;pageGroup().preferences()-&gt;pluginsEnabled();
</del><ins>+    BOOL needsViewFrameInWindowCoordinates = _data-&gt;_page-&gt;preferences().pluginsEnabled();
</ins><span class="cx"> 
</span><span class="cx">     if (!!needsViewFrameInWindowCoordinates == !!_data-&gt;_needsViewFrameInWindowCoordinates)
</span><span class="cx">         return;
</span><span class="lines">@@ -2947,7 +2947,7 @@
</span><span class="cx"> 
</span><span class="cx">     _data-&gt;_intrinsicContentSize = NSMakeSize(NSViewNoInstrinsicMetric, NSViewNoInstrinsicMetric);
</span><span class="cx"> 
</span><del>-    _data-&gt;_needsViewFrameInWindowCoordinates = _data-&gt;_page-&gt;pageGroup().preferences()-&gt;pluginsEnabled();
</del><ins>+    _data-&gt;_needsViewFrameInWindowCoordinates = _data-&gt;_page-&gt;preferences().pluginsEnabled();
</ins><span class="cx">     
</span><span class="cx">     [self _registerDraggedTypes];
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebContext.cpp (163596 => 163597)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebContext.cpp        2014-02-07 02:04:27 UTC (rev 163596)
+++ trunk/Source/WebKit2/UIProcess/WebContext.cpp        2014-02-07 02:12:18 UTC (rev 163597)
</span><span class="lines">@@ -785,7 +785,7 @@
</span><span class="cx"> PassRefPtr&lt;WebPageProxy&gt; WebContext::createWebPage(PageClient&amp; pageClient, WebPageGroup* pageGroup, WebPageProxy* relatedPage)
</span><span class="cx"> {
</span><span class="cx">     WebPageGroup* group = pageGroup ? pageGroup : &amp;m_defaultPageGroup.get();
</span><del>-    return createWebPage(pageClient, group, group-&gt;preferences()-&gt;privateBrowsingEnabled() ? API::Session::legacyPrivateSession() : API::Session::defaultSession(), relatedPage);
</del><ins>+    return createWebPage(pageClient, group, group-&gt;preferences().privateBrowsingEnabled() ? API::Session::legacyPrivateSession() : API::Session::defaultSession(), relatedPage);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> DownloadProxy* WebContext::download(WebPageProxy* initiatingPage, const ResourceRequest&amp; request)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebInspectorProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebInspectorProxy.cpp (163596 => 163597)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebInspectorProxy.cpp        2014-02-07 02:04:27 UTC (rev 163596)
+++ trunk/Source/WebKit2/UIProcess/WebInspectorProxy.cpp        2014-02-07 02:12:18 UTC (rev 163597)
</span><span class="lines">@@ -105,11 +105,11 @@
</span><span class="cx"> 
</span><span class="cx"> #ifndef NDEBUG
</span><span class="cx">         // Allow developers to inspect the Web Inspector in debug builds.
</span><del>-        pageGroup-&gt;preferences()-&gt;setDeveloperExtrasEnabled(true);
-        pageGroup-&gt;preferences()-&gt;setLogsPageMessagesToSystemConsoleEnabled(true);
</del><ins>+        pageGroup-&gt;preferences().setDeveloperExtrasEnabled(true);
+        pageGroup-&gt;preferences().setLogsPageMessagesToSystemConsoleEnabled(true);
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-        pageGroup-&gt;preferences()-&gt;setApplicationChromeModeEnabled(true);
</del><ins>+        pageGroup-&gt;preferences().setApplicationChromeModeEnabled(true);
</ins><span class="cx"> 
</span><span class="cx">         return pageGroup.release();
</span><span class="cx">     }
</span><span class="lines">@@ -270,10 +270,10 @@
</span><span class="cx">     m_isAttached = true;
</span><span class="cx">     m_attachmentSide = side;
</span><span class="cx"> 
</span><del>-    inspectorPageGroup()-&gt;preferences()-&gt;setInspectorAttachmentSide(side);
</del><ins>+    inspectorPageGroup()-&gt;preferences().setInspectorAttachmentSide(side);
</ins><span class="cx"> 
</span><span class="cx">     if (m_isVisible)
</span><del>-        inspectorPageGroup()-&gt;preferences()-&gt;setInspectorStartsAttached(true);
</del><ins>+        inspectorPageGroup()-&gt;preferences().setInspectorStartsAttached(true);
</ins><span class="cx"> 
</span><span class="cx">     switch (m_attachmentSide) {
</span><span class="cx">     case AttachmentSideBottom:
</span><span class="lines">@@ -296,7 +296,7 @@
</span><span class="cx">     m_isAttached = false;
</span><span class="cx"> 
</span><span class="cx">     if (m_isVisible)
</span><del>-        inspectorPageGroup()-&gt;preferences()-&gt;setInspectorStartsAttached(false);
</del><ins>+        inspectorPageGroup()-&gt;preferences().setInspectorStartsAttached(false);
</ins><span class="cx"> 
</span><span class="cx">     m_page-&gt;process().send(Messages::WebInspector::Detached(), m_page-&gt;pageID());
</span><span class="cx"> 
</span><span class="lines">@@ -305,13 +305,13 @@
</span><span class="cx"> 
</span><span class="cx"> void WebInspectorProxy::setAttachedWindowHeight(unsigned height)
</span><span class="cx"> {
</span><del>-    inspectorPageGroup()-&gt;preferences()-&gt;setInspectorAttachedHeight(height);
</del><ins>+    inspectorPageGroup()-&gt;preferences().setInspectorAttachedHeight(height);
</ins><span class="cx">     platformSetAttachedWindowHeight(height);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebInspectorProxy::setAttachedWindowWidth(unsigned width)
</span><span class="cx"> {
</span><del>-    inspectorPageGroup()-&gt;preferences()-&gt;setInspectorAttachedWidth(width);
</del><ins>+    inspectorPageGroup()-&gt;preferences().setInspectorAttachedWidth(width);
</ins><span class="cx">     platformSetAttachedWindowWidth(width);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -429,7 +429,7 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     m_isAttached = shouldOpenAttached();
</span><del>-    m_attachmentSide = static_cast&lt;AttachmentSide&gt;(inspectorPageGroup()-&gt;preferences()-&gt;inspectorAttachmentSide());
</del><ins>+    m_attachmentSide = static_cast&lt;AttachmentSide&gt;(inspectorPageGroup()-&gt;preferences().inspectorAttachmentSide());
</ins><span class="cx"> 
</span><span class="cx">     WebPageProxy* inspectorPage = platformCreateInspectorPage();
</span><span class="cx">     ASSERT(inspectorPage);
</span><span class="lines">@@ -563,7 +563,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool WebInspectorProxy::shouldOpenAttached()
</span><span class="cx"> {
</span><del>-    return inspectorPageGroup()-&gt;preferences()-&gt;inspectorStartsAttached() &amp;&amp; canAttach();
</del><ins>+    return inspectorPageGroup()-&gt;preferences().inspectorStartsAttached() &amp;&amp; canAttach();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(INSPECTOR_SERVER)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageGroupcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageGroup.cpp (163596 => 163597)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageGroup.cpp        2014-02-07 02:04:27 UTC (rev 163596)
+++ trunk/Source/WebKit2/UIProcess/WebPageGroup.cpp        2014-02-07 02:12:18 UTC (rev 163597)
</span><span class="lines">@@ -114,7 +114,7 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-WebPreferences* WebPageGroup::preferences() const
</del><ins>+WebPreferences&amp; WebPageGroup::preferences() const
</ins><span class="cx"> {
</span><span class="cx">     if (!m_preferences) {
</span><span class="cx">         if (!m_data.identifer.isNull())
</span><span class="lines">@@ -123,7 +123,8 @@
</span><span class="cx">             m_preferences = WebPreferences::create();
</span><span class="cx">         m_preferences-&gt;addPageGroup(const_cast&lt;WebPageGroup*&gt;(this));
</span><span class="cx">     }
</span><del>-    return m_preferences.get();
</del><ins>+
+    return *m_preferences;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebPageGroup::preferencesDidChange()
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageGrouph"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageGroup.h (163596 => 163597)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageGroup.h        2014-02-07 02:04:27 UTC (rev 163596)
+++ trunk/Source/WebKit2/UIProcess/WebPageGroup.h        2014-02-07 02:12:18 UTC (rev 163597)
</span><span class="lines">@@ -56,7 +56,7 @@
</span><span class="cx">     const WebPageGroupData&amp; data() { return m_data; }
</span><span class="cx"> 
</span><span class="cx">     void setPreferences(WebPreferences*);
</span><del>-    WebPreferences* preferences() const;
</del><ins>+    WebPreferences&amp; preferences() const;
</ins><span class="cx">     void preferencesDidChange();
</span><span class="cx">     
</span><span class="cx">     void addUserStyleSheet(const String&amp; source, const String&amp; baseURL, API::Array* whitelist, API::Array* blacklist, WebCore::UserContentInjectedFrames, WebCore::UserStyleLevel);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (163596 => 163597)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2014-02-07 02:04:27 UTC (rev 163596)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2014-02-07 02:12:18 UTC (rev 163597)
</span><span class="lines">@@ -241,18 +241,19 @@
</span><span class="cx"> }
</span><span class="cx"> #endif // !LOG_DISABLED
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;WebPageProxy&gt; WebPageProxy::create(PageClient&amp; pageClient, WebProcessProxy&amp; process, WebPageGroup&amp; pageGroup, API::Session&amp; session, uint64_t pageID)
</del><ins>+PassRefPtr&lt;WebPageProxy&gt; WebPageProxy::create(PageClient&amp; pageClient, WebProcessProxy&amp; process, WebPageGroup&amp; pageGroup, WebPreferences&amp; preferences, API::Session&amp; session, uint64_t pageID)
</ins><span class="cx"> {
</span><del>-    return adoptRef(new WebPageProxy(pageClient, process, pageGroup, session, pageID));
</del><ins>+    return adoptRef(new WebPageProxy(pageClient, process, pageGroup, preferences, session, pageID));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-WebPageProxy::WebPageProxy(PageClient&amp; pageClient, WebProcessProxy&amp; process, WebPageGroup&amp; pageGroup, API::Session&amp; session, uint64_t pageID)
</del><ins>+WebPageProxy::WebPageProxy(PageClient&amp; pageClient, WebProcessProxy&amp; process, WebPageGroup&amp; pageGroup, WebPreferences&amp; preferences, API::Session&amp; session, uint64_t pageID)
</ins><span class="cx">     : m_pageClient(pageClient)
</span><span class="cx">     , m_loaderClient(std::make_unique&lt;API::LoaderClient&gt;())
</span><span class="cx">     , m_policyClient(std::make_unique&lt;API::PolicyClient&gt;())
</span><span class="cx">     , m_uiClient(std::make_unique&lt;API::UIClient&gt;())
</span><span class="cx">     , m_process(process)
</span><span class="cx">     , m_pageGroup(pageGroup)
</span><ins>+    , m_preferences(preferences)
</ins><span class="cx">     , m_mainFrame(nullptr)
</span><span class="cx">     , m_userAgent(standardUserAgent())
</span><span class="cx">     , m_geolocationPermissionRequestManager(*this)
</span><span class="lines">@@ -552,7 +553,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool WebPageProxy::isProcessSuppressible() const
</span><span class="cx"> {
</span><del>-    return (m_viewState &amp; ViewState::IsVisuallyIdle) &amp;&amp; m_pageGroup-&gt;preferences()-&gt;pageVisibilityBasedProcessSuppressionEnabled();
</del><ins>+    return (m_viewState &amp; ViewState::IsVisuallyIdle) &amp;&amp; m_preferences-&gt;pageVisibilityBasedProcessSuppressionEnabled();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebPageProxy::close()
</span><span class="lines">@@ -855,7 +856,7 @@
</span><span class="cx"> #if ENABLE(NETSCAPE_PLUGIN_API)
</span><span class="cx">     String newMimeType = mimeType;
</span><span class="cx">     PluginModuleInfo plugin = m_process-&gt;context().pluginInfoStore().findPlugin(newMimeType, URL());
</span><del>-    if (!plugin.path.isNull() &amp;&amp; m_pageGroup-&gt;preferences()-&gt;pluginsEnabled())
</del><ins>+    if (!plugin.path.isNull() &amp;&amp; m_preferences-&gt;pluginsEnabled())
</ins><span class="cx">         return true;
</span><span class="cx"> #endif // ENABLE(NETSCAPE_PLUGIN_API)
</span><span class="cx"> 
</span><span class="lines">@@ -2064,7 +2065,7 @@
</span><span class="cx">     // even if nothing changed in UI process, so that overrides get removed.
</span><span class="cx"> 
</span><span class="cx">     // Preferences need to be updated during synchronous printing to make &quot;print backgrounds&quot; preference work when toggled from a print dialog checkbox.
</span><del>-    m_process-&gt;send(Messages::WebPage::PreferencesDidChange(pageGroup().preferences()-&gt;store()), m_pageID, m_isPerformingDOMPrintOperation ? IPC::DispatchMessageEvenWhenWaitingForSyncReply : 0);
</del><ins>+    m_process-&gt;send(Messages::WebPage::PreferencesDidChange(m_preferences-&gt;store()), m_pageID, m_isPerformingDOMPrintOperation ? IPC::DispatchMessageEvenWhenWaitingForSyncReply : 0);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebPageProxy::didCreateMainFrame(uint64_t frameID)
</span><span class="lines">@@ -3908,7 +3909,7 @@
</span><span class="cx">     parameters.viewSize = m_pageClient.viewSize();
</span><span class="cx">     parameters.viewState = m_viewState;
</span><span class="cx">     parameters.drawingAreaType = m_drawingArea-&gt;type();
</span><del>-    parameters.store = m_pageGroup-&gt;preferences()-&gt;store();
</del><ins>+    parameters.store = m_preferences-&gt;store();
</ins><span class="cx">     parameters.pageGroupData = m_pageGroup-&gt;data();
</span><span class="cx">     parameters.drawsBackground = m_drawsBackground;
</span><span class="cx">     parameters.drawsTransparentBackground = m_drawsTransparentBackground;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (163596 => 163597)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2014-02-07 02:04:27 UTC (rev 163596)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2014-02-07 02:12:18 UTC (rev 163597)
</span><span class="lines">@@ -54,6 +54,7 @@
</span><span class="cx"> #include &quot;WebHitTestResult.h&quot;
</span><span class="cx"> #include &quot;WebPageContextMenuClient.h&quot;
</span><span class="cx"> #include &quot;WebPageCreationParameters.h&quot;
</span><ins>+#include &quot;WebPreferences.h&quot;
</ins><span class="cx"> #include &lt;WebCore/AlternativeTextClient.h&gt; // FIXME: Needed by WebPageProxyMessages.h for DICTATION_ALTERNATIVES.
</span><span class="cx"> #include &quot;WebPageProxyMessages.h&quot;
</span><span class="cx"> #include &quot;WebPopupMenuProxy.h&quot;
</span><span class="lines">@@ -330,7 +331,7 @@
</span><span class="cx">     , public IPC::MessageSender {
</span><span class="cx"> public:
</span><span class="cx"> 
</span><del>-    static PassRefPtr&lt;WebPageProxy&gt; create(PageClient&amp;, WebProcessProxy&amp;, WebPageGroup&amp;, API::Session&amp;, uint64_t pageID);
</del><ins>+    static PassRefPtr&lt;WebPageProxy&gt; create(PageClient&amp;, WebProcessProxy&amp;, WebPageGroup&amp;, WebPreferences&amp;, API::Session&amp;, uint64_t pageID);
</ins><span class="cx">     virtual ~WebPageProxy();
</span><span class="cx"> 
</span><span class="cx">     void setSession(API::Session&amp;);
</span><span class="lines">@@ -723,6 +724,9 @@
</span><span class="cx">     WebProcessProxy&amp; process() { return m_process.get(); }
</span><span class="cx">     PlatformProcessIdentifier processIdentifier() const;
</span><span class="cx"> 
</span><ins>+    WebPreferences&amp; preferences() { return m_preferences.get(); }
+    void setPreferences(WebPreferences&amp; preferences) { m_preferences = preferences; }
+
</ins><span class="cx">     WebPageGroup&amp; pageGroup() { return m_pageGroup.get(); }
</span><span class="cx"> 
</span><span class="cx">     bool isValid() const;
</span><span class="lines">@@ -872,7 +876,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    WebPageProxy(PageClient&amp;, WebProcessProxy&amp;, WebPageGroup&amp;, API::Session&amp;, uint64_t pageID);
</del><ins>+    WebPageProxy(PageClient&amp;, WebProcessProxy&amp;, WebPageGroup&amp;, WebPreferences&amp;, API::Session&amp;, uint64_t pageID);
</ins><span class="cx">     void platformInitialize();
</span><span class="cx"> 
</span><span class="cx">     void updateViewState(WebCore::ViewState::Flags flagsToUpdate = WebCore::ViewState::AllFlags);
</span><span class="lines">@@ -1193,6 +1197,8 @@
</span><span class="cx"> 
</span><span class="cx">     Ref&lt;WebProcessProxy&gt; m_process;
</span><span class="cx">     Ref&lt;WebPageGroup&gt; m_pageGroup;
</span><ins>+    Ref&lt;WebPreferences&gt; m_preferences;
+
</ins><span class="cx">     RefPtr&lt;WebFrameProxy&gt; m_mainFrame;
</span><span class="cx">     RefPtr&lt;WebFrameProxy&gt; m_focusedFrame;
</span><span class="cx">     RefPtr&lt;WebFrameProxy&gt; m_frameSetLargestFrame;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebProcessProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp (163596 => 163597)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp        2014-02-07 02:04:27 UTC (rev 163596)
+++ trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp        2014-02-07 02:12:18 UTC (rev 163597)
</span><span class="lines">@@ -39,6 +39,7 @@
</span><span class="cx"> #include &quot;WebContext.h&quot;
</span><span class="cx"> #include &quot;WebNavigationDataStore.h&quot;
</span><span class="cx"> #include &quot;WebNotificationManagerProxy.h&quot;
</span><ins>+#include &quot;WebPageGroup.h&quot;
</ins><span class="cx"> #include &quot;WebPageProxy.h&quot;
</span><span class="cx"> #include &quot;WebPluginSiteDataManager.h&quot;
</span><span class="cx"> #include &quot;WebProcessMessages.h&quot;
</span><span class="lines">@@ -170,7 +171,7 @@
</span><span class="cx"> PassRefPtr&lt;WebPageProxy&gt; WebProcessProxy::createWebPage(PageClient&amp; pageClient, WebPageGroup&amp; pageGroup, API::Session&amp; session)
</span><span class="cx"> {
</span><span class="cx">     uint64_t pageID = generatePageID();
</span><del>-    RefPtr&lt;WebPageProxy&gt; webPage = WebPageProxy::create(pageClient, *this, pageGroup, session, pageID);
</del><ins>+    RefPtr&lt;WebPageProxy&gt; webPage = WebPageProxy::create(pageClient, *this, pageGroup, pageGroup.preferences(), session, pageID);
</ins><span class="cx">     m_pageMap.set(pageID, webPage.get());
</span><span class="cx">     globalPageMap().set(pageID, webPage.get());
</span><span class="cx"> #if PLATFORM(MAC)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacViewGestureControllermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/ViewGestureController.mm (163596 => 163597)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/ViewGestureController.mm        2014-02-07 02:04:27 UTC (rev 163596)
+++ trunk/Source/WebKit2/UIProcess/mac/ViewGestureController.mm        2014-02-07 02:12:18 UTC (rev 163597)
</span><span class="lines">@@ -402,7 +402,7 @@
</span><span class="cx">     [m_swipeSnapshotLayer setName:@&quot;Gesture Swipe Snapshot Layer&quot;];
</span><span class="cx">     [m_swipeSnapshotLayer web_disableAllActions];
</span><span class="cx"> 
</span><del>-    if (m_webPageProxy.pageGroup().preferences()-&gt;viewGestureDebuggingEnabled()) {
</del><ins>+    if (m_webPageProxy.preferences().viewGestureDebuggingEnabled()) {
</ins><span class="cx">         CAFilter* filter = [CAFilter filterWithType:kCAFilterGaussianBlur];
</span><span class="cx">         [filter setValue:[NSNumber numberWithFloat:3] forKey:@&quot;inputRadius&quot;];
</span><span class="cx">         [m_swipeSnapshotLayer setFilters:@[filter]];
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacWebInspectorProxyMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm (163596 => 163597)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm        2014-02-07 02:04:27 UTC (rev 163596)
+++ trunk/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm        2014-02-07 02:12:18 UTC (rev 163597)
</span><span class="lines">@@ -285,7 +285,7 @@
</span><span class="cx">     NSRect windowFrame = NSMakeRect(0, 0, initialWindowWidth, initialWindowHeight);
</span><span class="cx"> 
</span><span class="cx">     // Restore the saved window frame, if there was one.
</span><del>-    NSString *savedWindowFrameString = page()-&gt;pageGroup().preferences()-&gt;inspectorWindowFrame();
</del><ins>+    NSString *savedWindowFrameString = page()-&gt;pageGroup().preferences().inspectorWindowFrame();
</ins><span class="cx">     NSRect savedWindowFrame = NSRectFromString(savedWindowFrameString);
</span><span class="cx">     if (!NSIsEmptyRect(savedWindowFrame))
</span><span class="cx">         windowFrame = savedWindowFrame;
</span><span class="lines">@@ -375,16 +375,16 @@
</span><span class="cx"> 
</span><span class="cx">         switch (m_attachmentSide) {
</span><span class="cx">         case AttachmentSideBottom:
</span><del>-            initialRect = NSMakeRect(0, 0, NSWidth(inspectedViewFrame), inspectorPageGroup()-&gt;preferences()-&gt;inspectorAttachedHeight());
</del><ins>+            initialRect = NSMakeRect(0, 0, NSWidth(inspectedViewFrame), inspectorPageGroup()-&gt;preferences().inspectorAttachedHeight());
</ins><span class="cx">             break;
</span><span class="cx">         case AttachmentSideRight:
</span><del>-            initialRect = NSMakeRect(0, 0, inspectorPageGroup()-&gt;preferences()-&gt;inspectorAttachedWidth(), NSHeight(inspectedViewFrame));
</del><ins>+            initialRect = NSMakeRect(0, 0, inspectorPageGroup()-&gt;preferences().inspectorAttachedWidth(), NSHeight(inspectedViewFrame));
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">     } else {
</span><span class="cx">         initialRect = NSMakeRect(0, 0, initialWindowWidth, initialWindowHeight);
</span><span class="cx"> 
</span><del>-        NSString *windowFrameString = page()-&gt;pageGroup().preferences()-&gt;inspectorWindowFrame();
</del><ins>+        NSString *windowFrameString = page()-&gt;pageGroup().preferences().inspectorWindowFrame();
</ins><span class="cx">         NSRect windowFrame = NSRectFromString(windowFrameString);
</span><span class="cx">         if (!NSIsEmptyRect(windowFrame))
</span><span class="cx">             initialRect = [NSWindow contentRectForFrameRect:windowFrame styleMask:windowStyleMask];
</span><span class="lines">@@ -606,7 +606,7 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     NSString *frameString = NSStringFromRect([m_inspectorWindow frame]);
</span><del>-    page()-&gt;pageGroup().preferences()-&gt;setInspectorWindowFrame(frameString);
</del><ins>+    page()-&gt;pageGroup().preferences().setInspectorWindowFrame(frameString);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebInspectorProxy::inspectedViewFrameDidChange(CGFloat currentDimension)
</span><span class="lines">@@ -689,10 +689,10 @@
</span><span class="cx"> 
</span><span class="cx">     switch (m_attachmentSide) {
</span><span class="cx">     case AttachmentSideBottom:
</span><del>-        currentDimension = inspectorPageGroup()-&gt;preferences()-&gt;inspectorAttachedHeight();
</del><ins>+        currentDimension = inspectorPageGroup()-&gt;preferences().inspectorAttachedHeight();
</ins><span class="cx">         break;
</span><span class="cx">     case AttachmentSideRight:
</span><del>-        currentDimension = inspectorPageGroup()-&gt;preferences()-&gt;inspectorAttachedWidth();
</del><ins>+        currentDimension = inspectorPageGroup()-&gt;preferences().inspectorAttachedWidth();
</ins><span class="cx">         break;
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>