<!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>[166661] 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/166661">166661</a></dd>
<dt>Author</dt> <dd>mhock@apple.com</dd>
<dt>Date</dt> <dd>2014-04-02 13:07:33 -0700 (Wed, 02 Apr 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Unify private browsing with sessions.
https://bugs.webkit.org/show_bug.cgi?id=130099
Reviewed by Alexey Proskuryakov.
Source/WebCore:
Unless otherwise noted, the following consists solely of mechanical changes to replace querying WebCore::Settings::privateBrowsingEnabled() with Page::usesEphemeralSession().
* Modules/webdatabase/DatabaseContext.cpp:
(WebCore::DatabaseContext::allowDatabaseAccess):
* WebCore.exp.in: Remove Settings::setPrivateBrowsingEnabled, add Page::legacyPrivateBrowsingEnabled.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::parseAttribute):
* loader/HistoryController.cpp:
(WebCore::HistoryController::updateForStandardLoad):
(WebCore::HistoryController::updateForRedirectWithLockedBackForwardList):
(WebCore::HistoryController::updateForClientRedirect):
(WebCore::HistoryController::updateForSameDocumentNavigation):
(WebCore::HistoryController::pushState):
(WebCore::HistoryController::replaceState):
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::cacheForMainRequest):
(WebCore::ApplicationCacheGroup::selectCache):
(WebCore::ApplicationCacheGroup::selectCacheWithoutManifestURL):
(WebCore::ApplicationCacheGroup::update):
* loader/appcache/ApplicationCacheHost.cpp:
(WebCore::ApplicationCacheHost::isApplicationCacheEnabled):
* loader/icon/IconController.cpp:
(WebCore::IconController::continueLoadWithDecision):
* page/Page.cpp:
(WebCore::Page::Page): Initialize with defaultSessionID.
(WebCore::Page::legacyPrivateBrowsingEnabled): Legacy setting for private browsing.
(WebCore::Page::privateBrowsingStateChanged): Move implementation to setSessionID.
(WebCore::Page::sessionID): Simplify to just return m_sessionID.
(WebCore::Page::setSessionID): Also perform privateBrowsingStateChanged action.a
(WebCore::Page::privateBrowsingStateChanged): Deleted.
(WebCore::Page::checkSubframeCountConsistency): Deleted.
* page/Page.h:
* page/PageConsole.cpp:
(WebCore::PageConsole::addMessage):
(WebCore::PageConsole::messageWithTypeAndLevel):
* page/Settings.cpp: Remove privateBrowsingEnabled setting.
(WebCore::Settings::Settings):
(WebCore::Settings::setPrivateBrowsingEnabled): Page reflects setting using session.
* page/Settings.h:
* plugins/PluginView.cpp:
(WebCore::PluginView::getValue):
* rendering/RenderSearchField.cpp:
(WebCore::RenderSearchField::addSearchResult):
* storage/Storage.cpp:
(WebCore::Storage::isDisabledByPrivateBrowsing):
Source/WebKit/efl:
* ewk/ewk_view.cpp:
(_ewk_view_priv_new): Change WebCore::Settings::privateBrowsingEnabled() to Page::sessionID().isEphemeral().
(ewk_view_setting_private_browsing_set): Change WebCore::Settings::setPrivateBrowsingEnabled() to Page::enableLegacyPrivateBrowsing().
Source/WebKit/gtk:
* WebCoreSupport/FrameLoaderClientGtk.cpp: Change WebCore::Settings::privateBrowsingEnabled() to Page:usesEphemeralSession().
(WebKit::FrameLoaderClient::dispatchDidReceiveAuthenticationChallenge):
* webkit/webkitwebview.cpp: Change Settings::setPrivateBrowsingEnabled() to Page::enablePrivateBrowsing().
(webkit_web_view_update_settings):
(webkit_web_view_settings_notify):
Source/WebKit/mac:
* WebCoreSupport/WebFrameLoaderClient.mm: Change WebCore::Settings::privateBrowsingEnabled() to Page::sessionID().isEphemeral().
(WebFrameLoaderClient::updateGlobalHistoryItemForPage):
* WebCoreSupport/WebFrameNetworkingContext.mm: Ditto.
(WebFrameNetworkingContext::storageSession):
* WebView/WebView.mm: Change WebCore::Settings::setPrivateBrowsingEnabled() to Page::enableLegacyPrivateBrowsing().
(-[WebView _preferencesChanged:]):
Source/WebKit/win:
* WebCoreSupport/WebFrameLoaderClient.cpp: Change WebCore::Settings::privateBrowsingEnabled() to Page::sessionID().isEphemeral().
(WebFrameLoaderClient::updateGlobalHistoryItemForPage):
* WebCoreSupport/WebFrameNetworkingContext.cpp: Ditto.
(WebFrameNetworkingContext::storageSession):
* WebView.cpp: Change WebCore::Settings::setPrivateBrowsingEnabled() to Page::enableLegacyPrivateBrowsing().
(WebView::notifyPreferencesChanged):
Source/WebKit2:
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: Change WebPage::isUsingEphemeralSession() to WebPage::usesEphemeralSession().
(WKBundlePageIsUsingEphemeralSession):
* WebProcess/InjectedBundle/InjectedBundle.cpp: Change Settings::setPrivateBrowsingEnabled() to Page::enableLegacyPrivateBrowsing().
(WebKit::InjectedBundle::setPrivateBrowsingEnabled):
* WebProcess/Plugins/PluginView.cpp: Change Settings::privateBrowsingEnabled() to Page::usesEphemeralSession().
(WebKit::PluginView::isPrivateBrowsingEnabled):
* WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp: Ditto.
(WebKit::WebFrameNetworkingContext::storageSession):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::usesEphemeralSession): Renamed from isUsingEphemeralSession.
(WebKit::WebPage::setSessionID): Ensure session before setting.
(WebKit::WebPage::updatePreferences): Set session to legacy private session if needed.
(WebKit::WebPage::sessionID): Moved to header.
(WebKit::WebPage::isUsingEphemeralSession): Renamed to usesEphemeralSession.
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::sessionID): Just call down to m_page.
Tools:
Add an API test for ephemeral sessions similar to PrivateBrowsingPushStateNoHistoryCallback.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2/EphemeralSessionPushStateNoHistoryCallback.cpp:
(TestWebKitAPI::didNavigateWithNavigationData):
(TestWebKitAPI::didSameDocumentNavigationForFrame):
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKit2/PrivateBrowsingPushStateNoHistoryCallback.cpp: Also test to make sure private browsing can be disabled.
(TestWebKitAPI::didNavigateWithoutNavigationData):
(TestWebKitAPI::didNavigateWithNavigationData):
(TestWebKitAPI::didSameDocumentNavigationForFrame):
(TestWebKitAPI::TEST):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModuleswebdatabaseDatabaseContextcpp">trunk/Source/WebCore/Modules/webdatabase/DatabaseContext.cpp</a></li>
<li><a href="#trunkSourceWebCoreWebCoreexpin">trunk/Source/WebCore/WebCore.exp.in</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLMediaElementcpp">trunk/Source/WebCore/html/HTMLMediaElement.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderHistoryControllercpp">trunk/Source/WebCore/loader/HistoryController.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderappcacheApplicationCacheGroupcpp">trunk/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderappcacheApplicationCacheHostcpp">trunk/Source/WebCore/loader/appcache/ApplicationCacheHost.cpp</a></li>
<li><a href="#trunkSourceWebCoreloadericonIconControllercpp">trunk/Source/WebCore/loader/icon/IconController.cpp</a></li>
<li><a href="#trunkSourceWebCorepagePagecpp">trunk/Source/WebCore/page/Page.cpp</a></li>
<li><a href="#trunkSourceWebCorepagePageh">trunk/Source/WebCore/page/Page.h</a></li>
<li><a href="#trunkSourceWebCorepagePageConsolecpp">trunk/Source/WebCore/page/PageConsole.cpp</a></li>
<li><a href="#trunkSourceWebCorepageSettingscpp">trunk/Source/WebCore/page/Settings.cpp</a></li>
<li><a href="#trunkSourceWebCorepageSettingsh">trunk/Source/WebCore/page/Settings.h</a></li>
<li><a href="#trunkSourceWebCorepluginsPluginViewcpp">trunk/Source/WebCore/plugins/PluginView.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderSearchFieldcpp">trunk/Source/WebCore/rendering/RenderSearchField.cpp</a></li>
<li><a href="#trunkSourceWebCorestorageStoragecpp">trunk/Source/WebCore/storage/Storage.cpp</a></li>
<li><a href="#trunkSourceWebKiteflChangeLog">trunk/Source/WebKit/efl/ChangeLog</a></li>
<li><a href="#trunkSourceWebKiteflewkewk_viewcpp">trunk/Source/WebKit/efl/ewk/ewk_view.cpp</a></li>
<li><a href="#trunkSourceWebKitgtkChangeLog">trunk/Source/WebKit/gtk/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitgtkWebCoreSupportFrameLoaderClientGtkcpp">trunk/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp</a></li>
<li><a href="#trunkSourceWebKitgtkwebkitwebkitwebviewcpp">trunk/Source/WebKit/gtk/webkit/webkitwebview.cpp</a></li>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacWebCoreSupportWebFrameLoaderClientmm">trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm</a></li>
<li><a href="#trunkSourceWebKitmacWebCoreSupportWebFrameNetworkingContextmm">trunk/Source/WebKit/mac/WebCoreSupport/WebFrameNetworkingContext.mm</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebViewmm">trunk/Source/WebKit/mac/WebView/WebView.mm</a></li>
<li><a href="#trunkSourceWebKitwinChangeLog">trunk/Source/WebKit/win/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitwinWebCoreSupportWebFrameLoaderClientcpp">trunk/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp</a></li>
<li><a href="#trunkSourceWebKitwinWebCoreSupportWebFrameNetworkingContextcpp">trunk/Source/WebKit/win/WebCoreSupport/WebFrameNetworkingContext.cpp</a></li>
<li><a href="#trunkSourceWebKitwinWebViewcpp">trunk/Source/WebKit/win/WebView.cpp</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2WebProcessInjectedBundleAPIcWKBundlePagecpp">trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessInjectedBundleInjectedBundlecpp">trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessPluginsPluginViewcpp">trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportsoupWebFrameNetworkingContextcpp">trunk/Source/WebKit2/WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagecpp">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPageh">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsTestWebKitAPITestWebKitAPIxcodeprojprojectpbxproj">trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkToolsTestWebKitAPITestsWebKit2PrivateBrowsingPushStateNoHistoryCallbackcpp">trunk/Tools/TestWebKitAPI/Tests/WebKit2/PrivateBrowsingPushStateNoHistoryCallback.cpp</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkToolsTestWebKitAPITestsWebKit2EphemeralSessionPushStateNoHistoryCallbackcpp">trunk/Tools/TestWebKitAPI/Tests/WebKit2/EphemeralSessionPushStateNoHistoryCallback.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (166660 => 166661)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-04-02 19:58:44 UTC (rev 166660)
+++ trunk/Source/WebCore/ChangeLog        2014-04-02 20:07:33 UTC (rev 166661)
</span><span class="lines">@@ -1,3 +1,56 @@
</span><ins>+2014-04-02 Martin Hock <mhock@apple.com>
+
+ Unify private browsing with sessions.
+ https://bugs.webkit.org/show_bug.cgi?id=130099
+
+ Reviewed by Alexey Proskuryakov.
+
+ Unless otherwise noted, the following consists solely of mechanical changes to replace querying WebCore::Settings::privateBrowsingEnabled() with Page::usesEphemeralSession().
+
+ * Modules/webdatabase/DatabaseContext.cpp:
+ (WebCore::DatabaseContext::allowDatabaseAccess):
+ * WebCore.exp.in: Remove Settings::setPrivateBrowsingEnabled, add Page::legacyPrivateBrowsingEnabled.
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::parseAttribute):
+ * loader/HistoryController.cpp:
+ (WebCore::HistoryController::updateForStandardLoad):
+ (WebCore::HistoryController::updateForRedirectWithLockedBackForwardList):
+ (WebCore::HistoryController::updateForClientRedirect):
+ (WebCore::HistoryController::updateForSameDocumentNavigation):
+ (WebCore::HistoryController::pushState):
+ (WebCore::HistoryController::replaceState):
+ * loader/appcache/ApplicationCacheGroup.cpp:
+ (WebCore::ApplicationCacheGroup::cacheForMainRequest):
+ (WebCore::ApplicationCacheGroup::selectCache):
+ (WebCore::ApplicationCacheGroup::selectCacheWithoutManifestURL):
+ (WebCore::ApplicationCacheGroup::update):
+ * loader/appcache/ApplicationCacheHost.cpp:
+ (WebCore::ApplicationCacheHost::isApplicationCacheEnabled):
+ * loader/icon/IconController.cpp:
+ (WebCore::IconController::continueLoadWithDecision):
+ * page/Page.cpp:
+ (WebCore::Page::Page): Initialize with defaultSessionID.
+ (WebCore::Page::legacyPrivateBrowsingEnabled): Legacy setting for private browsing.
+ (WebCore::Page::privateBrowsingStateChanged): Move implementation to setSessionID.
+ (WebCore::Page::sessionID): Simplify to just return m_sessionID.
+ (WebCore::Page::setSessionID): Also perform privateBrowsingStateChanged action.a
+ (WebCore::Page::privateBrowsingStateChanged): Deleted.
+ (WebCore::Page::checkSubframeCountConsistency): Deleted.
+ * page/Page.h:
+ * page/PageConsole.cpp:
+ (WebCore::PageConsole::addMessage):
+ (WebCore::PageConsole::messageWithTypeAndLevel):
+ * page/Settings.cpp: Remove privateBrowsingEnabled setting.
+ (WebCore::Settings::Settings):
+ (WebCore::Settings::setPrivateBrowsingEnabled): Page reflects setting using session.
+ * page/Settings.h:
+ * plugins/PluginView.cpp:
+ (WebCore::PluginView::getValue):
+ * rendering/RenderSearchField.cpp:
+ (WebCore::RenderSearchField::addSearchResult):
+ * storage/Storage.cpp:
+ (WebCore::Storage::isDisabledByPrivateBrowsing):
+
</ins><span class="cx"> 2014-04-02 Antti Koivisto <antti@apple.com>
</span><span class="cx">
</span><span class="cx"> Try to fix test failures.
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleswebdatabaseDatabaseContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/webdatabase/DatabaseContext.cpp (166660 => 166661)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/webdatabase/DatabaseContext.cpp        2014-04-02 19:58:44 UTC (rev 166660)
+++ trunk/Source/WebCore/Modules/webdatabase/DatabaseContext.cpp        2014-04-02 20:07:33 UTC (rev 166661)
</span><span class="lines">@@ -227,7 +227,7 @@
</span><span class="cx"> {
</span><span class="cx"> if (m_scriptExecutionContext->isDocument()) {
</span><span class="cx"> Document* document = toDocument(m_scriptExecutionContext);
</span><del>- if (!document->page() || (document->page()->settings().privateBrowsingEnabled() && !SchemeRegistry::allowsDatabaseAccessInPrivateBrowsing(document->securityOrigin()->protocol())))
</del><ins>+ if (!document->page() || (document->page()->usesEphemeralSession() && !SchemeRegistry::allowsDatabaseAccessInPrivateBrowsing(document->securityOrigin()->protocol())))
</ins><span class="cx"> return false;
</span><span class="cx"> return true;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCoreexpin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.exp.in (166660 => 166661)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.exp.in        2014-04-02 19:58:44 UTC (rev 166660)
+++ trunk/Source/WebCore/WebCore.exp.in        2014-04-02 20:07:33 UTC (rev 166661)
</span><span class="lines">@@ -1061,6 +1061,7 @@
</span><span class="cx"> __ZN7WebCore4Page24resumeScriptedAnimationsEv
</span><span class="cx"> __ZN7WebCore4Page24scrollingStateTreeAsTextEv
</span><span class="cx"> __ZN7WebCore4Page25suspendScriptedAnimationsEv
</span><ins>+__ZN7WebCore4Page27enableLegacyPrivateBrowsingEb
</ins><span class="cx"> __ZN7WebCore4Page27invalidateStylesForAllLinksEv
</span><span class="cx"> __ZN7WebCore4Page32setMemoryCacheClientCallsEnabledEb
</span><span class="cx"> __ZN7WebCore4Page33synchronousScrollingReasonsAsTextEv
</span><span class="lines">@@ -1271,7 +1272,6 @@
</span><span class="cx"> __ZN7WebCore8Settings24setTextAreasAreResizableEb
</span><span class="cx"> __ZN7WebCore8Settings24setUsesOverlayScrollbarsEb
</span><span class="cx"> __ZN7WebCore8Settings25setMinimumLogicalFontSizeEi
</span><del>-__ZN7WebCore8Settings25setPrivateBrowsingEnabledEb
</del><span class="cx"> __ZN7WebCore8Settings25setUserStyleSheetLocationERKNS_3URLE
</span><span class="cx"> __ZN7WebCore8Settings26defaultMinDOMTimerIntervalEv
</span><span class="cx"> __ZN7WebCore8Settings26setSimpleLineLayoutEnabledEb
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLMediaElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (166660 => 166661)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLMediaElement.cpp        2014-04-02 19:58:44 UTC (rev 166660)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp        2014-04-02 20:07:33 UTC (rev 166661)
</span><span class="lines">@@ -72,6 +72,7 @@
</span><span class="cx"> #include "ScriptController.h"
</span><span class="cx"> #include "ScriptSourceCode.h"
</span><span class="cx"> #include "SecurityPolicy.h"
</span><ins>+#include "SessionID.h"
</ins><span class="cx"> #include "Settings.h"
</span><span class="cx"> #include "ShadowRoot.h"
</span><span class="cx"> #include "TimeRanges.h"
</span><span class="lines">@@ -1261,8 +1262,7 @@
</span><span class="cx"> if (m_sendProgressEvents)
</span><span class="cx"> startProgressEventTimer();
</span><span class="cx">
</span><del>- Settings* settings = document().settings();
- bool privateMode = !settings || settings->privateBrowsingEnabled();
</del><ins>+ bool privateMode = document().page() && document().page()->usesEphemeralSession();
</ins><span class="cx"> m_player->setPrivateBrowsingMode(privateMode);
</span><span class="cx">
</span><span class="cx"> // Reset display mode to force a recalculation of what to show because we are resetting the player.
</span><span class="lines">@@ -5266,8 +5266,7 @@
</span><span class="cx"> if (!m_player)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- Settings* settings = document().settings();
- bool privateMode = !settings || settings->privateBrowsingEnabled();
</del><ins>+ bool privateMode = document().page() && document().page()->usesEphemeralSession();
</ins><span class="cx"> LOG(Media, "HTMLMediaElement::privateBrowsingStateDidChange(%s)", boolString(privateMode));
</span><span class="cx"> m_player->setPrivateBrowsingMode(privateMode);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderHistoryControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/HistoryController.cpp (166660 => 166661)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/HistoryController.cpp        2014-04-02 19:58:44 UTC (rev 166660)
+++ trunk/Source/WebCore/loader/HistoryController.cpp        2014-04-02 20:07:33 UTC (rev 166661)
</span><span class="lines">@@ -348,7 +348,7 @@
</span><span class="cx">
</span><span class="cx"> FrameLoader& frameLoader = m_frame.loader();
</span><span class="cx">
</span><del>- bool needPrivacy = m_frame.settings().privateBrowsingEnabled();
</del><ins>+ bool needPrivacy = m_frame.page()->usesEphemeralSession();
</ins><span class="cx"> const URL& historyURL = frameLoader.documentLoader()->urlForHistory();
</span><span class="cx">
</span><span class="cx"> if (!frameLoader.documentLoader()->isClientRedirect()) {
</span><span class="lines">@@ -385,7 +385,7 @@
</span><span class="cx"> LOG(History, "WebCoreHistory: Updating History for redirect load in frame %s", m_frame.loader().documentLoader()->title().string().utf8().data());
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>- bool needPrivacy = m_frame.settings().privateBrowsingEnabled();
</del><ins>+ bool needPrivacy = m_frame.page()->usesEphemeralSession();
</ins><span class="cx"> const URL& historyURL = m_frame.loader().documentLoader()->urlForHistory();
</span><span class="cx">
</span><span class="cx"> if (m_frame.loader().documentLoader()->isClientRedirect()) {
</span><span class="lines">@@ -433,7 +433,7 @@
</span><span class="cx"> m_currentItem->clearScrollPoint();
</span><span class="cx"> }
</span><span class="cx">
</span><del>- bool needPrivacy = m_frame.settings().privateBrowsingEnabled();
</del><ins>+ bool needPrivacy = m_frame.page()->usesEphemeralSession();
</ins><span class="cx"> const URL& historyURL = m_frame.loader().documentLoader()->urlForHistory();
</span><span class="cx">
</span><span class="cx"> if (!historyURL.isEmpty() && !needPrivacy) {
</span><span class="lines">@@ -523,7 +523,7 @@
</span><span class="cx"> if (m_frame.document()->url().isEmpty())
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- if (m_frame.settings().privateBrowsingEnabled())
</del><ins>+ if (m_frame.page()->usesEphemeralSession())
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> Page* page = m_frame.page();
</span><span class="lines">@@ -847,7 +847,7 @@
</span><span class="cx">
</span><span class="cx"> page->backForward().addItem(topItem.release());
</span><span class="cx">
</span><del>- if (m_frame.settings().privateBrowsingEnabled())
</del><ins>+ if (m_frame.page()->usesEphemeralSession())
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> addVisitedLink(*page, URL(ParsedURLString, urlString));
</span><span class="lines">@@ -866,7 +866,7 @@
</span><span class="cx"> m_currentItem->setFormData(0);
</span><span class="cx"> m_currentItem->setFormContentType(String());
</span><span class="cx">
</span><del>- if (m_frame.settings().privateBrowsingEnabled())
</del><ins>+ if (m_frame.page()->usesEphemeralSession())
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> ASSERT(m_frame.page());
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderappcacheApplicationCacheGroupcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp (166660 => 166661)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp        2014-04-02 19:58:44 UTC (rev 166660)
+++ trunk/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp        2014-04-02 20:07:33 UTC (rev 166661)
</span><span class="lines">@@ -103,7 +103,7 @@
</span><span class="cx"> if (url.hasFragmentIdentifier())
</span><span class="cx"> url.removeFragmentIdentifier();
</span><span class="cx">
</span><del>- if (documentLoader->frame() && (documentLoader->frame()->settings().privateBrowsingEnabled() || !documentLoader->frame()->document()->securityOrigin()->canAccessApplicationCache(documentLoader->frame()->tree().top().document()->securityOrigin())))
</del><ins>+ if (documentLoader->frame() && (documentLoader->frame()->page()->usesEphemeralSession() || !documentLoader->frame()->document()->securityOrigin()->canAccessApplicationCache(documentLoader->frame()->tree().top().document()->securityOrigin())))
</ins><span class="cx"> return 0;
</span><span class="cx">
</span><span class="cx"> if (ApplicationCacheGroup* group = cacheStorage().cacheGroupForURL(url)) {
</span><span class="lines">@@ -151,7 +151,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Don't access anything on disk if private browsing is enabled.
</span><del>- if (frame->settings().privateBrowsingEnabled() || !frame->document()->securityOrigin()->canAccessApplicationCache(frame->tree().top().document()->securityOrigin())) {
</del><ins>+ if (frame->page()->usesEphemeralSession() || !frame->document()->securityOrigin()->canAccessApplicationCache(frame->tree().top().document()->securityOrigin())) {
</ins><span class="cx"> postListenerTask(ApplicationCacheHost::CHECKING_EVENT, documentLoader);
</span><span class="cx"> postListenerTask(ApplicationCacheHost::ERROR_EVENT, documentLoader);
</span><span class="cx"> return;
</span><span class="lines">@@ -219,7 +219,7 @@
</span><span class="cx"> ASSERT(!documentLoader->applicationCacheHost()->applicationCache());
</span><span class="cx">
</span><span class="cx"> // Don't access anything on disk if private browsing is enabled.
</span><del>- if (frame->settings().privateBrowsingEnabled() || !frame->document()->securityOrigin()->canAccessApplicationCache(frame->tree().top().document()->securityOrigin())) {
</del><ins>+ if (frame->page()->usesEphemeralSession() || !frame->document()->securityOrigin()->canAccessApplicationCache(frame->tree().top().document()->securityOrigin())) {
</ins><span class="cx"> postListenerTask(ApplicationCacheHost::CHECKING_EVENT, documentLoader);
</span><span class="cx"> postListenerTask(ApplicationCacheHost::ERROR_EVENT, documentLoader);
</span><span class="cx"> return;
</span><span class="lines">@@ -434,7 +434,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Don't access anything on disk if private browsing is enabled.
</span><del>- if (frame->settings().privateBrowsingEnabled() || !frame->document()->securityOrigin()->canAccessApplicationCache(frame->tree().top().document()->securityOrigin())) {
</del><ins>+ if (frame->page()->usesEphemeralSession() || !frame->document()->securityOrigin()->canAccessApplicationCache(frame->tree().top().document()->securityOrigin())) {
</ins><span class="cx"> ASSERT(m_pendingMasterResourceLoaders.isEmpty());
</span><span class="cx"> ASSERT(m_pendingEntries.isEmpty());
</span><span class="cx"> ASSERT(!m_cacheBeingUpdated);
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderappcacheApplicationCacheHostcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/appcache/ApplicationCacheHost.cpp (166660 => 166661)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/appcache/ApplicationCacheHost.cpp        2014-04-02 19:58:44 UTC (rev 166660)
+++ trunk/Source/WebCore/loader/appcache/ApplicationCacheHost.cpp        2014-04-02 20:07:33 UTC (rev 166661)
</span><span class="lines">@@ -476,7 +476,7 @@
</span><span class="cx">
</span><span class="cx"> bool ApplicationCacheHost::isApplicationCacheEnabled()
</span><span class="cx"> {
</span><del>- return m_documentLoader->frame() && m_documentLoader->frame()->settings().offlineWebApplicationCacheEnabled() && !m_documentLoader->frame()->settings().privateBrowsingEnabled();
</del><ins>+ return m_documentLoader->frame() && m_documentLoader->frame()->settings().offlineWebApplicationCacheEnabled() && !m_documentLoader->frame()->page()->usesEphemeralSession();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool ApplicationCacheHost::isApplicationCacheBlockedForRequest(const ResourceRequest& request)
</span></span></pre></div>
<a id="trunkSourceWebCoreloadericonIconControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/icon/IconController.cpp (166660 => 166661)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/icon/IconController.cpp        2014-04-02 19:58:44 UTC (rev 166660)
+++ trunk/Source/WebCore/loader/icon/IconController.cpp        2014-04-02 20:07:33 UTC (rev 166661)
</span><span class="lines">@@ -204,7 +204,7 @@
</span><span class="cx"> ASSERT(iconLoadDecision != IconLoadUnknown);
</span><span class="cx">
</span><span class="cx"> // FIXME (<rdar://problem/9168605>) - We should support in-memory-only private browsing icons in asynchronous icon database mode.
</span><del>- if (iconDatabase().supportsAsynchronousMode() && m_frame.page()->settings().privateBrowsingEnabled())
</del><ins>+ if (iconDatabase().supportsAsynchronousMode() && m_frame.page()->usesEphemeralSession())
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> if (iconLoadDecision == IconLoadNo) {
</span></span></pre></div>
<a id="trunkSourceWebCorepagePagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Page.cpp (166660 => 166661)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Page.cpp        2014-04-02 19:58:44 UTC (rev 166660)
+++ trunk/Source/WebCore/page/Page.cpp        2014-04-02 20:07:33 UTC (rev 166661)
</span><span class="lines">@@ -192,7 +192,7 @@
</span><span class="cx"> , m_lastSpatialNavigationCandidatesCount(0) // NOTE: Only called from Internals for Spatial Navigation testing.
</span><span class="cx"> , m_framesHandlingBeforeUnloadEvent(0)
</span><span class="cx"> , m_visitedLinkStore(std::move(pageClients.visitedLinkStore))
</span><del>- , m_sessionID(SessionID::emptySessionID())
</del><ins>+ , m_sessionID(SessionID::defaultSessionID())
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(m_editorClient);
</span><span class="cx">
</span><span class="lines">@@ -1080,19 +1080,12 @@
</span><span class="cx"> views[i]->storageBlockingStateChanged();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void Page::privateBrowsingStateChanged()
</del><ins>+void Page::enableLegacyPrivateBrowsing(bool privateBrowsingEnabled)
</ins><span class="cx"> {
</span><del>- bool privateBrowsingEnabled = m_settings->privateBrowsingEnabled();
</del><ins>+ // Don't allow changing the legacy private browsing state if we have set a session ID.
+ ASSERT(m_sessionID == SessionID::defaultSessionID() || m_sessionID == SessionID::legacyPrivateSessionID());
</ins><span class="cx">
</span><del>- for (Frame* frame = &mainFrame(); frame; frame = frame->tree().traverseNext())
- frame->document()->privateBrowsingStateDidChange();
-
- // Collect the PluginViews in to a vector to ensure that action the plug-in takes
- // from below privateBrowsingStateChanged does not affect their lifetime.
- auto views = pluginViews();
-
- for (unsigned i = 0; i < views.size(); ++i)
- views[i]->privateBrowsingStateChanged(privateBrowsingEnabled);
</del><ins>+ setSessionID(privateBrowsingEnabled ? SessionID::legacyPrivateSessionID() : SessionID::defaultSessionID());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if !ASSERT_DISABLED
</span><span class="lines">@@ -1514,19 +1507,29 @@
</span><span class="cx">
</span><span class="cx"> SessionID Page::sessionID() const
</span><span class="cx"> {
</span><del>- if (m_sessionID.isValid())
- return m_sessionID;
-
- if (settings().privateBrowsingEnabled())
- return SessionID::legacyPrivateSessionID();
-
- return SessionID::defaultSessionID();
</del><ins>+ return m_sessionID;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void Page::setSessionID(SessionID sessionID)
</span><span class="cx"> {
</span><span class="cx"> ASSERT(sessionID.isValid());
</span><ins>+
+ bool privateBrowsingStateChanged = (sessionID.isEphemeral() != m_sessionID.isEphemeral());
+
</ins><span class="cx"> m_sessionID = sessionID;
</span><ins>+
+ if (!privateBrowsingStateChanged)
+ return;
+
+ for (Frame* frame = &mainFrame(); frame; frame = frame->tree().traverseNext())
+ frame->document()->privateBrowsingStateDidChange();
+
+ // Collect the PluginViews in to a vector to ensure that action the plug-in takes
+ // from below privateBrowsingStateChanged does not affect their lifetime.
+
+ for (auto& view : pluginViews())
+ view->privateBrowsingStateChanged(sessionID.isEphemeral());
+
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> Page::PageClients::PageClients()
</span></span></pre></div>
<a id="trunkSourceWebCorepagePageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Page.h (166660 => 166661)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Page.h        2014-04-02 19:58:44 UTC (rev 166660)
+++ trunk/Source/WebCore/page/Page.h        2014-04-02 20:07:33 UTC (rev 166661)
</span><span class="lines">@@ -313,7 +313,6 @@
</span><span class="cx">
</span><span class="cx"> void dnsPrefetchingStateChanged();
</span><span class="cx"> void storageBlockingStateChanged();
</span><del>- void privateBrowsingStateChanged();
</del><span class="cx">
</span><span class="cx"> void setDebugger(JSC::Debugger*);
</span><span class="cx"> JSC::Debugger* debugger() const { return m_debugger; }
</span><span class="lines">@@ -410,7 +409,8 @@
</span><span class="cx">
</span><span class="cx"> SessionID sessionID() const;
</span><span class="cx"> void setSessionID(SessionID);
</span><del>- bool isSessionIDSet() const { return m_sessionID.isValid(); }
</del><ins>+ void enableLegacyPrivateBrowsing(bool privateBrowsingEnabled);
+ bool usesEphemeralSession() const { return m_sessionID.isEphemeral(); }
</ins><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> void initGroup();
</span></span></pre></div>
<a id="trunkSourceWebCorepagePageConsolecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/PageConsole.cpp (166660 => 166661)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PageConsole.cpp        2014-04-02 19:58:44 UTC (rev 166660)
+++ trunk/Source/WebCore/page/PageConsole.cpp        2014-04-02 20:07:33 UTC (rev 166661)
</span><span class="lines">@@ -126,7 +126,7 @@
</span><span class="cx"> if (source == MessageSource::CSS)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- if (m_page.settings().privateBrowsingEnabled())
</del><ins>+ if (m_page.usesEphemeralSession())
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> m_page.chrome().client().addMessageToConsole(source, level, message, lineNumber, columnNumber, url);
</span><span class="lines">@@ -146,7 +146,7 @@
</span><span class="cx"> bool gotMessage = arguments->getFirstArgumentAsString(message);
</span><span class="cx"> InspectorInstrumentation::addMessageToConsole(&m_page, MessageSource::ConsoleAPI, type, level, message, exec, arguments);
</span><span class="cx">
</span><del>- if (m_page.settings().privateBrowsingEnabled())
</del><ins>+ if (m_page.usesEphemeralSession())
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> if (gotMessage) {
</span></span></pre></div>
<a id="trunkSourceWebCorepageSettingscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Settings.cpp (166660 => 166661)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Settings.cpp        2014-04-02 19:58:44 UTC (rev 166660)
+++ trunk/Source/WebCore/page/Settings.cpp        2014-04-02 20:07:33 UTC (rev 166661)
</span><span class="lines">@@ -171,7 +171,6 @@
</span><span class="cx"> , m_isJavaEnabled(false)
</span><span class="cx"> , m_isJavaEnabledForLocalFiles(true)
</span><span class="cx"> , m_loadsImagesAutomatically(false)
</span><del>- , m_privateBrowsingEnabled(false)
</del><span class="cx"> , m_areImagesEnabled(true)
</span><span class="cx"> , m_arePluginsEnabled(false)
</span><span class="cx"> , m_isScriptEnabled(false)
</span><span class="lines">@@ -426,15 +425,6 @@
</span><span class="cx"> Page::refreshPlugins(false);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void Settings::setPrivateBrowsingEnabled(bool privateBrowsingEnabled)
-{
- if (m_privateBrowsingEnabled == privateBrowsingEnabled)
- return;
-
- m_privateBrowsingEnabled = privateBrowsingEnabled;
- m_page->privateBrowsingStateChanged();
-}
-
</del><span class="cx"> void Settings::setUserStyleSheetLocation(const URL& userStyleSheetLocation)
</span><span class="cx"> {
</span><span class="cx"> if (m_userStyleSheetLocation == userStyleSheetLocation)
</span></span></pre></div>
<a id="trunkSourceWebCorepageSettingsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Settings.h (166660 => 166661)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Settings.h        2014-04-02 19:58:44 UTC (rev 166660)
+++ trunk/Source/WebCore/page/Settings.h        2014-04-02 20:07:33 UTC (rev 166661)
</span><span class="lines">@@ -146,7 +146,6 @@
</span><span class="cx"> // - HTTP Cookies
</span><span class="cx"> // - Plug-ins (that support NPNVprivateModeBool)
</span><span class="cx"> void setPrivateBrowsingEnabled(bool);
</span><del>- bool privateBrowsingEnabled() const { return m_privateBrowsingEnabled; }
</del><span class="cx">
</span><span class="cx"> void setDNSPrefetchingEnabled(bool);
</span><span class="cx"> bool dnsPrefetchingEnabled() const { return m_dnsPrefetchingEnabled; }
</span><span class="lines">@@ -298,7 +297,6 @@
</span><span class="cx"> bool m_isJavaEnabled : 1;
</span><span class="cx"> bool m_isJavaEnabledForLocalFiles : 1;
</span><span class="cx"> bool m_loadsImagesAutomatically : 1;
</span><del>- bool m_privateBrowsingEnabled : 1;
</del><span class="cx"> bool m_areImagesEnabled : 1;
</span><span class="cx"> bool m_arePluginsEnabled : 1;
</span><span class="cx"> bool m_isScriptEnabled : 1;
</span></span></pre></div>
<a id="trunkSourceWebCorepluginsPluginViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/plugins/PluginView.cpp (166660 => 166661)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/plugins/PluginView.cpp        2014-04-02 19:58:44 UTC (rev 166660)
+++ trunk/Source/WebCore/plugins/PluginView.cpp        2014-04-02 20:07:33 UTC (rev 166661)
</span><span class="lines">@@ -1354,7 +1354,7 @@
</span><span class="cx"> Page* page = m_parentFrame->page();
</span><span class="cx"> if (!page)
</span><span class="cx"> return NPERR_GENERIC_ERROR;
</span><del>- *((NPBool*)value) = page->settings().privateBrowsingEnabled();
</del><ins>+ *((NPBool*)value) = page->usesEphemeralSession();
</ins><span class="cx"> return NPERR_NO_ERROR;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderSearchFieldcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderSearchField.cpp (166660 => 166661)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderSearchField.cpp        2014-04-02 19:58:44 UTC (rev 166660)
+++ trunk/Source/WebCore/rendering/RenderSearchField.cpp        2014-04-02 20:07:33 UTC (rev 166661)
</span><span class="lines">@@ -85,7 +85,7 @@
</span><span class="cx"> if (value.isEmpty())
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- if (frame().settings().privateBrowsingEnabled())
</del><ins>+ if (frame().page()->usesEphemeralSession())
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> int size = static_cast<int>(m_recentSearches.size());
</span></span></pre></div>
<a id="trunkSourceWebCorestorageStoragecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/storage/Storage.cpp (166660 => 166661)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/storage/Storage.cpp        2014-04-02 19:58:44 UTC (rev 166660)
+++ trunk/Source/WebCore/storage/Storage.cpp        2014-04-02 20:07:33 UTC (rev 166661)
</span><span class="lines">@@ -158,7 +158,7 @@
</span><span class="cx">
</span><span class="cx"> bool Storage::isDisabledByPrivateBrowsing() const
</span><span class="cx"> {
</span><del>- if (!m_frame->page()->settings().privateBrowsingEnabled())
</del><ins>+ if (!m_frame->page()->usesEphemeralSession())
</ins><span class="cx"> return false;
</span><span class="cx">
</span><span class="cx"> if (m_storageArea->storageType() == LocalStorage) {
</span></span></pre></div>
<a id="trunkSourceWebKiteflChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/efl/ChangeLog (166660 => 166661)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/efl/ChangeLog        2014-04-02 19:58:44 UTC (rev 166660)
+++ trunk/Source/WebKit/efl/ChangeLog        2014-04-02 20:07:33 UTC (rev 166661)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2014-04-02 Martin Hock <mhock@apple.com>
+
+ Unify private browsing with sessions.
+ https://bugs.webkit.org/show_bug.cgi?id=130099
+
+ Reviewed by Alexey Proskuryakov.
+
+ * ewk/ewk_view.cpp:
+ (_ewk_view_priv_new): Change WebCore::Settings::privateBrowsingEnabled() to Page::sessionID().isEphemeral().
+ (ewk_view_setting_private_browsing_set): Change WebCore::Settings::setPrivateBrowsingEnabled() to Page::enableLegacyPrivateBrowsing().
+
</ins><span class="cx"> 2014-04-02 Hyowon Kim <hw1008.kim@samsung.com>
</span><span class="cx">
</span><span class="cx"> [EFL] Composite all layers into one evas_object using TextureMapper.
</span></span></pre></div>
<a id="trunkSourceWebKiteflewkewk_viewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/efl/ewk/ewk_view.cpp (166660 => 166661)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/efl/ewk/ewk_view.cpp        2014-04-02 19:58:44 UTC (rev 166660)
+++ trunk/Source/WebKit/efl/ewk/ewk_view.cpp        2014-04-02 20:07:33 UTC (rev 166661)
</span><span class="lines">@@ -66,6 +66,7 @@
</span><span class="cx"> #include "ResourceHandle.h"
</span><span class="cx"> #include "RuntimeEnabledFeatures.h"
</span><span class="cx"> #include "ScriptController.h"
</span><ins>+#include "SessionID.h"
</ins><span class="cx"> #include "Settings.h"
</span><span class="cx"> #include "SoupNetworkSession.h"
</span><span class="cx"> #include "TiledBackingStore.h"
</span><span class="lines">@@ -791,7 +792,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> priv->settings.scriptsCanAccessClipboard = pageSettings.javaScriptCanAccessClipboard() && pageSettings.DOMPasteAllowed();
</span><span class="cx"> priv->settings.resizableTextareas = pageSettings.textAreasAreResizable();
</span><del>- priv->settings.privateBrowsing = pageSettings.privateBrowsingEnabled();
</del><ins>+ priv->settings.privateBrowsing = priv->page->usesEphemeralSession();
</ins><span class="cx"> priv->settings.caretBrowsing = pageSettings.caretBrowsingEnabled();
</span><span class="cx"> priv->settings.spatialNavigation = pageSettings.spatialNavigationEnabled();
</span><span class="cx"> priv->settings.localStorage = pageSettings.localStorageEnabled();
</span><span class="lines">@@ -2218,7 +2219,7 @@
</span><span class="cx"> EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
</span><span class="cx"> enable = !!enable;
</span><span class="cx"> if (priv->settings.privateBrowsing != enable) {
</span><del>- priv->page->settings().setPrivateBrowsingEnabled(enable);
</del><ins>+ priv->page->enableLegacyPrivateBrowsing(enable);
</ins><span class="cx"> priv->settings.privateBrowsing = enable;
</span><span class="cx"> }
</span><span class="cx"> return true;
</span></span></pre></div>
<a id="trunkSourceWebKitgtkChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/gtk/ChangeLog (166660 => 166661)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/gtk/ChangeLog        2014-04-02 19:58:44 UTC (rev 166660)
+++ trunk/Source/WebKit/gtk/ChangeLog        2014-04-02 20:07:33 UTC (rev 166661)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2014-04-02 Martin Hock <mhock@apple.com>
+
+ Unify private browsing with sessions.
+ https://bugs.webkit.org/show_bug.cgi?id=130099
+
+ Reviewed by Alexey Proskuryakov.
+
+ * WebCoreSupport/FrameLoaderClientGtk.cpp: Change WebCore::Settings::privateBrowsingEnabled() to Page:usesEphemeralSession().
+ (WebKit::FrameLoaderClient::dispatchDidReceiveAuthenticationChallenge):
+ * webkit/webkitwebview.cpp: Change Settings::setPrivateBrowsingEnabled() to Page::enablePrivateBrowsing().
+ (webkit_web_view_update_settings):
+ (webkit_web_view_settings_notify):
+
</ins><span class="cx"> 2014-03-31 Martin Robinson <mrobinson@igalia.com>
</span><span class="cx">
</span><span class="cx"> [GTK] Use PROJECT_VERSION_* instead of WEBKIT_*_VERSION
</span></span></pre></div>
<a id="trunkSourceWebKitgtkWebCoreSupportFrameLoaderClientGtkcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp (166660 => 166661)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp        2014-04-02 19:58:44 UTC (rev 166660)
+++ trunk/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp        2014-04-02 20:07:33 UTC (rev 166661)
</span><span class="lines">@@ -258,7 +258,7 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx"> CredentialStorageMode credentialStorageMode;
</span><del>- if (core(view)->settings().privateBrowsingEnabled())
</del><ins>+ if (core(view)->usesEphemeralSession())
</ins><span class="cx"> credentialStorageMode = DisallowPersistentStorage;
</span><span class="cx"> else
</span><span class="cx"> credentialStorageMode = AllowPersistentStorage;
</span></span></pre></div>
<a id="trunkSourceWebKitgtkwebkitwebkitwebviewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/gtk/webkit/webkitwebview.cpp (166660 => 166661)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/gtk/webkit/webkitwebview.cpp        2014-04-02 19:58:44 UTC (rev 166660)
+++ trunk/Source/WebKit/gtk/webkit/webkitwebview.cpp        2014-04-02 20:07:33 UTC (rev 166661)
</span><span class="lines">@@ -3601,7 +3601,7 @@
</span><span class="cx"> coreSettings.setTextAreasAreResizable(settingsPrivate->resizableTextAreas);
</span><span class="cx"> coreSettings.setUserStyleSheetLocation(URL(URL(), settingsPrivate->userStylesheetURI.data()));
</span><span class="cx"> coreSettings.setDeveloperExtrasEnabled(settingsPrivate->enableDeveloperExtras);
</span><del>- coreSettings.setPrivateBrowsingEnabled(settingsPrivate->enablePrivateBrowsing);
</del><ins>+ core(webView)->enableLegacyPrivateBrowsing(settingsPrivate->enablePrivateBrowsing);
</ins><span class="cx"> coreSettings.setCaretBrowsingEnabled(settingsPrivate->enableCaretBrowsing);
</span><span class="cx"> coreSettings.setLocalStorageEnabled(settingsPrivate->enableHTML5LocalStorage);
</span><span class="cx"> coreSettings.setLocalStorageDatabasePath(settingsPrivate->html5LocalStorageDatabasePath.data());
</span><span class="lines">@@ -3733,7 +3733,7 @@
</span><span class="cx"> else if (name == g_intern_string("enable-developer-extras"))
</span><span class="cx"> settings.setDeveloperExtrasEnabled(g_value_get_boolean(&value));
</span><span class="cx"> else if (name == g_intern_string("enable-private-browsing"))
</span><del>- settings.setPrivateBrowsingEnabled(g_value_get_boolean(&value));
</del><ins>+ core(webView)->enableLegacyPrivateBrowsing(g_value_get_boolean(&value));
</ins><span class="cx"> else if (name == g_intern_string("enable-caret-browsing"))
</span><span class="cx"> settings.setCaretBrowsingEnabled(g_value_get_boolean(&value));
</span><span class="cx"> #if ENABLE(SQL_DATABASE)
</span></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (166660 => 166661)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2014-04-02 19:58:44 UTC (rev 166660)
+++ trunk/Source/WebKit/mac/ChangeLog        2014-04-02 20:07:33 UTC (rev 166661)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2014-04-02 Martin Hock <mhock@apple.com>
+
+ Unify private browsing with sessions.
+ https://bugs.webkit.org/show_bug.cgi?id=130099
+
+ Reviewed by Alexey Proskuryakov.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm: Change WebCore::Settings::privateBrowsingEnabled() to Page::sessionID().isEphemeral().
+ (WebFrameLoaderClient::updateGlobalHistoryItemForPage):
+ * WebCoreSupport/WebFrameNetworkingContext.mm: Ditto.
+ (WebFrameNetworkingContext::storageSession):
+ * WebView/WebView.mm: Change WebCore::Settings::setPrivateBrowsingEnabled() to Page::enableLegacyPrivateBrowsing().
+ (-[WebView _preferencesChanged:]):
+
</ins><span class="cx"> 2014-04-01 Anders Carlsson <andersca@apple.com>
</span><span class="cx">
</span><span class="cx"> Migrate more headers
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebCoreSupportWebFrameLoaderClientmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm (166660 => 166661)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm        2014-04-02 19:58:44 UTC (rev 166660)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm        2014-04-02 20:07:33 UTC (rev 166661)
</span><span class="lines">@@ -1114,7 +1114,7 @@
</span><span class="cx"> HistoryItem* historyItem = 0;
</span><span class="cx">
</span><span class="cx"> if (Page* page = core(m_webFrame.get())->page()) {
</span><del>- if (!page->settings().privateBrowsingEnabled())
</del><ins>+ if (!page->sessionID().isEphemeral())
</ins><span class="cx"> historyItem = page->backForward().currentItem();
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebCoreSupportWebFrameNetworkingContextmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebFrameNetworkingContext.mm (166660 => 166661)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebCoreSupport/WebFrameNetworkingContext.mm        2014-04-02 19:58:44 UTC (rev 166660)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebFrameNetworkingContext.mm        2014-04-02 20:07:33 UTC (rev 166661)
</span><span class="lines">@@ -113,7 +113,7 @@
</span><span class="cx"> {
</span><span class="cx"> ASSERT(isMainThread());
</span><span class="cx">
</span><del>- if (frame() && frame()->settings().privateBrowsingEnabled())
</del><ins>+ if (frame() && frame()->page()->sessionID().isEphemeral())
</ins><span class="cx"> return *privateSession();
</span><span class="cx">
</span><span class="cx"> return NetworkStorageSession::defaultStorageSession();
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (166660 => 166661)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebView.mm        2014-04-02 19:58:44 UTC (rev 166660)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm        2014-04-02 20:07:33 UTC (rev 166661)
</span><span class="lines">@@ -2247,7 +2247,7 @@
</span><span class="cx"> #if !PLATFORM(IOS)
</span><span class="cx"> settings.setExperimentalNotificationsEnabled([preferences experimentalNotificationsEnabled]);
</span><span class="cx"> #endif
</span><del>- settings.setPrivateBrowsingEnabled([preferences privateBrowsingEnabled]);
</del><ins>+ _private->page->enableLegacyPrivateBrowsing([preferences privateBrowsingEnabled]);
</ins><span class="cx"> settings.setSansSerifFontFamily([preferences sansSerifFontFamily]);
</span><span class="cx"> settings.setSerifFontFamily([preferences serifFontFamily]);
</span><span class="cx"> settings.setStandardFontFamily([preferences standardFontFamily]);
</span></span></pre></div>
<a id="trunkSourceWebKitwinChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/ChangeLog (166660 => 166661)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/ChangeLog        2014-04-02 19:58:44 UTC (rev 166660)
+++ trunk/Source/WebKit/win/ChangeLog        2014-04-02 20:07:33 UTC (rev 166661)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2014-04-02 Martin Hock <mhock@apple.com>
+
+ Unify private browsing with sessions.
+ https://bugs.webkit.org/show_bug.cgi?id=130099
+
+ Reviewed by Alexey Proskuryakov.
+
+ * WebCoreSupport/WebFrameLoaderClient.cpp: Change WebCore::Settings::privateBrowsingEnabled() to Page::sessionID().isEphemeral().
+ (WebFrameLoaderClient::updateGlobalHistoryItemForPage):
+ * WebCoreSupport/WebFrameNetworkingContext.cpp: Ditto.
+ (WebFrameNetworkingContext::storageSession):
+ * WebView.cpp: Change WebCore::Settings::setPrivateBrowsingEnabled() to Page::enableLegacyPrivateBrowsing().
+ (WebView::notifyPreferencesChanged):
+
</ins><span class="cx"> 2014-03-22 Darin Adler <darin@apple.com>
</span><span class="cx">
</span><span class="cx"> Remove String::deprecatedCharacters
</span></span></pre></div>
<a id="trunkSourceWebKitwinWebCoreSupportWebFrameLoaderClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp (166660 => 166661)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp        2014-04-02 19:58:44 UTC (rev 166660)
+++ trunk/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp        2014-04-02 20:07:33 UTC (rev 166661)
</span><span class="lines">@@ -803,7 +803,7 @@
</span><span class="cx"> WebView* webView = m_webFrame->webView();
</span><span class="cx">
</span><span class="cx"> if (Page* page = webView->page()) {
</span><del>- if (!page->settings().privateBrowsingEnabled())
</del><ins>+ if (!page->usesEphemeralSession())
</ins><span class="cx"> historyItem = page->backForward().currentItem();
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKitwinWebCoreSupportWebFrameNetworkingContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/WebCoreSupport/WebFrameNetworkingContext.cpp (166660 => 166661)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/WebCoreSupport/WebFrameNetworkingContext.cpp        2014-04-02 19:58:44 UTC (rev 166660)
+++ trunk/Source/WebKit/win/WebCoreSupport/WebFrameNetworkingContext.cpp        2014-04-02 20:07:33 UTC (rev 166661)
</span><span class="lines">@@ -114,7 +114,7 @@
</span><span class="cx"> {
</span><span class="cx"> ASSERT(isMainThread());
</span><span class="cx">
</span><del>- if (frame() && frame()->settings().privateBrowsingEnabled())
</del><ins>+ if (frame() && frame()->page()->usesEphemeralSession())
</ins><span class="cx"> return *privateSession();
</span><span class="cx">
</span><span class="cx"> return NetworkStorageSession::defaultStorageSession();
</span></span></pre></div>
<a id="trunkSourceWebKitwinWebViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/WebView.cpp (166660 => 166661)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/WebView.cpp        2014-04-02 19:58:44 UTC (rev 166660)
+++ trunk/Source/WebKit/win/WebView.cpp        2014-04-02 20:07:33 UTC (rev 166661)
</span><span class="lines">@@ -4787,7 +4787,7 @@
</span><span class="cx"> else
</span><span class="cx"> WebFrameNetworkingContext::destroyPrivateBrowsingSession();
</span><span class="cx"> #endif
</span><del>- settings.setPrivateBrowsingEnabled(!!enabled);
</del><ins>+ m_page->enableLegacyPrivateBrowsing(!!enabled);
</ins><span class="cx">
</span><span class="cx"> hr = preferences->sansSerifFontFamily(&str);
</span><span class="cx"> if (FAILED(hr))
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (166660 => 166661)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-04-02 19:58:44 UTC (rev 166660)
+++ trunk/Source/WebKit2/ChangeLog        2014-04-02 20:07:33 UTC (rev 166661)
</span><span class="lines">@@ -1,3 +1,27 @@
</span><ins>+2014-04-02 Martin Hock <mhock@apple.com>
+
+ Unify private browsing with sessions.
+ https://bugs.webkit.org/show_bug.cgi?id=130099
+
+ Reviewed by Alexey Proskuryakov.
+
+ * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: Change WebPage::isUsingEphemeralSession() to WebPage::usesEphemeralSession().
+ (WKBundlePageIsUsingEphemeralSession):
+ * WebProcess/InjectedBundle/InjectedBundle.cpp: Change Settings::setPrivateBrowsingEnabled() to Page::enableLegacyPrivateBrowsing().
+ (WebKit::InjectedBundle::setPrivateBrowsingEnabled):
+ * WebProcess/Plugins/PluginView.cpp: Change Settings::privateBrowsingEnabled() to Page::usesEphemeralSession().
+ (WebKit::PluginView::isPrivateBrowsingEnabled):
+ * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp: Ditto.
+ (WebKit::WebFrameNetworkingContext::storageSession):
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::usesEphemeralSession): Renamed from isUsingEphemeralSession.
+ (WebKit::WebPage::setSessionID): Ensure session before setting.
+ (WebKit::WebPage::updatePreferences): Set session to legacy private session if needed.
+ (WebKit::WebPage::sessionID): Moved to header.
+ (WebKit::WebPage::isUsingEphemeralSession): Renamed to usesEphemeralSession.
+ * WebProcess/WebPage/WebPage.h:
+ (WebKit::WebPage::sessionID): Just call down to m_page.
+
</ins><span class="cx"> 2014-04-02 Alice Barraclough <alice.liu@apple.com>
</span><span class="cx">
</span><span class="cx"> Adding Objective-C SPI for Find in Page.
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessInjectedBundleAPIcWKBundlePagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp (166660 => 166661)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp        2014-04-02 19:58:44 UTC (rev 166660)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp        2014-04-02 20:07:33 UTC (rev 166661)
</span><span class="lines">@@ -561,5 +561,5 @@
</span><span class="cx">
</span><span class="cx"> bool WKBundlePageIsUsingEphemeralSession(WKBundlePageRef pageRef)
</span><span class="cx"> {
</span><del>- return toImpl(pageRef)->isUsingEphemeralSession();
</del><ins>+ return toImpl(pageRef)->usesEphemeralSession();
</ins><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessInjectedBundleInjectedBundlecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp (166660 => 166661)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp        2014-04-02 19:58:44 UTC (rev 166660)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp        2014-04-02 20:07:33 UTC (rev 166661)
</span><span class="lines">@@ -304,7 +304,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> const HashSet<Page*>& pages = PageGroup::pageGroup(pageGroup->identifier())->pages();
</span><span class="cx"> for (HashSet<Page*>::iterator iter = pages.begin(); iter != pages.end(); ++iter)
</span><del>- (*iter)->settings().setPrivateBrowsingEnabled(enabled);
</del><ins>+ (*iter)->enableLegacyPrivateBrowsing(enabled);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void InjectedBundle::setPopupBlockingEnabled(WebPageGroupProxy* pageGroup, bool enabled)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessPluginsPluginViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp (166660 => 166661)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp        2014-04-02 19:58:44 UTC (rev 166660)
+++ trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp        2014-04-02 20:07:33 UTC (rev 166661)
</span><span class="lines">@@ -1539,7 +1539,7 @@
</span><span class="cx"> if (!frame()->document()->securityOrigin()->canAccessPluginStorage(frame()->document()->topOrigin()))
</span><span class="cx"> return true;
</span><span class="cx">
</span><del>- return frame()->settings().privateBrowsingEnabled();
</del><ins>+ return frame()->page()->usesEphemeralSession();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool PluginView::asynchronousPluginInitializationEnabled() const
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportsoupWebFrameNetworkingContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp (166660 => 166661)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp        2014-04-02 19:58:44 UTC (rev 166660)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp        2014-04-02 20:07:33 UTC (rev 166661)
</span><span class="lines">@@ -55,7 +55,7 @@
</span><span class="cx">
</span><span class="cx"> NetworkStorageSession& WebFrameNetworkingContext::storageSession() const
</span><span class="cx"> {
</span><del>- if (frame() && frame()->settings().privateBrowsingEnabled())
</del><ins>+ if (frame() && frame()->page()->usesEphemeralSession())
</ins><span class="cx"> return *SessionTracker::session(SessionID::legacyPrivateSessionID());
</span><span class="cx">
</span><span class="cx"> return NetworkStorageSession::defaultStorageSession();
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (166660 => 166661)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2014-04-02 19:58:44 UTC (rev 166660)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2014-04-02 20:07:33 UTC (rev 166661)
</span><span class="lines">@@ -51,6 +51,7 @@
</span><span class="cx"> #include "PluginView.h"
</span><span class="cx"> #include "PrintInfo.h"
</span><span class="cx"> #include "SessionState.h"
</span><ins>+#include "SessionTracker.h"
</ins><span class="cx"> #include "ShareableBitmap.h"
</span><span class="cx"> #include "VisitedLinkTableController.h"
</span><span class="cx"> #include "WKSharedAPICast.h"
</span><span class="lines">@@ -2180,24 +2181,11 @@
</span><span class="cx"> pluginView->setLayerHostingMode(m_layerHostingMode);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-SessionID WebPage::sessionID() const
-{
- if (m_page->isSessionIDSet())
- return m_page->sessionID();
-
- return m_page->settings().privateBrowsingEnabled() ? SessionID::legacyPrivateSessionID() : SessionID::defaultSessionID();
-}
-
-bool WebPage::isUsingEphemeralSession() const
-{
- return sessionID().isEphemeral();
-}
-
</del><span class="cx"> void WebPage::setSessionID(SessionID sessionID)
</span><span class="cx"> {
</span><del>- m_page->setSessionID(sessionID);
</del><span class="cx"> if (sessionID.isEphemeral())
</span><span class="cx"> WebProcess::shared().ensurePrivateBrowsingSession(sessionID);
</span><ins>+ m_page->setSessionID(sessionID);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebPage::didReceivePolicyDecision(uint64_t frameID, uint64_t listenerID, uint32_t policyAction, uint64_t downloadID)
</span><span class="lines">@@ -2502,10 +2490,10 @@
</span><span class="cx"> settings.setLocalStorageEnabled(store.getBoolValueForKey(WebPreferencesKey::localStorageEnabledKey()));
</span><span class="cx"> settings.setXSSAuditorEnabled(store.getBoolValueForKey(WebPreferencesKey::xssAuditorEnabledKey()));
</span><span class="cx"> settings.setFrameFlatteningEnabled(store.getBoolValueForKey(WebPreferencesKey::frameFlatteningEnabledKey()));
</span><del>- if (m_page->isSessionIDSet())
- settings.setPrivateBrowsingEnabled(m_page->sessionID().isEphemeral());
- else
- settings.setPrivateBrowsingEnabled(store.getBoolValueForKey(WebPreferencesKey::privateBrowsingEnabledKey()));
</del><ins>+ if (store.getBoolValueForKey(WebPreferencesKey::privateBrowsingEnabledKey()) && !usesEphemeralSession())
+ setSessionID(SessionID::legacyPrivateSessionID());
+ else if (!store.getBoolValueForKey(WebPreferencesKey::privateBrowsingEnabledKey()) && sessionID() == SessionID::legacyPrivateSessionID())
+ setSessionID(SessionID::defaultSessionID());
</ins><span class="cx"> settings.setDeveloperExtrasEnabled(store.getBoolValueForKey(WebPreferencesKey::developerExtrasEnabledKey()));
</span><span class="cx"> settings.setJavaScriptExperimentsEnabled(store.getBoolValueForKey(WebPreferencesKey::javaScriptExperimentsEnabledKey()));
</span><span class="cx"> settings.setTextAreasAreResizable(store.getBoolValueForKey(WebPreferencesKey::textAreasAreResizableKey()));
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h (166660 => 166661)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2014-04-02 19:58:44 UTC (rev 166660)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2014-04-02 20:07:33 UTC (rev 166661)
</span><span class="lines">@@ -193,8 +193,9 @@
</span><span class="cx">
</span><span class="cx"> WebCore::Page* corePage() const { return m_page.get(); }
</span><span class="cx"> uint64_t pageID() const { return m_pageID; }
</span><del>- WebCore::SessionID sessionID() const;
- bool isUsingEphemeralSession() const;
</del><ins>+ WebCore::SessionID sessionID() const { return m_page->sessionID(); }
+ bool usesEphemeralSession() const { return m_page->usesEphemeralSession(); }
+
</ins><span class="cx"> void setSessionID(WebCore::SessionID);
</span><span class="cx">
</span><span class="cx"> void setSize(const WebCore::IntSize&);
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (166660 => 166661)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2014-04-02 19:58:44 UTC (rev 166660)
+++ trunk/Tools/ChangeLog        2014-04-02 20:07:33 UTC (rev 166661)
</span><span class="lines">@@ -1,3 +1,23 @@
</span><ins>+2014-04-02 Martin Hock <mhock@apple.com>
+
+ Unify private browsing with sessions.
+ https://bugs.webkit.org/show_bug.cgi?id=130099
+
+ Reviewed by Alexey Proskuryakov.
+
+ Add an API test for ephemeral sessions similar to PrivateBrowsingPushStateNoHistoryCallback.
+ * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+ * TestWebKitAPI/Tests/WebKit2/EphemeralSessionPushStateNoHistoryCallback.cpp:
+ (TestWebKitAPI::didNavigateWithNavigationData):
+ (TestWebKitAPI::didSameDocumentNavigationForFrame):
+ (TestWebKitAPI::TEST):
+
+ * TestWebKitAPI/Tests/WebKit2/PrivateBrowsingPushStateNoHistoryCallback.cpp: Also test to make sure private browsing can be disabled.
+ (TestWebKitAPI::didNavigateWithoutNavigationData):
+ (TestWebKitAPI::didNavigateWithNavigationData):
+ (TestWebKitAPI::didSameDocumentNavigationForFrame):
+ (TestWebKitAPI::TEST):
+
</ins><span class="cx"> 2014-04-02 Martin Robinson <mrobinson@igalia.com>
</span><span class="cx">
</span><span class="cx"> REGRESSION(r165704): [GTK] Inspector resources not correctly generated
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestWebKitAPIxcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj (166660 => 166661)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj        2014-04-02 19:58:44 UTC (rev 166660)
+++ trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj        2014-04-02 20:07:33 UTC (rev 166661)
</span><span class="lines">@@ -107,6 +107,7 @@
</span><span class="cx">                 52CB47411448FB9300873995 /* LoadAlternateHTMLStringWithNonDirectoryURL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 52CB47401448FB9300873995 /* LoadAlternateHTMLStringWithNonDirectoryURL.cpp */; };
</span><span class="cx">                 52E5CE4614D21E9D003B2BD8 /* ParentFrame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 52E5CE4514D21E9D003B2BD8 /* ParentFrame.cpp */; };
</span><span class="cx">                 52E5CE4914D21EAB003B2BD8 /* ParentFrame_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 52E5CE4814D21EAB003B2BD8 /* ParentFrame_Bundle.cpp */; };
</span><ins>+                75F3134018C171B70041CAEC /* EphemeralSessionPushStateNoHistoryCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 75F3133F18C171B70041CAEC /* EphemeralSessionPushStateNoHistoryCallback.cpp */; };
</ins><span class="cx">                 76E182DA1547550100F1FADD /* WillSendSubmitEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76E182D91547550100F1FADD /* WillSendSubmitEvent.cpp */; };
</span><span class="cx">                 76E182DD1547569100F1FADD /* WillSendSubmitEvent_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76E182DC1547569100F1FADD /* WillSendSubmitEvent_Bundle.cpp */; };
</span><span class="cx">                 76E182DF154767E600F1FADD /* auto-submitting-form.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 76E182DE15475A8300F1FADD /* auto-submitting-form.html */; };
</span><span class="lines">@@ -434,6 +435,7 @@
</span><span class="cx">                 52CB47401448FB9300873995 /* LoadAlternateHTMLStringWithNonDirectoryURL.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LoadAlternateHTMLStringWithNonDirectoryURL.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 52E5CE4514D21E9D003B2BD8 /* ParentFrame.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ParentFrame.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 52E5CE4814D21EAB003B2BD8 /* ParentFrame_Bundle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ParentFrame_Bundle.cpp; sourceTree = "<group>"; };
</span><ins>+                75F3133F18C171B70041CAEC /* EphemeralSessionPushStateNoHistoryCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EphemeralSessionPushStateNoHistoryCallback.cpp; sourceTree = "<group>"; };
</ins><span class="cx">                 76E182D91547550100F1FADD /* WillSendSubmitEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WillSendSubmitEvent.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 76E182DC1547569100F1FADD /* WillSendSubmitEvent_Bundle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WillSendSubmitEvent_Bundle.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 76E182DE15475A8300F1FADD /* auto-submitting-form.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "auto-submitting-form.html"; sourceTree = "<group>"; };
</span><span class="lines">@@ -768,6 +770,7 @@
</span><span class="cx">                                 F6F49C6715545C8D0007F39D /* DOMWindowExtensionNoCache.cpp */,
</span><span class="cx">                                 F6F49C6615545C8D0007F39D /* DOMWindowExtensionNoCache_Bundle.cpp */,
</span><span class="cx">                                 C045F9441385C2E900C0F3CD /* DownloadDecideDestinationCrash.cpp */,
</span><ins>+                                75F3133F18C171B70041CAEC /* EphemeralSessionPushStateNoHistoryCallback.cpp */,
</ins><span class="cx">                                 1A5FEFDC1270E2A3000E2921 /* EvaluateJavaScript.cpp */,
</span><span class="cx">                                 BCC8B95A12611F4700DE46A4 /* FailedLoad.cpp */,
</span><span class="cx">                                 1A02C84E125D4A8400E3F4BD /* Find.cpp */,
</span><span class="lines">@@ -1154,6 +1157,7 @@
</span><span class="cx">                                 297234B4173AD04800983601 /* CustomProtocolsInvalidScheme.mm in Sources */,
</span><span class="cx">                                 379028B614FABD92007E6B43 /* AcceptsFirstMouse.mm in Sources */,
</span><span class="cx">                                 291861FF17BD4DC700D4E41E /* StopLoadingFromDidFinishLoading.mm in Sources */,
</span><ins>+                                75F3134018C171B70041CAEC /* EphemeralSessionPushStateNoHistoryCallback.cpp in Sources */,
</ins><span class="cx">                                 26F1B44415CA434F00D1E4BF /* AtomicString.cpp in Sources */,
</span><span class="cx">                                 B55F11A01516834F00915916 /* AttributedString.mm in Sources */,
</span><span class="cx">                                 00CD9F6315BE312C002DA2CE /* BackForwardList.mm in Sources */,
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWebKit2EphemeralSessionPushStateNoHistoryCallbackcppfromrev166660trunkToolsTestWebKitAPITestsWebKit2PrivateBrowsingPushStateNoHistoryCallbackcpp"></a>
<div class="copfile"><h4>Copied: trunk/Tools/TestWebKitAPI/Tests/WebKit2/EphemeralSessionPushStateNoHistoryCallback.cpp (from rev 166660, trunk/Tools/TestWebKitAPI/Tests/WebKit2/PrivateBrowsingPushStateNoHistoryCallback.cpp) (0 => 166661)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WebKit2/EphemeralSessionPushStateNoHistoryCallback.cpp         (rev 0)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit2/EphemeralSessionPushStateNoHistoryCallback.cpp        2014-04-02 20:07:33 UTC (rev 166661)
</span><span class="lines">@@ -0,0 +1,78 @@
</span><ins>+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "PlatformUtilities.h"
+#include "PlatformWebView.h"
+#include "Test.h"
+#include <WebKit2/WKRetainPtr.h>
+
+namespace TestWebKitAPI {
+
+static bool testDone;
+
+static void didNavigateWithNavigationData(WKContextRef context, WKPageRef page, WKNavigationDataRef navigationData, WKFrameRef frame, const void* clientInfo)
+{
+ // This should never be called when navigating in Private Browsing.
+ FAIL();
+}
+
+static void didSameDocumentNavigationForFrame(WKPageRef page, WKFrameRef frame, WKSameDocumentNavigationType type, WKTypeRef userData, const void *clientInfo)
+{
+ testDone = true;
+}
+
+TEST(WebKit2, EphemeralSessionPushStateNoHistoryCallback)
+{
+ WKRetainPtr<WKContextRef> context(AdoptWK, WKContextCreate());
+
+ WKContextHistoryClientV0 historyClient;
+ memset(&historyClient, 0, sizeof(historyClient));
+
+ historyClient.base.version = 0;
+ historyClient.didNavigateWithNavigationData = didNavigateWithNavigationData;
+
+ WKContextSetHistoryClient(context.get(), &historyClient.base);
+
+ PlatformWebView webView(context.get());
+
+ WKPageLoaderClientV0 pageLoaderClient;
+ memset(&pageLoaderClient, 0, sizeof(pageLoaderClient));
+
+ pageLoaderClient.base.version = 0;
+ pageLoaderClient.didSameDocumentNavigationForFrame = didSameDocumentNavigationForFrame;
+
+ WKPageSetPageLoaderClient(webView.page(), &pageLoaderClient.base);
+
+ WKSessionRef session = WKSessionCreate(true);
+ WKPageSetSession(webView.page(), session);
+
+ WKRetainPtr<WKURLRef> url(AdoptWK, Util::createURLForResource("push-state", "html"));
+ WKPageLoadURL(webView.page(), url.get());
+
+ Util::run(&testDone);
+}
+
+} // namespace TestWebKitAPI
</ins></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWebKit2PrivateBrowsingPushStateNoHistoryCallbackcpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/Tests/WebKit2/PrivateBrowsingPushStateNoHistoryCallback.cpp (166660 => 166661)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WebKit2/PrivateBrowsingPushStateNoHistoryCallback.cpp        2014-04-02 19:58:44 UTC (rev 166660)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit2/PrivateBrowsingPushStateNoHistoryCallback.cpp        2014-04-02 20:07:33 UTC (rev 166661)
</span><span class="lines">@@ -31,17 +31,23 @@
</span><span class="cx">
</span><span class="cx"> namespace TestWebKitAPI {
</span><span class="cx">
</span><del>-static bool testDone;
</del><ins>+static bool didNavigate;
+static bool didSameDocumentNavigation;
</ins><span class="cx">
</span><del>-static void didNavigateWithNavigationData(WKContextRef context, WKPageRef page, WKNavigationDataRef navigationData, WKFrameRef frame, const void* clientInfo)
</del><ins>+static void didNavigateWithoutNavigationData(WKContextRef context, WKPageRef page, WKNavigationDataRef navigationData, WKFrameRef frame, const void* clientInfo)
</ins><span class="cx"> {
</span><span class="cx"> // This should never be called when navigating in Private Browsing.
</span><span class="cx"> FAIL();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+static void didNavigateWithNavigationData(WKContextRef context, WKPageRef page, WKNavigationDataRef navigationData, WKFrameRef frame, const void* clientInfo)
+{
+ didNavigate = true;
+}
+
</ins><span class="cx"> static void didSameDocumentNavigationForFrame(WKPageRef page, WKFrameRef frame, WKSameDocumentNavigationType type, WKTypeRef userData, const void *clientInfo)
</span><span class="cx"> {
</span><del>- testDone = true;
</del><ins>+ didSameDocumentNavigation = true;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> TEST(WebKit2, PrivateBrowsingPushStateNoHistoryCallback)
</span><span class="lines">@@ -52,7 +58,7 @@
</span><span class="cx"> memset(&historyClient, 0, sizeof(historyClient));
</span><span class="cx">
</span><span class="cx"> historyClient.base.version = 0;
</span><del>- historyClient.didNavigateWithNavigationData = didNavigateWithNavigationData;
</del><ins>+ historyClient.didNavigateWithNavigationData = didNavigateWithoutNavigationData;
</ins><span class="cx">
</span><span class="cx"> WKContextSetHistoryClient(context.get(), &historyClient.base);
</span><span class="cx">
</span><span class="lines">@@ -75,7 +81,16 @@
</span><span class="cx"> WKRetainPtr<WKURLRef> url(AdoptWK, Util::createURLForResource("push-state", "html"));
</span><span class="cx"> WKPageLoadURL(webView.page(), url.get());
</span><span class="cx">
</span><del>- Util::run(&testDone);
</del><ins>+ Util::run(&didSameDocumentNavigation);
+
+ WKPreferencesSetPrivateBrowsingEnabled(preferences.get(), false);
+
+ historyClient.didNavigateWithNavigationData = didNavigateWithNavigationData;
+ WKContextSetHistoryClient(context.get(), &historyClient.base);
+
+ WKPageLoadURL(webView.page(), url.get());
+
+ Util::run(&didNavigate);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace TestWebKitAPI
</span></span></pre>
</div>
</div>
</body>
</html>