Diff
Modified: trunk/LayoutTests/ChangeLog (236562 => 236563)
--- trunk/LayoutTests/ChangeLog 2018-09-27 19:00:13 UTC (rev 236562)
+++ trunk/LayoutTests/ChangeLog 2018-09-27 19:40:16 UTC (rev 236563)
@@ -1,3 +1,24 @@
+2018-09-27 John Wilander <[email protected]>
+
+ Resource Load Statistics: Remove temporary compatibility fix for auto-dismiss popups
+ https://bugs.webkit.org/show_bug.cgi?id=189980
+ <rdar://problem/44780645>
+
+ Reviewed by Alex Christensen.
+
+ This test was for the temporary compatibility fix in:
+ https://bugs.webkit.org/show_bug.cgi?id=183620. This change makes it into a
+ test that the compatibility fix is no longer there.
+
+ * http/tests/storageAccess/deny-storage-access-under-opener-if-auto-dismiss-expected.txt: Renamed from LayoutTests/http/tests/storageAccess/grant-storage-access-under-opener-expected.txt.
+ * http/tests/storageAccess/deny-storage-access-under-opener-if-auto-dismiss.html: Renamed from LayoutTests/http/tests/storageAccess/grant-storage-access-under-opener.html.
+ * platform/ios-wk2/TestExpectations:
+ Removed comment and entry since https://bugs.webkit.org/show_bug.cgi?id=183714 was fixed long ago.
+ * platform/ios/TestExpectations:
+ Changed test name.
+ * platform/mac-wk2/TestExpectations:
+ Changed test name.
+
2018-09-27 Ryan Haddad <[email protected]>
Unreviewed, rolling out r236557.
Copied: trunk/LayoutTests/http/tests/storageAccess/deny-storage-access-under-opener-if-auto-dismiss-expected.txt (from rev 236562, trunk/LayoutTests/http/tests/storageAccess/grant-storage-access-under-opener-expected.txt) (0 => 236563)
--- trunk/LayoutTests/http/tests/storageAccess/deny-storage-access-under-opener-if-auto-dismiss-expected.txt (rev 0)
+++ trunk/LayoutTests/http/tests/storageAccess/deny-storage-access-under-opener-if-auto-dismiss-expected.txt 2018-09-27 19:40:16 UTC (rev 236563)
@@ -0,0 +1,18 @@
+Tests that a cross-origin window from a prevalent domain with non-recent user interaction doesn't get storage access under its opener if it just loads and auto-dismisses.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS Cookie created.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
+
+--------
+Frame: '<!--frame1-->'
+--------
+Should not receive first-party cookie.
+Did not receive cookie named 'firstPartyCookie'.
+Did not receive cookie named ''.
+Client-side document.cookie:
Copied: trunk/LayoutTests/http/tests/storageAccess/deny-storage-access-under-opener-if-auto-dismiss.html (from rev 236562, trunk/LayoutTests/http/tests/storageAccess/grant-storage-access-under-opener.html) (0 => 236563)
--- trunk/LayoutTests/http/tests/storageAccess/deny-storage-access-under-opener-if-auto-dismiss.html (rev 0)
+++ trunk/LayoutTests/http/tests/storageAccess/deny-storage-access-under-opener-if-auto-dismiss.html 2018-09-27 19:40:16 UTC (rev 236563)
@@ -0,0 +1,69 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <script src=""
+ <script src=""
+</head>
+<body _onload_="run()">
+<script>
+ description("Tests that a cross-origin window from a prevalent domain with non-recent user interaction doesn't get storage access under its opener if it just loads and auto-dismisses.");
+ jsTestIsAsync = true;
+
+ function finishTest() {
+ setEnableFeature(false, finishJSTest);
+ }
+
+ function openIframe(url, onLoadHandler) {
+ const element = document.createElement("iframe");
+ element.src = ""
+ if (onLoadHandler) {
+ element._onload_ = onLoadHandler;
+ }
+ document.body.appendChild(element);
+ }
+
+ function receiveMessage(event) {
+ if (event.origin === "http://localhost:8000") {
+ if (event.data.indexOf("PASS") !== -1)
+ testPassed(event.data.replace("PASS ", ""));
+ else
+ testFailed(event.data);
+ } else
+ testFailed("Received a message from an unexpected origin: " + event.origin);
+
+ newWin.close();
+ openIframe(thirdPartyBaseUrl + subPathToGetCookies + "&message=Should not receive first-party cookie.", finishTest);
+ }
+
+ const thirdPartyOrigin = "http://localhost:8000";
+ const resourcePath = "/storageAccess/resources";
+ const thirdPartyBaseUrl = thirdPartyOrigin + resourcePath;
+ const firstPartyCookieName = "firstPartyCookie";
+ const subPathToGetCookies = "/get-cookies.php?name1=" + firstPartyCookieName;
+ var newWin;
+
+ function run() {
+ setEnableFeature(true, function() {
+ window.addEventListener("message", receiveMessage, false);
+
+ testRunner.setCanOpenWindows();
+
+ testRunner.setStatisticsPrevalentResource(thirdPartyOrigin, true, function() {
+ if (!testRunner.isStatisticsPrevalentResource(thirdPartyOrigin))
+ testFailed("Host did not get set as prevalent resource.");
+ testRunner.setStatisticsHasHadUserInteraction(thirdPartyOrigin, true, function() {
+ if (!testRunner.isStatisticsHasHadUserInteraction(thirdPartyOrigin))
+ testFailed("Host did not get logged for user interaction.");
+ testRunner.dumpChildFramesAsText();
+ testRunner.setCloseRemainingWindowsWhenComplete(true);
+
+ testRunner.statisticsUpdateCookieBlocking(function () {
+ newWin = window.open(thirdPartyOrigin + "/storageAccess/resources/set-cookie-and-report-back.html", "testWindow");
+ });
+ });
+ });
+ });
+ }
+</script>
+</body>
+</html>
\ No newline at end of file
Deleted: trunk/LayoutTests/http/tests/storageAccess/grant-storage-access-under-opener-expected.txt (236562 => 236563)
--- trunk/LayoutTests/http/tests/storageAccess/grant-storage-access-under-opener-expected.txt 2018-09-27 19:00:13 UTC (rev 236562)
+++ trunk/LayoutTests/http/tests/storageAccess/grant-storage-access-under-opener-expected.txt 2018-09-27 19:40:16 UTC (rev 236563)
@@ -1,18 +0,0 @@
-Tests that a cross-origin window from a prevalent domain with non-recent user interaction gets immediate storage access under its opener.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS Cookie created.
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
-
---------
-Frame: '<!--frame1-->'
---------
-Should receive first-party cookie.
-Received cookie named 'firstPartyCookie'.
-Did not receive cookie named ''.
-Client-side document.cookie: firstPartyCookie=value
Deleted: trunk/LayoutTests/http/tests/storageAccess/grant-storage-access-under-opener.html (236562 => 236563)
--- trunk/LayoutTests/http/tests/storageAccess/grant-storage-access-under-opener.html 2018-09-27 19:00:13 UTC (rev 236562)
+++ trunk/LayoutTests/http/tests/storageAccess/grant-storage-access-under-opener.html 2018-09-27 19:40:16 UTC (rev 236563)
@@ -1,69 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <script src=""
- <script src=""
-</head>
-<body _onload_="run()">
-<script>
- description("Tests that a cross-origin window from a prevalent domain with non-recent user interaction gets immediate storage access under its opener.");
- jsTestIsAsync = true;
-
- function finishTest() {
- setEnableFeature(false, finishJSTest);
- }
-
- function openIframe(url, onLoadHandler) {
- const element = document.createElement("iframe");
- element.src = ""
- if (onLoadHandler) {
- element._onload_ = onLoadHandler;
- }
- document.body.appendChild(element);
- }
-
- function receiveMessage(event) {
- if (event.origin === "http://localhost:8000") {
- if (event.data.indexOf("PASS") !== -1)
- testPassed(event.data.replace("PASS ", ""));
- else
- testFailed(event.data);
- } else
- testFailed("Received a message from an unexpected origin: " + event.origin);
-
- newWin.close();
- openIframe(thirdPartyBaseUrl + subPathToGetCookies + "&message=Should receive first-party cookie.", finishTest);
- }
-
- const thirdPartyOrigin = "http://localhost:8000";
- const resourcePath = "/storageAccess/resources";
- const thirdPartyBaseUrl = thirdPartyOrigin + resourcePath;
- const firstPartyCookieName = "firstPartyCookie";
- const subPathToGetCookies = "/get-cookies.php?name1=" + firstPartyCookieName;
- var newWin;
-
- function run() {
- setEnableFeature(true, function() {
- window.addEventListener("message", receiveMessage, false);
-
- testRunner.setCanOpenWindows();
-
- testRunner.setStatisticsPrevalentResource(thirdPartyOrigin, true, function() {
- if (!testRunner.isStatisticsPrevalentResource(thirdPartyOrigin))
- testFailed("Host did not get set as prevalent resource.");
- testRunner.setStatisticsHasHadUserInteraction(thirdPartyOrigin, true, function() {
- if (!testRunner.isStatisticsHasHadUserInteraction(thirdPartyOrigin))
- testFailed("Host did not get logged for user interaction.");
- testRunner.dumpChildFramesAsText();
- testRunner.setCloseRemainingWindowsWhenComplete(true);
-
- testRunner.statisticsUpdateCookieBlocking(function () {
- newWin = window.open(thirdPartyOrigin + "/storageAccess/resources/set-cookie-and-report-back.html", "testWindow");
- });
- });
- });
- });
- }
-</script>
-</body>
-</html>
\ No newline at end of file
Modified: trunk/LayoutTests/platform/ios/TestExpectations (236562 => 236563)
--- trunk/LayoutTests/platform/ios/TestExpectations 2018-09-27 19:00:13 UTC (rev 236562)
+++ trunk/LayoutTests/platform/ios/TestExpectations 2018-09-27 19:40:16 UTC (rev 236563)
@@ -2820,7 +2820,7 @@
http/tests/resourceLoadStatistics/strip-referrer-to-origin-for-prevalent-subresource-redirects.html [ Pass ]
http/tests/resourceLoadStatistics/strip-referrer-to-origin-for-prevalent-subresource-requests.html [ Pass ]
http/tests/storageAccess/deny-storage-access-under-opener.html [ Pass ]
-http/tests/storageAccess/grant-storage-access-under-opener.html [ Pass ]
+http/tests/storageAccess/deny-storage-access-under-opener-if-auto-dismiss.html [ Pass ]
http/tests/resourceLoadStatistics/cap-cache-max-age-for-prevalent-resource.html [ Pass ]
http/tests/cookies/capped-lifetime-for-cookie-set-in-js.html [ Pass ]
Modified: trunk/LayoutTests/platform/ios-wk2/TestExpectations (236562 => 236563)
--- trunk/LayoutTests/platform/ios-wk2/TestExpectations 2018-09-27 19:00:13 UTC (rev 236562)
+++ trunk/LayoutTests/platform/ios-wk2/TestExpectations 2018-09-27 19:40:16 UTC (rev 236563)
@@ -1255,9 +1255,6 @@
webkit.org/b/182144 [ Debug ] webgl/1.0.3/conformance/rendering/many-draw-calls.html [ Skip ]
-# This is marked as Pass to see if additional logging can reveal the cause of the flakiness.
-webkit.org/b/183714 [ Debug ] http/tests/storageAccess/grant-storage-access-under-opener.html [ Pass ]
-
webkit.org/b/183860 http/wpt/service-workers/third-party-registration.html [ Pass Timeout ]
webkit.org/b/184245 http/tests/workers/service/service-worker-cache-api.https.html [ Pass Failure ]
Modified: trunk/LayoutTests/platform/mac-wk2/TestExpectations (236562 => 236563)
--- trunk/LayoutTests/platform/mac-wk2/TestExpectations 2018-09-27 19:00:13 UTC (rev 236562)
+++ trunk/LayoutTests/platform/mac-wk2/TestExpectations 2018-09-27 19:40:16 UTC (rev 236563)
@@ -712,7 +712,7 @@
[ HighSierra+ ] http/tests/storageAccess/request-and-grant-access-then-navigate-cross-site-should-not-have-access.html [ Pass ]
[ HighSierra+ ] http/tests/storageAccess/request-and-grant-access-then-navigate-same-site-should-have-access.html [ Pass ]
[ HighSierra+ ] http/tests/storageAccess/deny-storage-access-under-opener.html [ Pass ]
-[ HighSierra+ ] http/tests/storageAccess/grant-storage-access-under-opener.html [ Pass ]
+[ HighSierra+ ] http/tests/storageAccess/deny-storage-access-under-opener-if-auto-dismiss.html [ Pass ]
# As of https://trac.webkit.org/changeset/227762 the timestampResolution is just 5 seconds which makes this test flaky
http/tests/resourceLoadStatistics/user-interaction-only-reported-once-within-short-period-of-time.html [ Skip ]
Modified: trunk/Source/WebCore/ChangeLog (236562 => 236563)
--- trunk/Source/WebCore/ChangeLog 2018-09-27 19:00:13 UTC (rev 236562)
+++ trunk/Source/WebCore/ChangeLog 2018-09-27 19:40:16 UTC (rev 236563)
@@ -1,3 +1,30 @@
+2018-09-27 John Wilander <[email protected]>
+
+ Resource Load Statistics: Remove temporary compatibility fix for auto-dismiss popups
+ https://bugs.webkit.org/show_bug.cgi?id=189980
+ <rdar://problem/44780645>
+
+ Reviewed by Alex Christensen.
+
+ Test: http/tests/storageAccess/deny-storage-access-under-opener-if-auto-dismiss.html
+
+ The change in https://bugs.webkit.org/show_bug.cgi?id=183620 was a temporary
+ compatibility fix as explained in:
+ https://webkit.org/blog/8311/intelligent-tracking-prevention-2-0/. We should
+ remove it.
+
+ Most of these changes remove the parameter isTriggeredByUserGesture since it's no longer needed.
+
+ * loader/ResourceLoadObserver.cpp:
+ (WebCore::ResourceLoadObserver::setRequestStorageAccessUnderOpenerCallback):
+ (WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):
+ (WebCore::ResourceLoadObserver::requestStorageAccessUnderOpener):
+ (WebCore::ResourceLoadObserver::logWindowCreation): Deleted.
+ * loader/ResourceLoadObserver.h:
+ * page/DOMWindow.cpp:
+ (WebCore::DOMWindow::createWindow):
+ Now no longer logs anything to ResourceLoadObserver.
+
2018-09-27 Ryan Haddad <[email protected]>
Unreviewed, rolling out r236557.
Modified: trunk/Source/WebCore/loader/ResourceLoadObserver.cpp (236562 => 236563)
--- trunk/Source/WebCore/loader/ResourceLoadObserver.cpp 2018-09-27 19:00:13 UTC (rev 236562)
+++ trunk/Source/WebCore/loader/ResourceLoadObserver.cpp 2018-09-27 19:40:16 UTC (rev 236563)
@@ -63,7 +63,7 @@
m_notificationCallback = WTFMove(notificationCallback);
}
-void ResourceLoadObserver::setRequestStorageAccessUnderOpenerCallback(WTF::Function<void(const String& domainInNeedOfStorageAccess, uint64_t openerPageID, const String& openerDomain, bool isTriggeredByUserGesture)>&& callback)
+void ResourceLoadObserver::setRequestStorageAccessUnderOpenerCallback(WTF::Function<void(const String& domainInNeedOfStorageAccess, uint64_t openerPageID, const String& openerDomain)>&& callback)
{
ASSERT(!m_requestStorageAccessUnderOpenerCallback);
m_requestStorageAccessUnderOpenerCallback = WTFMove(callback);
@@ -184,7 +184,7 @@
if (auto* openerDocument = opener->document()) {
if (auto* openerFrame = openerDocument->frame()) {
if (auto openerPageID = openerFrame->loader().client().pageID()) {
- requestStorageAccessUnderOpener(domain, openerPageID.value(), *openerDocument, true);
+ requestStorageAccessUnderOpener(domain, openerPageID.value(), *openerDocument);
}
}
}
@@ -216,19 +216,8 @@
#endif
}
-void ResourceLoadObserver::logWindowCreation(const URL& popupUrl, uint64_t openerPageID, Document& openerDocument)
-{
#if ENABLE(RESOURCE_LOAD_STATISTICS)
- requestStorageAccessUnderOpener(primaryDomain(popupUrl), openerPageID, openerDocument, false);
-#else
- UNUSED_PARAM(popupUrl);
- UNUSED_PARAM(openerPageID);
- UNUSED_PARAM(openerDocument);
-#endif
-}
-
-#if ENABLE(RESOURCE_LOAD_STATISTICS)
-void ResourceLoadObserver::requestStorageAccessUnderOpener(const String& domainInNeedOfStorageAccess, uint64_t openerPageID, Document& openerDocument, bool isTriggeredByUserGesture)
+void ResourceLoadObserver::requestStorageAccessUnderOpener(const String& domainInNeedOfStorageAccess, uint64_t openerPageID, Document& openerDocument)
{
auto openerUrl = openerDocument.url();
auto openerPrimaryDomain = primaryDomain(openerUrl);
@@ -235,10 +224,9 @@
if (domainInNeedOfStorageAccess != openerPrimaryDomain
&& !openerDocument.hasRequestedPageSpecificStorageAccessWithUserInteraction(domainInNeedOfStorageAccess)
&& !equalIgnoringASCIICase(openerUrl.string(), blankURL())) {
- m_requestStorageAccessUnderOpenerCallback(domainInNeedOfStorageAccess, openerPageID, openerPrimaryDomain, isTriggeredByUserGesture);
+ m_requestStorageAccessUnderOpenerCallback(domainInNeedOfStorageAccess, openerPageID, openerPrimaryDomain);
// Remember user interaction-based requests since they don't need to be repeated.
- if (isTriggeredByUserGesture)
- openerDocument.setHasRequestedPageSpecificStorageAccessWithUserInteraction(domainInNeedOfStorageAccess);
+ openerDocument.setHasRequestedPageSpecificStorageAccessWithUserInteraction(domainInNeedOfStorageAccess);
}
}
#endif
Modified: trunk/Source/WebCore/loader/ResourceLoadObserver.h (236562 => 236563)
--- trunk/Source/WebCore/loader/ResourceLoadObserver.h 2018-09-27 19:00:13 UTC (rev 236562)
+++ trunk/Source/WebCore/loader/ResourceLoadObserver.h 2018-09-27 19:40:16 UTC (rev 236563)
@@ -59,7 +59,6 @@
void logSubresourceLoading(const Frame*, const ResourceRequest& newRequest, const ResourceResponse& redirectResponse);
void logWebSocketLoading(const URL& targetURL, const URL& mainFrameURL, bool usesEphemeralSession);
void logUserInteractionWithReducedTimeResolution(const Document&);
- void logWindowCreation(const URL& popupUrl, uint64_t openerPageID, Document& openerDocument);
void logFontLoad(const Document&, const String& familyName, bool loadStatus);
void logCanvasRead(const Document&);
@@ -70,7 +69,7 @@
WEBCORE_EXPORT String statisticsForOrigin(const String&);
WEBCORE_EXPORT void setNotificationCallback(WTF::Function<void (Vector<ResourceLoadStatistics>&&)>&&);
- WEBCORE_EXPORT void setRequestStorageAccessUnderOpenerCallback(WTF::Function<void(const String&, uint64_t, const String&, bool)>&&);
+ WEBCORE_EXPORT void setRequestStorageAccessUnderOpenerCallback(WTF::Function<void(const String&, uint64_t, const String&)>&&);
WEBCORE_EXPORT void notifyObserver();
WEBCORE_EXPORT void clearState();
@@ -90,13 +89,13 @@
Vector<ResourceLoadStatistics> takeStatistics();
#if ENABLE(RESOURCE_LOAD_STATISTICS)
- void requestStorageAccessUnderOpener(const String& domainInNeedOfStorageAccess, uint64_t openerPageID, Document& openerDocument, bool isTriggeredByUserGesture);
+ void requestStorageAccessUnderOpener(const String& domainInNeedOfStorageAccess, uint64_t openerPageID, Document& openerDocument);
#endif
HashMap<String, ResourceLoadStatistics> m_resourceStatisticsMap;
HashMap<String, WTF::WallTime> m_lastReportedUserInteractionMap;
WTF::Function<void (Vector<ResourceLoadStatistics>&&)> m_notificationCallback;
- WTF::Function<void(const String&, uint64_t, const String&, bool)> m_requestStorageAccessUnderOpenerCallback;
+ WTF::Function<void(const String&, uint64_t, const String&)> m_requestStorageAccessUnderOpenerCallback;
Timer m_notificationTimer;
#if ENABLE(RESOURCE_LOAD_STATISTICS) && !RELEASE_LOG_DISABLED
uint64_t m_loggingCounter { 0 };
Modified: trunk/Source/WebCore/page/DOMWindow.cpp (236562 => 236563)
--- trunk/Source/WebCore/page/DOMWindow.cpp 2018-09-27 19:00:13 UTC (rev 236562)
+++ trunk/Source/WebCore/page/DOMWindow.cpp 2018-09-27 19:40:16 UTC (rev 236563)
@@ -2283,13 +2283,6 @@
FrameLoader::addSameSiteInfoToRequestIfNeeded(resourceRequest, openerFrame.document());
FrameLoadRequest frameLoadRequest { *activeWindow.document(), activeWindow.document()->securityOrigin(), resourceRequest, "_self"_s, LockHistory::No, LockBackForwardList::No, MaybeSendReferrer, AllowNavigationToInvalidURL::Yes, NewFrameOpenerPolicy::Allow, activeDocument->shouldOpenExternalURLsPolicyToPropagate(), initiatedByMainFrame };
newFrame->loader().changeLocation(WTFMove(frameLoadRequest));
-
-#if ENABLE(RESOURCE_LOAD_STATISTICS)
- if (auto openerDocument = openerFrame.document()) {
- if (auto openerPageID = openerFrame.loader().client().pageID())
- ResourceLoadObserver::shared().logWindowCreation(completedURL, openerPageID.value(), *openerDocument);
- }
-#endif
} else if (!urlString.isEmpty()) {
LockHistory lockHistory = UserGestureIndicator::processingUserGesture() ? LockHistory::No : LockHistory::Yes;
newFrame->navigationScheduler().scheduleLocationChange(*activeDocument, activeDocument->securityOrigin(), completedURL, referrer, lockHistory, LockBackForwardList::No);
Modified: trunk/Source/WebKit/ChangeLog (236562 => 236563)
--- trunk/Source/WebKit/ChangeLog 2018-09-27 19:00:13 UTC (rev 236562)
+++ trunk/Source/WebKit/ChangeLog 2018-09-27 19:40:16 UTC (rev 236563)
@@ -1,3 +1,28 @@
+2018-09-27 John Wilander <[email protected]>
+
+ Resource Load Statistics: Remove temporary compatibility fix for auto-dismiss popups
+ https://bugs.webkit.org/show_bug.cgi?id=189980
+ <rdar://problem/44780645>
+
+ Reviewed by Alex Christensen.
+
+ The change in https://bugs.webkit.org/show_bug.cgi?id=183620 was a temporary
+ compatibility fix as explained in:
+ https://webkit.org/blog/8311/intelligent-tracking-prevention-2-0/. We should
+ remove it.
+
+ These changes remove the parameter isTriggeredByUserGesture since it's no longer needed.
+
+ * UIProcess/ResourceLoadStatisticsMemoryStore.cpp:
+ (WebKit::ResourceLoadStatisticsMemoryStore::requestStorageAccessUnderOpener):
+ * UIProcess/ResourceLoadStatisticsMemoryStore.h:
+ * UIProcess/WebResourceLoadStatisticsStore.cpp:
+ (WebKit::WebResourceLoadStatisticsStore::requestStorageAccessUnderOpener):
+ * UIProcess/WebResourceLoadStatisticsStore.h:
+ * UIProcess/WebResourceLoadStatisticsStore.messages.in:
+ * WebProcess/WebProcess.cpp:
+ (WebKit::WebProcess::WebProcess):
+
2018-09-27 Ryan Haddad <[email protected]>
Unreviewed, rolling out r236557.
Modified: trunk/Source/WebKit/UIProcess/ResourceLoadStatisticsMemoryStore.cpp (236562 => 236563)
--- trunk/Source/WebKit/UIProcess/ResourceLoadStatisticsMemoryStore.cpp 2018-09-27 19:00:13 UTC (rev 236562)
+++ trunk/Source/WebKit/UIProcess/ResourceLoadStatisticsMemoryStore.cpp 2018-09-27 19:40:16 UTC (rev 236563)
@@ -428,7 +428,7 @@
});
}
-void ResourceLoadStatisticsMemoryStore::requestStorageAccessUnderOpener(String&& primaryDomainInNeedOfStorageAccess, uint64_t openerPageID, String&& openerPrimaryDomain, bool isTriggeredByUserGesture)
+void ResourceLoadStatisticsMemoryStore::requestStorageAccessUnderOpener(String&& primaryDomainInNeedOfStorageAccess, uint64_t openerPageID, String&& openerPrimaryDomain)
{
ASSERT(primaryDomainInNeedOfStorageAccess != openerPrimaryDomain);
ASSERT(!RunLoop::isMain());
@@ -439,16 +439,12 @@
auto& domainInNeedOfStorageAccessStatistic = ensureResourceStatisticsForPrimaryDomain(primaryDomainInNeedOfStorageAccess);
auto cookiesBlockedAndPurged = shouldBlockAndPurgeCookies(domainInNeedOfStorageAccessStatistic);
- // There are no cookies to get access to if the domain has its cookies blocked and did not get user interaction now.
- if (cookiesBlockedAndPurged && !isTriggeredByUserGesture)
- return;
-
// The domain already has access if its cookies are not blocked.
if (!cookiesBlockedAndPurged && !shouldBlockAndKeepCookies(domainInNeedOfStorageAccessStatistic))
return;
#if !RELEASE_LOG_DISABLED
- RELEASE_LOG_INFO_IF(m_debugLoggingEnabled, ResourceLoadStatisticsDebug, "[Temporary combatibility fix] Storage access was granted for %{public}s under opener page from %{public}s, %{public}s user interaction in the opened window.", primaryDomainInNeedOfStorageAccess.utf8().data(), openerPrimaryDomain.utf8().data(), (isTriggeredByUserGesture ? "with" : "without"));
+ RELEASE_LOG_INFO_IF(m_debugLoggingEnabled, ResourceLoadStatisticsDebug, "[Temporary combatibility fix] Storage access was granted for %{public}s under opener page from %{public}s, with user interaction in the opened window.", primaryDomainInNeedOfStorageAccess.utf8().data(), openerPrimaryDomain.utf8().data());
#endif
grantStorageAccessInternal(WTFMove(primaryDomainInNeedOfStorageAccess), WTFMove(openerPrimaryDomain), std::nullopt, openerPageID, false, [](bool) { });
}
Modified: trunk/Source/WebKit/UIProcess/ResourceLoadStatisticsMemoryStore.h (236562 => 236563)
--- trunk/Source/WebKit/UIProcess/ResourceLoadStatisticsMemoryStore.h 2018-09-27 19:00:13 UTC (rev 236562)
+++ trunk/Source/WebKit/UIProcess/ResourceLoadStatisticsMemoryStore.h 2018-09-27 19:40:16 UTC (rev 236563)
@@ -72,7 +72,7 @@
void includeTodayAsOperatingDateIfNecessary();
void processStatisticsAndDataRecords();
- void requestStorageAccessUnderOpener(String&& primaryDomainInNeedOfStorageAccess, uint64_t openerPageID, String&& openerPrimaryDomain, bool isTriggeredByUserGesture);
+ void requestStorageAccessUnderOpener(String&& primaryDomainInNeedOfStorageAccess, uint64_t openerPageID, String&& openerPrimaryDomain);
void removeAllStorageAccess(CompletionHandler<void()>&&);
void grandfatherExistingWebsiteData(CompletionHandler<void()>&&);
Modified: trunk/Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp (236562 => 236563)
--- trunk/Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp 2018-09-27 19:00:13 UTC (rev 236562)
+++ trunk/Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp 2018-09-27 19:40:16 UTC (rev 236563)
@@ -276,7 +276,7 @@
});
}
-void WebResourceLoadStatisticsStore::requestStorageAccessUnderOpener(String&& primaryDomainInNeedOfStorageAccess, uint64_t openerPageID, String&& openerPrimaryDomain, bool isTriggeredByUserGesture)
+void WebResourceLoadStatisticsStore::requestStorageAccessUnderOpener(String&& primaryDomainInNeedOfStorageAccess, uint64_t openerPageID, String&& openerPrimaryDomain)
{
ASSERT(RunLoop::isMain());
@@ -283,9 +283,9 @@
// It is safe to move the strings to the background queue without isolated copy here because they are r-value references
// coming from IPC. Strings which are safe to move to other threads as long as nobody on this thread holds a reference
// to those strings.
- postTask([this, primaryDomainInNeedOfStorageAccess = WTFMove(primaryDomainInNeedOfStorageAccess), openerPageID, openerPrimaryDomain = WTFMove(openerPrimaryDomain), isTriggeredByUserGesture]() mutable {
+ postTask([this, primaryDomainInNeedOfStorageAccess = WTFMove(primaryDomainInNeedOfStorageAccess), openerPageID, openerPrimaryDomain = WTFMove(openerPrimaryDomain)]() mutable {
if (m_memoryStore)
- m_memoryStore->requestStorageAccessUnderOpener(WTFMove(primaryDomainInNeedOfStorageAccess), openerPageID, WTFMove(openerPrimaryDomain), isTriggeredByUserGesture);
+ m_memoryStore->requestStorageAccessUnderOpener(WTFMove(primaryDomainInNeedOfStorageAccess), openerPageID, WTFMove(openerPrimaryDomain));
});
}
Modified: trunk/Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.h (236562 => 236563)
--- trunk/Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.h 2018-09-27 19:00:13 UTC (rev 236562)
+++ trunk/Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.h 2018-09-27 19:40:16 UTC (rev 236563)
@@ -153,7 +153,7 @@
// IPC message handlers.
void resourceLoadStatisticsUpdated(Vector<WebCore::ResourceLoadStatistics>&& origins);
- void requestStorageAccessUnderOpener(String&& primaryDomainInNeedOfStorageAccess, uint64_t openerPageID, String&& openerPrimaryDomain, bool isTriggeredByUserGesture);
+ void requestStorageAccessUnderOpener(String&& primaryDomainInNeedOfStorageAccess, uint64_t openerPageID, String&& openerPrimaryDomain);
void performDailyTasks();
Modified: trunk/Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.messages.in (236562 => 236563)
--- trunk/Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.messages.in 2018-09-27 19:00:13 UTC (rev 236562)
+++ trunk/Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.messages.in 2018-09-27 19:40:16 UTC (rev 236563)
@@ -21,6 +21,6 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
messages -> WebResourceLoadStatisticsStore {
- RequestStorageAccessUnderOpener(String domainReceivingUserInteraction, uint64_t openerPageID, String openerDomain, bool isTriggeredByUserGesture)
+ RequestStorageAccessUnderOpener(String domainReceivingUserInteraction, uint64_t openerPageID, String openerDomain)
ResourceLoadStatisticsUpdated(Vector<WebCore::ResourceLoadStatistics> origins)
}
Modified: trunk/Source/WebKit/WebProcess/WebProcess.cpp (236562 => 236563)
--- trunk/Source/WebKit/WebProcess/WebProcess.cpp 2018-09-27 19:00:13 UTC (rev 236562)
+++ trunk/Source/WebKit/WebProcess/WebProcess.cpp 2018-09-27 19:40:16 UTC (rev 236563)
@@ -205,8 +205,8 @@
parentProcessConnection()->send(Messages::WebResourceLoadStatisticsStore::ResourceLoadStatisticsUpdated(WTFMove(statistics)), 0);
});
- ResourceLoadObserver::shared().setRequestStorageAccessUnderOpenerCallback([this] (const String& domainInNeedOfStorageAccess, uint64_t openerPageID, const String& openerDomain, bool isTriggeredByUserGesture) {
- parentProcessConnection()->send(Messages::WebResourceLoadStatisticsStore::RequestStorageAccessUnderOpener(domainInNeedOfStorageAccess, openerPageID, openerDomain, isTriggeredByUserGesture), 0);
+ ResourceLoadObserver::shared().setRequestStorageAccessUnderOpenerCallback([this] (const String& domainInNeedOfStorageAccess, uint64_t openerPageID, const String& openerDomain) {
+ parentProcessConnection()->send(Messages::WebResourceLoadStatisticsStore::RequestStorageAccessUnderOpener(domainInNeedOfStorageAccess, openerPageID, openerDomain), 0);
});
Gigacage::disableDisablingPrimitiveGigacageIfShouldBeEnabled();