Title: [284965] trunk
Revision
284965
Author
[email protected]
Date
2021-10-27 16:30:06 -0700 (Wed, 27 Oct 2021)

Log Message

Disable relaxation of BroadcastChannel origin partitioning based on storage access
https://bugs.webkit.org/show_bug.cgi?id=232401

Reviewed by John Wilander.

Source/WebCore:

Disable relaxation of BroadcastChannel origin partitioning based on storage access (r282366).
Only Gecko does this at the moment and it appears they want to drop this behavior.

This patch is a revert of the behavior added in r282366.

* dom/BroadcastChannel.cpp:
(WebCore::shouldPartitionOrigin):

LayoutTests:

Dropt test added in r282366.

* http/tests/messaging/broadcastchannel-partitioning-with-storage-access-expected.txt: Removed.
* http/tests/messaging/broadcastchannel-partitioning-with-storage-access.html: Removed.
* http/tests/messaging/resources/broadcastchannel-partitioning-with-storage-access-iframe.html: Removed.
* http/tests/messaging/resources/broadcastchannel-partitioning-with-storage-access-popup.html: Removed.
* platform/mac-wk1/TestExpectations:
* platform/win/TestExpectations:

Modified Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (284964 => 284965)


--- trunk/LayoutTests/ChangeLog	2021-10-27 23:27:31 UTC (rev 284964)
+++ trunk/LayoutTests/ChangeLog	2021-10-27 23:30:06 UTC (rev 284965)
@@ -1,5 +1,21 @@
 2021-10-27  Chris Dumez  <[email protected]>
 
+        Disable relaxation of BroadcastChannel origin partitioning based on storage access
+        https://bugs.webkit.org/show_bug.cgi?id=232401
+
+        Reviewed by John Wilander.
+
+        Dropt test added in r282366.
+
+        * http/tests/messaging/broadcastchannel-partitioning-with-storage-access-expected.txt: Removed.
+        * http/tests/messaging/broadcastchannel-partitioning-with-storage-access.html: Removed.
+        * http/tests/messaging/resources/broadcastchannel-partitioning-with-storage-access-iframe.html: Removed.
+        * http/tests/messaging/resources/broadcastchannel-partitioning-with-storage-access-popup.html: Removed.
+        * platform/mac-wk1/TestExpectations:
+        * platform/win/TestExpectations:
+
+2021-10-27  Chris Dumez  <[email protected]>
+
         autofocus IDL attribute should be exposed on all HTML or SVG elements
         https://bugs.webkit.org/show_bug.cgi?id=232349
 

Deleted: trunk/LayoutTests/http/tests/messaging/broadcastchannel-partitioning-with-storage-access-expected.txt (284964 => 284965)


--- trunk/LayoutTests/http/tests/messaging/broadcastchannel-partitioning-with-storage-access-expected.txt	2021-10-27 23:27:31 UTC (rev 284964)
+++ trunk/LayoutTests/http/tests/messaging/broadcastchannel-partitioning-with-storage-access-expected.txt	2021-10-27 23:30:06 UTC (rev 284965)
@@ -1,11 +0,0 @@
-Tests that BroadcastChannel's origin partitioning can be relaxed via requestStorageAccess()
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS Received message from same-origin iframe with storage access under cross-origin popup
-PASS gotMessageFromSameOriginIframeUnderCrossOriginPopup is false
-PASS successfullyParsed is true
-
-TEST COMPLETE
-

Deleted: trunk/LayoutTests/http/tests/messaging/broadcastchannel-partitioning-with-storage-access.html (284964 => 284965)


--- trunk/LayoutTests/http/tests/messaging/broadcastchannel-partitioning-with-storage-access.html	2021-10-27 23:27:31 UTC (rev 284964)
+++ trunk/LayoutTests/http/tests/messaging/broadcastchannel-partitioning-with-storage-access.html	2021-10-27 23:30:06 UTC (rev 284965)
@@ -1,30 +0,0 @@
-<!DOCTYPE html><!-- webkit-test-runner [ BroadcastChannelOriginPartitioningEnabled=true ] -->
-<html>
-<body>
-<script src=""
-<script>
-description("Tests that BroadcastChannel's origin partitioning can be relaxed via requestStorageAccess()");
-jsTestIsAsync = true;
-
-let bc = new BroadcastChannel("broadcastchannel-partitioning-with-storage-access");
-
-let gotMessageFromSameOriginIframeUnderCrossOriginPopup = false;
-bc._onmessage_ = (message) => {
-    if (message.data == "same-origin-iframe-under-cross-origin-popup-with-storage-access") {
-        testPassed("Received message from same-origin iframe with storage access under cross-origin popup");
-        shouldBeFalse("gotMessageFromSameOriginIframeUnderCrossOriginPopup");
-        gotMessageFromSameOriginIframeUnderCrossOriginPopup = true;
-    } else {
-        testFailed("Received unexpected message: " + message.data);
-    }
-
-    if (gotMessageFromSameOriginIframeUnderCrossOriginPopup)
-        setTimeout(finishJSTest, 1000);
-};
-
-_onload_ = () => {
-    open("http://localhost:8000/messaging/resources/broadcastchannel-partitioning-with-storage-access-popup.html");
-};
-</script>
-</body>
-</html>

Deleted: trunk/LayoutTests/http/tests/messaging/resources/broadcastchannel-partitioning-with-storage-access-iframe.html (284964 => 284965)


--- trunk/LayoutTests/http/tests/messaging/resources/broadcastchannel-partitioning-with-storage-access-iframe.html	2021-10-27 23:27:31 UTC (rev 284964)
+++ trunk/LayoutTests/http/tests/messaging/resources/broadcastchannel-partitioning-with-storage-access-iframe.html	2021-10-27 23:30:06 UTC (rev 284965)
@@ -1,18 +0,0 @@
-<!DOCTYPE html>
-<html>
-<body>
-<script>
-partitionedChannel = new BroadcastChannel("broadcastchannel-partitioning-with-storage-access");
-partitionedChannel.postMessage("same-origin-iframe-under-cross-origin-popup-without-storage-access-1");
-
-internals.withUserGesture(() => {
-    document.requestStorageAccess().then(() => {
-        unpartitionedChannel = new BroadcastChannel("broadcastchannel-partitioning-with-storage-access");
-        unpartitionedChannel.postMessage("same-origin-iframe-under-cross-origin-popup-with-storage-access");
-
-        partitionedChannel.postMessage("same-origin-iframe-under-cross-origin-popup-without-storage-access-2");
-    });
-});
-</script>
-</body>
-</html>

Deleted: trunk/LayoutTests/http/tests/messaging/resources/broadcastchannel-partitioning-with-storage-access-popup.html (284964 => 284965)


--- trunk/LayoutTests/http/tests/messaging/resources/broadcastchannel-partitioning-with-storage-access-popup.html	2021-10-27 23:27:31 UTC (rev 284964)
+++ trunk/LayoutTests/http/tests/messaging/resources/broadcastchannel-partitioning-with-storage-access-popup.html	2021-10-27 23:30:06 UTC (rev 284965)
@@ -1,6 +0,0 @@
-<!DOCTYPE html>
-<html>
-<body>
-<iframe src=""
-</body>
-</html>

Modified: trunk/LayoutTests/platform/mac-wk1/TestExpectations (284964 => 284965)


--- trunk/LayoutTests/platform/mac-wk1/TestExpectations	2021-10-27 23:27:31 UTC (rev 284964)
+++ trunk/LayoutTests/platform/mac-wk1/TestExpectations	2021-10-27 23:30:06 UTC (rev 284965)
@@ -79,9 +79,6 @@
 editing/async-clipboard/clipboard-read-text-same-origin.html [ Skip ]
 editing/async-clipboard/sanitize-when-reading-markup.html [ Skip ]
 
-# No requestStorageAccess() support for WK1.
-http/tests/messaging/broadcastchannel-partitioning-with-storage-access.html [ Skip ]
-
 imported/w3c/web-platform-tests/websockets/Close-1000-reason.any.html [ Pass Failure ]
 imported/w3c/web-platform-tests/websockets/Close-1000-reason.any.worker.html [ Pass Failure ]
 imported/w3c/web-platform-tests/websockets/binary/001.html [ Pass Failure ]

Modified: trunk/LayoutTests/platform/win/TestExpectations (284964 => 284965)


--- trunk/LayoutTests/platform/win/TestExpectations	2021-10-27 23:27:31 UTC (rev 284964)
+++ trunk/LayoutTests/platform/win/TestExpectations	2021-10-27 23:30:06 UTC (rev 284965)
@@ -4656,7 +4656,6 @@
 # No BroadcastChannel support on Windows.
 fast/html/broadcast-channel-between-different-sessions.html [ Skip ]
 http/tests/messaging/broadcastchannel-partitioning.html [ Skip ]
-http/tests/messaging/broadcastchannel-partitioning-with-storage-access.html [ Skip ]
 
 # This test is skipped because the necessary feature flag functionality specific to the Windows WebKit legacy port is
 # not implemented.  The feature flags in question are CSSCounterStyleAtRulesEnabled and CSSCounterStyleAtRuleImageSymbolsEnabled.

Modified: trunk/Source/WebCore/ChangeLog (284964 => 284965)


--- trunk/Source/WebCore/ChangeLog	2021-10-27 23:27:31 UTC (rev 284964)
+++ trunk/Source/WebCore/ChangeLog	2021-10-27 23:30:06 UTC (rev 284965)
@@ -1,3 +1,18 @@
+2021-10-27  Chris Dumez  <[email protected]>
+
+        Disable relaxation of BroadcastChannel origin partitioning based on storage access
+        https://bugs.webkit.org/show_bug.cgi?id=232401
+
+        Reviewed by John Wilander.
+
+        Disable relaxation of BroadcastChannel origin partitioning based on storage access (r282366).
+        Only Gecko does this at the moment and it appears they want to drop this behavior.
+
+        This patch is a revert of the behavior added in r282366.
+
+        * dom/BroadcastChannel.cpp:
+        (WebCore::shouldPartitionOrigin):
+
 2021-10-27  Kiet Ho  <[email protected]>
 
         Add discrete animation support between PathOperations

Modified: trunk/Source/WebCore/dom/BroadcastChannel.cpp (284964 => 284965)


--- trunk/Source/WebCore/dom/BroadcastChannel.cpp	2021-10-27 23:27:31 UTC (rev 284964)
+++ trunk/Source/WebCore/dom/BroadcastChannel.cpp	2021-10-27 23:30:06 UTC (rev 284965)
@@ -27,8 +27,6 @@
 #include "BroadcastChannel.h"
 
 #include "BroadcastChannelRegistry.h"
-#include "Chrome.h"
-#include "ChromeClient.h"
 #include "EventNames.h"
 #include "MessageEvent.h"
 #include "Page.h"
@@ -61,21 +59,7 @@
 
 static bool shouldPartitionOrigin(Document& document)
 {
-    if (!document.settings().broadcastChannelOriginPartitioningEnabled())
-        return false;
-
-#if ENABLE(INTELLIGENT_TRACKING_PREVENTION)
-    if (!document.settings().storageAccessAPIEnabled())
-        return true;
-
-    auto* page = document.page();
-    if (!page)
-        return true;
-
-    return !page->chrome().client().hasPageLevelStorageAccess(RegistrableDomain::uncheckedCreateFromHost(document.topOrigin().host()), RegistrableDomain::uncheckedCreateFromHost(document.securityOrigin().host()));
-#else
-    return true;
-#endif
+    return document.settings().broadcastChannelOriginPartitioningEnabled();
 }
 
 class BroadcastChannel::MainThreadBridge : public ThreadSafeRefCounted<MainThreadBridge, WTF::DestructionThread::Main> {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to