<!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 <andersca@apple.com>
+
+ 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 <barraclough@apple.com>
</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)->preferences());
</del><ins>+ return toAPI(&toImpl(pageGroupRef)->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->pageGroup().preferences()->privateBrowsingEnabled();
</del><ins>+ bool privateBrowsingEnabled = webPageProxy->pageGroup().preferences().privateBrowsingEnabled();
</ins><span class="cx">
</span><span class="cx"> return webPageProxy->process().context().isURLKnownHSTSHost(toImpl(url)->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->_page->pageGroup().preferences()->pluginsEnabled();
</del><ins>+ BOOL needsViewFrameInWindowCoordinates = _data->_page->preferences().pluginsEnabled();
</ins><span class="cx">
</span><span class="cx"> if (!!needsViewFrameInWindowCoordinates == !!_data->_needsViewFrameInWindowCoordinates)
</span><span class="cx"> return;
</span><span class="lines">@@ -2947,7 +2947,7 @@
</span><span class="cx">
</span><span class="cx"> _data->_intrinsicContentSize = NSMakeSize(NSViewNoInstrinsicMetric, NSViewNoInstrinsicMetric);
</span><span class="cx">
</span><del>- _data->_needsViewFrameInWindowCoordinates = _data->_page->pageGroup().preferences()->pluginsEnabled();
</del><ins>+ _data->_needsViewFrameInWindowCoordinates = _data->_page->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<WebPageProxy> WebContext::createWebPage(PageClient& pageClient, WebPageGroup* pageGroup, WebPageProxy* relatedPage)
</span><span class="cx"> {
</span><span class="cx"> WebPageGroup* group = pageGroup ? pageGroup : &m_defaultPageGroup.get();
</span><del>- return createWebPage(pageClient, group, group->preferences()->privateBrowsingEnabled() ? API::Session::legacyPrivateSession() : API::Session::defaultSession(), relatedPage);
</del><ins>+ return createWebPage(pageClient, group, group->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& 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->preferences()->setDeveloperExtrasEnabled(true);
- pageGroup->preferences()->setLogsPageMessagesToSystemConsoleEnabled(true);
</del><ins>+ pageGroup->preferences().setDeveloperExtrasEnabled(true);
+ pageGroup->preferences().setLogsPageMessagesToSystemConsoleEnabled(true);
</ins><span class="cx"> #endif
</span><span class="cx">
</span><del>- pageGroup->preferences()->setApplicationChromeModeEnabled(true);
</del><ins>+ pageGroup->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()->preferences()->setInspectorAttachmentSide(side);
</del><ins>+ inspectorPageGroup()->preferences().setInspectorAttachmentSide(side);
</ins><span class="cx">
</span><span class="cx"> if (m_isVisible)
</span><del>- inspectorPageGroup()->preferences()->setInspectorStartsAttached(true);
</del><ins>+ inspectorPageGroup()->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()->preferences()->setInspectorStartsAttached(false);
</del><ins>+ inspectorPageGroup()->preferences().setInspectorStartsAttached(false);
</ins><span class="cx">
</span><span class="cx"> m_page->process().send(Messages::WebInspector::Detached(), m_page->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()->preferences()->setInspectorAttachedHeight(height);
</del><ins>+ inspectorPageGroup()->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()->preferences()->setInspectorAttachedWidth(width);
</del><ins>+ inspectorPageGroup()->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<AttachmentSide>(inspectorPageGroup()->preferences()->inspectorAttachmentSide());
</del><ins>+ m_attachmentSide = static_cast<AttachmentSide>(inspectorPageGroup()->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()->preferences()->inspectorStartsAttached() && canAttach();
</del><ins>+ return inspectorPageGroup()->preferences().inspectorStartsAttached() && 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& 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->addPageGroup(const_cast<WebPageGroup*>(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& data() { return m_data; }
</span><span class="cx">
</span><span class="cx"> void setPreferences(WebPreferences*);
</span><del>- WebPreferences* preferences() const;
</del><ins>+ WebPreferences& preferences() const;
</ins><span class="cx"> void preferencesDidChange();
</span><span class="cx">
</span><span class="cx"> void addUserStyleSheet(const String& source, const String& 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<WebPageProxy> WebPageProxy::create(PageClient& pageClient, WebProcessProxy& process, WebPageGroup& pageGroup, API::Session& session, uint64_t pageID)
</del><ins>+PassRefPtr<WebPageProxy> WebPageProxy::create(PageClient& pageClient, WebProcessProxy& process, WebPageGroup& pageGroup, WebPreferences& preferences, API::Session& 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& pageClient, WebProcessProxy& process, WebPageGroup& pageGroup, API::Session& session, uint64_t pageID)
</del><ins>+WebPageProxy::WebPageProxy(PageClient& pageClient, WebProcessProxy& process, WebPageGroup& pageGroup, WebPreferences& preferences, API::Session& session, uint64_t pageID)
</ins><span class="cx"> : m_pageClient(pageClient)
</span><span class="cx"> , m_loaderClient(std::make_unique<API::LoaderClient>())
</span><span class="cx"> , m_policyClient(std::make_unique<API::PolicyClient>())
</span><span class="cx"> , m_uiClient(std::make_unique<API::UIClient>())
</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 & ViewState::IsVisuallyIdle) && m_pageGroup->preferences()->pageVisibilityBasedProcessSuppressionEnabled();
</del><ins>+ return (m_viewState & ViewState::IsVisuallyIdle) && m_preferences->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->context().pluginInfoStore().findPlugin(newMimeType, URL());
</span><del>- if (!plugin.path.isNull() && m_pageGroup->preferences()->pluginsEnabled())
</del><ins>+ if (!plugin.path.isNull() && m_preferences->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 "print backgrounds" preference work when toggled from a print dialog checkbox.
</span><del>- m_process->send(Messages::WebPage::PreferencesDidChange(pageGroup().preferences()->store()), m_pageID, m_isPerformingDOMPrintOperation ? IPC::DispatchMessageEvenWhenWaitingForSyncReply : 0);
</del><ins>+ m_process->send(Messages::WebPage::PreferencesDidChange(m_preferences->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->type();
</span><del>- parameters.store = m_pageGroup->preferences()->store();
</del><ins>+ parameters.store = m_preferences->store();
</ins><span class="cx"> parameters.pageGroupData = m_pageGroup->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 "WebHitTestResult.h"
</span><span class="cx"> #include "WebPageContextMenuClient.h"
</span><span class="cx"> #include "WebPageCreationParameters.h"
</span><ins>+#include "WebPreferences.h"
</ins><span class="cx"> #include <WebCore/AlternativeTextClient.h> // FIXME: Needed by WebPageProxyMessages.h for DICTATION_ALTERNATIVES.
</span><span class="cx"> #include "WebPageProxyMessages.h"
</span><span class="cx"> #include "WebPopupMenuProxy.h"
</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<WebPageProxy> create(PageClient&, WebProcessProxy&, WebPageGroup&, API::Session&, uint64_t pageID);
</del><ins>+ static PassRefPtr<WebPageProxy> create(PageClient&, WebProcessProxy&, WebPageGroup&, WebPreferences&, API::Session&, uint64_t pageID);
</ins><span class="cx"> virtual ~WebPageProxy();
</span><span class="cx">
</span><span class="cx"> void setSession(API::Session&);
</span><span class="lines">@@ -723,6 +724,9 @@
</span><span class="cx"> WebProcessProxy& process() { return m_process.get(); }
</span><span class="cx"> PlatformProcessIdentifier processIdentifier() const;
</span><span class="cx">
</span><ins>+ WebPreferences& preferences() { return m_preferences.get(); }
+ void setPreferences(WebPreferences& preferences) { m_preferences = preferences; }
+
</ins><span class="cx"> WebPageGroup& 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&, WebProcessProxy&, WebPageGroup&, API::Session&, uint64_t pageID);
</del><ins>+ WebPageProxy(PageClient&, WebProcessProxy&, WebPageGroup&, WebPreferences&, API::Session&, 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<WebProcessProxy> m_process;
</span><span class="cx"> Ref<WebPageGroup> m_pageGroup;
</span><ins>+ Ref<WebPreferences> m_preferences;
+
</ins><span class="cx"> RefPtr<WebFrameProxy> m_mainFrame;
</span><span class="cx"> RefPtr<WebFrameProxy> m_focusedFrame;
</span><span class="cx"> RefPtr<WebFrameProxy> 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 "WebContext.h"
</span><span class="cx"> #include "WebNavigationDataStore.h"
</span><span class="cx"> #include "WebNotificationManagerProxy.h"
</span><ins>+#include "WebPageGroup.h"
</ins><span class="cx"> #include "WebPageProxy.h"
</span><span class="cx"> #include "WebPluginSiteDataManager.h"
</span><span class="cx"> #include "WebProcessMessages.h"
</span><span class="lines">@@ -170,7 +171,7 @@
</span><span class="cx"> PassRefPtr<WebPageProxy> WebProcessProxy::createWebPage(PageClient& pageClient, WebPageGroup& pageGroup, API::Session& session)
</span><span class="cx"> {
</span><span class="cx"> uint64_t pageID = generatePageID();
</span><del>- RefPtr<WebPageProxy> webPage = WebPageProxy::create(pageClient, *this, pageGroup, session, pageID);
</del><ins>+ RefPtr<WebPageProxy> 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:@"Gesture Swipe Snapshot Layer"];
</span><span class="cx"> [m_swipeSnapshotLayer web_disableAllActions];
</span><span class="cx">
</span><del>- if (m_webPageProxy.pageGroup().preferences()->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:@"inputRadius"];
</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()->pageGroup().preferences()->inspectorWindowFrame();
</del><ins>+ NSString *savedWindowFrameString = page()->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()->preferences()->inspectorAttachedHeight());
</del><ins>+ initialRect = NSMakeRect(0, 0, NSWidth(inspectedViewFrame), inspectorPageGroup()->preferences().inspectorAttachedHeight());
</ins><span class="cx"> break;
</span><span class="cx"> case AttachmentSideRight:
</span><del>- initialRect = NSMakeRect(0, 0, inspectorPageGroup()->preferences()->inspectorAttachedWidth(), NSHeight(inspectedViewFrame));
</del><ins>+ initialRect = NSMakeRect(0, 0, inspectorPageGroup()->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()->pageGroup().preferences()->inspectorWindowFrame();
</del><ins>+ NSString *windowFrameString = page()->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()->pageGroup().preferences()->setInspectorWindowFrame(frameString);
</del><ins>+ page()->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()->preferences()->inspectorAttachedHeight();
</del><ins>+ currentDimension = inspectorPageGroup()->preferences().inspectorAttachedHeight();
</ins><span class="cx"> break;
</span><span class="cx"> case AttachmentSideRight:
</span><del>- currentDimension = inspectorPageGroup()->preferences()->inspectorAttachedWidth();
</del><ins>+ currentDimension = inspectorPageGroup()->preferences().inspectorAttachedWidth();
</ins><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>