Changeset 249817 in webkit
- Timestamp:
- Sep 12, 2019 3:12:25 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/platform/mac-wk2/TestExpectations
r249778 r249817 477 477 ### START OF (5) Features that are not supported when NetworkProcess is enabled (i.e. they only work on Mountain Lion, and not on newer OS versions). 478 478 479 # https://bugs.webkit.org/show_bug.cgi?id=115274480 # PPT: testRunner.setPrivateBrowsingEnabled_DEPRECATED() doesn't work with NetworkProcess481 http/tests/security/appcache-in-private-browsing.html [ Skip ]482 http/tests/security/appcache-switching-private-browsing.html [ Skip ]483 http/tests/security/cookies/first-party-cookie-allow-xslt.xml [ Skip ]484 http/tests/security/cookies/third-party-cookie-blocking-xslt.xml [ Skip ]485 http/tests/security/cross-origin-plugin-private-browsing-toggled-allowed.html [ Skip ]486 http/tests/security/cross-origin-plugin-private-browsing-toggled.html [ Skip ]487 http/tests/security/storage-blocking-loosened-private-browsing-plugin.html [ Skip ]488 http/tests/security/storage-blocking-strengthened-private-browsing-plugin.html [ Skip ]489 plugins/private-browsing-mode-2.html [ Skip ]490 storage/websql/private-browsing-noread-nowrite.html [ Skip ]491 492 479 # There is no network load scheduling or prioritization with NetworkProcess. 493 480 webkit.org/b/123431 http/tests/css/link-css-disabled-value-with-slow-loading-sheet-in-error.html [ Pass Failure ] -
trunk/LayoutTests/platform/wk2/TestExpectations
r249778 r249817 88 88 platform/mac/fast/text/attributed-substring-from-range.html 89 89 platform/mac/fast/text/justified-text-rect.html 90 91 # https://bugs.webkit.org/show_bug.cgi?id=115274 92 # testRunner.setPrivateBrowsingEnabled_DEPRECATED() doesn't work with NetworkProcess and is WebKitLegacy only. 93 http/tests/security/appcache-in-private-browsing.html [ Skip ] 94 http/tests/security/appcache-switching-private-browsing.html [ Skip ] 95 http/tests/security/cookies/first-party-cookie-allow-xslt.xml [ Skip ] 96 http/tests/security/cookies/third-party-cookie-blocking-xslt.xml [ Skip ] 97 http/tests/security/cross-origin-plugin-private-browsing-toggled-allowed.html [ Skip ] 98 http/tests/security/cross-origin-plugin-private-browsing-toggled.html [ Skip ] 99 http/tests/security/storage-blocking-loosened-private-browsing-plugin.html [ Skip ] 100 http/tests/security/storage-blocking-strengthened-private-browsing-plugin.html [ Skip ] 101 plugins/private-browsing-mode-2.html [ Skip ] 102 storage/websql/private-browsing-noread-nowrite.html [ Skip ] 90 103 91 104 # [WebKit2] WebKitTestRunner doesn't support emulating pressing a tab key during IME composition -
trunk/Source/WebCore/ChangeLog
r249816 r249817 1 2019-09-12 Chris Dumez <cdumez@apple.com> 2 3 [WKTR] Drop TestRunner.setPrivateBrowsingEnabled_DEPRECATED() 4 https://bugs.webkit.org/show_bug.cgi?id=201546 5 6 Reviewed by Alex Christensen. 7 8 Drop TestRunner.setPrivateBrowsingEnabled_DEPRECATED() from WebKitTestRunner as it does not do 9 the right thing for WebKit2 and tests have been rewritten to not use it. 10 11 * page/PageGroup.cpp: 12 (WebCore::PageGroup::addPage): 13 (WebCore::PageGroup::setSessionIDForTesting): Deleted. 14 * page/PageGroup.h: 15 (): Deleted. 16 1 17 2019-09-12 Saam Barati <sbarati@apple.com> 2 18 -
trunk/Source/WebCore/page/PageGroup.cpp
r249575 r249817 94 94 ASSERT(!m_pages.contains(&page)); 95 95 m_pages.add(&page); 96 97 if (m_isLegacyPrivateBrowsingEnabledForTesting)98 page.setSessionID(PAL::SessionID::legacyPrivateSessionID());99 96 } 100 97 … … 127 124 #endif 128 125 129 void PageGroup::setSessionIDForTesting(const PAL::SessionID& sessionID)130 {131 bool legacyPrivate = sessionID == PAL::SessionID::legacyPrivateSessionID();132 if (m_isLegacyPrivateBrowsingEnabledForTesting == legacyPrivate)133 return;134 135 m_isLegacyPrivateBrowsingEnabledForTesting = legacyPrivate;136 137 for (auto* page : m_pages)138 page->setSessionID(sessionID);139 }140 141 126 } // namespace WebCore -
trunk/Source/WebCore/page/PageGroup.h
r249575 r249817 63 63 #endif 64 64 65 WEBCORE_EXPORT void setSessionIDForTesting(const PAL::SessionID&);66 67 65 private: 68 66 String m_name; … … 74 72 std::unique_ptr<CaptionUserPreferences> m_captionPreferences; 75 73 #endif 76 77 bool m_isLegacyPrivateBrowsingEnabledForTesting { false };78 74 }; 79 75 -
trunk/Source/WebKit/ChangeLog
r249815 r249817 1 2019-09-12 Chris Dumez <cdumez@apple.com> 2 3 [WKTR] Drop TestRunner.setPrivateBrowsingEnabled_DEPRECATED() 4 https://bugs.webkit.org/show_bug.cgi?id=201546 5 6 Reviewed by Alex Christensen. 7 8 Drop TestRunner.setPrivateBrowsingEnabled_DEPRECATED() from WebKitTestRunner as it does not do 9 the right thing for WebKit2 and tests have been rewritten to not use it. 10 11 * NetworkProcess/NetworkConnectionToWebProcess.cpp: 12 (WebKit::NetworkConnectionToWebProcess::ensureLegacyPrivateBrowsingSession): Deleted. 13 * NetworkProcess/NetworkConnectionToWebProcess.h: 14 * NetworkProcess/NetworkConnectionToWebProcess.messages.in: 15 * WebProcess/InjectedBundle/API/c/WKBundle.cpp: 16 (WKBundleSetPrivateBrowsingEnabled): Deleted. 17 * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: 18 * WebProcess/InjectedBundle/InjectedBundle.cpp: 19 (WebKit::InjectedBundle::setPrivateBrowsingEnabled): Deleted. 20 * WebProcess/InjectedBundle/InjectedBundle.h: 21 * WebProcess/WebProcess.cpp: 22 (WebKit::WebProcess::ensureLegacyPrivateBrowsingSessionInNetworkProcess): Deleted. 23 * WebProcess/WebProcess.h: 24 * WebProcess/WebStorage/StorageNamespaceImpl.cpp: 25 (WebKit::StorageNamespaceImpl::setSessionIDForTesting): 26 1 27 2019-09-12 Adrian Perez de Castro <aperez@igalia.com> 2 28 -
trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp
r249801 r249817 680 680 } 681 681 682 void NetworkConnectionToWebProcess::ensureLegacyPrivateBrowsingSession()683 {684 m_networkProcess->addWebsiteDataStore(WebsiteDataStoreParameters::legacyPrivateSessionParameters());685 }686 687 682 #if ENABLE(RESOURCE_LOAD_STATISTICS) 688 683 void NetworkConnectionToWebProcess::removeStorageAccessForFrame(PAL::SessionID sessionID, FrameIdentifier frameID, PageIdentifier pageID) -
trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h
r249801 r249817 202 202 void createSocketChannel(PAL::SessionID, const WebCore::ResourceRequest&, const String& protocol, uint64_t identifier); 203 203 204 void ensureLegacyPrivateBrowsingSession();205 206 204 #if ENABLE(INDEXED_DATABASE) 207 205 // Messages handlers (Modern IDB). -
trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in
r249801 r249817 56 56 CreateSocketChannel(PAL::SessionID sessionID, WebCore::ResourceRequest request, String protocol, uint64_t identifier) 57 57 58 EnsureLegacyPrivateBrowsingSession()59 60 58 #if ENABLE(RESOURCE_LOAD_STATISTICS) 61 59 RemoveStorageAccessForFrame(PAL::SessionID sessionID, WebCore::FrameIdentifier frameID, WebCore::PageIdentifier pageID); -
trunk/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundle.cpp
r249702 r249817 167 167 } 168 168 169 void WKBundleSetPrivateBrowsingEnabled(WKBundleRef bundleRef, WKBundlePageGroupRef pageGroupRef, WKBundlePageRef pageRef, bool enabled)170 {171 WebKit::toImpl(bundleRef)->setPrivateBrowsingEnabled(WebKit::toImpl(pageGroupRef), WebKit::toImpl(pageRef), enabled);172 }173 174 169 void WKBundleSetPopupBlockingEnabled(WKBundleRef bundleRef, WKBundlePageGroupRef pageGroupRef, bool enabled) 175 170 { -
trunk/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h
r249702 r249817 50 50 WK_EXPORT void WKBundleSetFrameFlatteningEnabled(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled); 51 51 WK_EXPORT void WKBundleSetJavaScriptCanAccessClipboard(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled); 52 WK_EXPORT void WKBundleSetPrivateBrowsingEnabled(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, WKBundlePageRef pageRef, bool enabled);53 52 WK_EXPORT void WKBundleSetPopupBlockingEnabled(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled); 54 53 WK_EXPORT void WKBundleSetAuthorAndUserStylesEnabled(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled); -
trunk/Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp
r249575 r249817 347 347 } 348 348 349 void InjectedBundle::setPrivateBrowsingEnabled(WebPageGroupProxy* pageGroup, WebPage* page, bool enabled)350 {351 ASSERT(!hasProcessPrivilege(ProcessPrivilege::CanAccessRawCookies));352 353 PAL::SessionID newSessionID = PAL::SessionID::legacyPrivateSessionID();354 if (enabled) {355 auto currentSessionID = page->corePage()->sessionID();356 if (currentSessionID == PAL::SessionID::legacyPrivateSessionID())357 return;358 m_initialSessionID = currentSessionID;359 WebProcess::singleton().ensureLegacyPrivateBrowsingSessionInNetworkProcess();360 } else {361 if (!m_initialSessionID)362 return;363 newSessionID = *std::exchange(m_initialSessionID, WTF::nullopt);364 }365 366 PageGroup::pageGroup(pageGroup->identifier())->setSessionIDForTesting(newSessionID);367 368 auto webStorageNameSpaceProvider = WebStorageNamespaceProvider::getOrCreate(*pageGroup);369 webStorageNameSpaceProvider->setSessionIDForTesting(newSessionID);370 }371 372 349 void InjectedBundle::setPopupBlockingEnabled(WebPageGroupProxy* pageGroup, bool enabled) 373 350 { -
trunk/Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.h
r249575 r249817 106 106 void setPluginsEnabled(WebPageGroupProxy*, bool); 107 107 void setJavaScriptCanAccessClipboard(WebPageGroupProxy*, bool); 108 void setPrivateBrowsingEnabled(WebPageGroupProxy*, WebPage*, bool);109 108 void setPopupBlockingEnabled(WebPageGroupProxy*, bool); 110 109 void setAuthorAndUserStylesEnabled(WebPageGroupProxy*, bool); … … 175 174 std::unique_ptr<API::InjectedBundle::Client> m_client; 176 175 177 Optional<PAL::SessionID> m_initialSessionID;178 179 176 #if PLATFORM(COCOA) 180 177 RetainPtr<WKWebProcessBundleParameters> m_bundleParameters; -
trunk/Source/WebKit/WebProcess/WebProcess.cpp
r249801 r249817 600 600 } 601 601 602 void WebProcess::ensureLegacyPrivateBrowsingSessionInNetworkProcess()603 {604 ensureNetworkProcessConnection().connection().send(Messages::NetworkConnectionToWebProcess::EnsureLegacyPrivateBrowsingSession(), 0);605 }606 607 602 #if ENABLE(NETSCAPE_PLUGIN_API) 608 603 PluginProcessConnectionManager& WebProcess::pluginProcessConnectionManager() -
trunk/Source/WebKit/WebProcess/WebProcess.h
r249801 r249817 208 208 void setCacheModel(CacheModel); 209 209 210 void ensureLegacyPrivateBrowsingSessionInNetworkProcess();211 212 210 void pageDidEnterWindow(WebCore::PageIdentifier); 213 211 void pageWillLeaveWindow(WebCore::PageIdentifier); -
trunk/Source/WebKit/WebProcess/WebStorage/StorageNamespaceImpl.cpp
r249435 r249817 123 123 } 124 124 125 void StorageNamespaceImpl::setSessionIDForTesting(PAL::SessionID sessionID)125 void StorageNamespaceImpl::setSessionIDForTesting(PAL::SessionID) 126 126 { 127 m_sessionID = sessionID; 128 for (auto storageAreaMap : m_storageAreaMaps.values()) 129 storageAreaMap->disconnect(); 127 ASSERT_NOT_REACHED(); 130 128 } 131 129 -
trunk/Tools/ChangeLog
r249812 r249817 1 2019-09-12 Chris Dumez <cdumez@apple.com> 2 3 [WKTR] Drop TestRunner.setPrivateBrowsingEnabled_DEPRECATED() 4 https://bugs.webkit.org/show_bug.cgi?id=201546 5 6 Reviewed by Alex Christensen. 7 8 Drop TestRunner.setPrivateBrowsingEnabled_DEPRECATED() from WebKitTestRunner as it does not do 9 the right thing for WebKit2 and tests have been rewritten to not use it. 10 11 * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: 12 * WebKitTestRunner/InjectedBundle/TestRunner.cpp: 13 (WTR::TestRunner::setPrivateBrowsingEnabled_DEPRECATED): Deleted. 14 * WebKitTestRunner/InjectedBundle/TestRunner.h: 15 1 16 2019-09-12 Brady Eidson <beidson@apple.com> 2 17 -
trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl
r249702 r249817 105 105 void setIgnoresViewportScaleLimits(boolean value); 106 106 void setShouldDownloadUndisplayableMIMETypes(boolean value); 107 108 // DEPRECATED: Use <!-- webkit-test-runner [ useEphemeralSession=true ] --> instead, or109 // testRunner.setShouldSwapToEphemeralSessionOnNextNavigation() / testRunner.setShouldSwapToDefaultSessionOnNextNavigation().110 void setPrivateBrowsingEnabled_DEPRECATED(boolean value);111 107 112 108 // Special DOM functions. -
trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp
r249702 r249817 498 498 WKBundleSetAllowUniversalAccessFromFileURLs(m_bundle, m_pageGroup, true); 499 499 WKBundleSetJavaScriptCanAccessClipboard(m_bundle, m_pageGroup, true); 500 WKBundleSetPrivateBrowsingEnabled(m_bundle, m_pageGroup, page()->page(), false);501 500 WKBundleSetAuthorAndUserStylesEnabled(m_bundle, m_pageGroup, true); 502 501 WKBundleSetFrameFlatteningEnabled(m_bundle, m_pageGroup, false); -
trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp
r249702 r249817 550 550 } 551 551 552 void TestRunner::setPrivateBrowsingEnabled_DEPRECATED(bool enabled)553 {554 auto& injectedBundle = InjectedBundle::singleton();555 WKBundleSetPrivateBrowsingEnabled(injectedBundle.bundle(), injectedBundle.pageGroup(), injectedBundle.page()->page(), enabled);556 }557 558 552 void TestRunner::setPopupBlockingEnabled(bool enabled) 559 553 { -
trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h
r249702 r249817 113 113 void setPluginsEnabled(bool); 114 114 void setJavaScriptCanAccessClipboard(bool); 115 void setPrivateBrowsingEnabled_DEPRECATED(bool);116 115 void setPopupBlockingEnabled(bool); 117 116 void setAuthorAndUserStylesEnabled(bool);
Note: See TracChangeset
for help on using the changeset viewer.