Title: [295482] trunk
Revision
295482
Author
commit-qu...@webkit.org
Date
2022-06-13 00:15:12 -0700 (Mon, 13 Jun 2022)

Log Message

Switch Web Share Permissions Policy to *
https://bugs.webkit.org/show_bug.cgi?id=241363

Patch by Marcos Cáceres <mar...@marcosc.com> on 2022-06-12
Reviewed by Youenn Fablet and Tim Horton.

* LayoutTests/http/tests/webshare/webshare-allow-attribute-canShare.https-expected.txt:
* LayoutTests/http/tests/webshare/webshare-allow-attribute-canShare.https.html:
* LayoutTests/http/tests/webshare/webshare-allow-attribute-share.https-expected.txt:
* LayoutTests/http/tests/webshare/webshare-allow-attribute-share.https.html:
* Source/WebCore/html/FeaturePolicy.cpp:
(WebCore::FeaturePolicy::parse):

Canonical link: https://commits.webkit.org/251487@main

Modified Paths

Diff

Modified: trunk/LayoutTests/http/tests/webshare/webshare-allow-attribute-canShare.https-expected.txt (295481 => 295482)


--- trunk/LayoutTests/http/tests/webshare/webshare-allow-attribute-canShare.https-expected.txt	2022-06-13 04:26:54 UTC (rev 295481)
+++ trunk/LayoutTests/http/tests/webshare/webshare-allow-attribute-canShare.https-expected.txt	2022-06-13 07:15:12 UTC (rev 295482)
@@ -1,9 +1,8 @@
-CONSOLE MESSAGE: Feature policy 'WebShare' check failed for iframe with origin 'https://localhost:8443' and allow attribute ''.
 CONSOLE MESSAGE: Feature policy 'WebShare' check failed for iframe with origin 'https://localhost:8443' and allow attribute 'web-share 'none''.
 CONSOLE MESSAGE: Feature policy 'WebShare' check failed for iframe with origin 'https://127.0.0.1:8443' and allow attribute 'web-share 'none''.
 CONSOLE MESSAGE: Feature policy 'WebShare' check failed for iframe with origin 'https://localhost:8443' and allow attribute 'web-share 'self''.
 CONSOLE MESSAGE: Feature policy 'WebShare' check failed for iframe with origin 'https://127.0.0.1:8443' and allow attribute 'web-share https://localhost:8443'.
-PASS iframe src: "https://localhost:8443/webshare/resources/webshare-postmessage.html" with allow="" MUST NOT be allowed to call canShare().
+PASS iframe src: "https://localhost:8443/webshare/resources/webshare-postmessage.html" with allow="" is allowed to call canShare().
 PASS iframe src: "https://127.0.0.1:8443/webshare/resources/webshare-postmessage.html" with allow="" is allowed to call canShare().
 PASS iframe src: "https://localhost:8443/webshare/resources/webshare-postmessage.html" with allow="web-share" is allowed to call canShare().
 PASS iframe src: "https://127.0.0.1:8443/webshare/resources/webshare-postmessage.html" with allow="web-share" is allowed to call canShare().

Modified: trunk/LayoutTests/http/tests/webshare/webshare-allow-attribute-canShare.https.html (295481 => 295482)


--- trunk/LayoutTests/http/tests/webshare/webshare-allow-attribute-canShare.https.html	2022-06-13 04:26:54 UTC (rev 295481)
+++ trunk/LayoutTests/http/tests/webshare/webshare-allow-attribute-canShare.https.html	2022-06-13 07:15:12 UTC (rev 295482)
@@ -48,7 +48,7 @@
   </head>
   <body>
     <iframe
-      data-enabled="false"
+      data-enabled="true"
       src=""
     ></iframe>
     <iframe

Modified: trunk/LayoutTests/http/tests/webshare/webshare-allow-attribute-share.https-expected.txt (295481 => 295482)


--- trunk/LayoutTests/http/tests/webshare/webshare-allow-attribute-share.https-expected.txt	2022-06-13 04:26:54 UTC (rev 295481)
+++ trunk/LayoutTests/http/tests/webshare/webshare-allow-attribute-share.https-expected.txt	2022-06-13 07:15:12 UTC (rev 295482)
@@ -1,9 +1,8 @@
-CONSOLE MESSAGE: Feature policy 'WebShare' check failed for iframe with origin 'https://localhost:8443' and allow attribute ''.
 CONSOLE MESSAGE: Feature policy 'WebShare' check failed for iframe with origin 'https://localhost:8443' and allow attribute 'web-share 'none''.
 CONSOLE MESSAGE: Feature policy 'WebShare' check failed for iframe with origin 'https://127.0.0.1:8443' and allow attribute 'web-share 'none''.
 CONSOLE MESSAGE: Feature policy 'WebShare' check failed for iframe with origin 'https://localhost:8443' and allow attribute 'web-share 'self''.
 CONSOLE MESSAGE: Feature policy 'WebShare' check failed for iframe with origin 'https://127.0.0.1:8443' and allow attribute 'web-share https://localhost:8443'.
-PASS iframe src: "https://localhost:8443/webshare/resources/webshare-postmessage.html" with allow="" MUST NOT be allowed to call share(). NotAllowedError Third-party iframes are not allowed to call share() unless explicitly allowed via Feature-Policy (web-share)
+PASS iframe src: "https://localhost:8443/webshare/resources/webshare-postmessage.html" with allow="" is allowed to call share().
 PASS iframe src: "https://127.0.0.1:8443/webshare/resources/webshare-postmessage.html" with allow="" is allowed to call share().
 PASS iframe src: "https://localhost:8443/webshare/resources/webshare-postmessage.html" with allow="web-share" is allowed to call share().
 PASS iframe src: "https://127.0.0.1:8443/webshare/resources/webshare-postmessage.html" with allow="web-share" is allowed to call share().

Modified: trunk/LayoutTests/http/tests/webshare/webshare-allow-attribute-share.https.html (295481 => 295482)


--- trunk/LayoutTests/http/tests/webshare/webshare-allow-attribute-share.https.html	2022-06-13 04:26:54 UTC (rev 295481)
+++ trunk/LayoutTests/http/tests/webshare/webshare-allow-attribute-share.https.html	2022-06-13 07:15:12 UTC (rev 295482)
@@ -26,7 +26,7 @@
 
       const iframeDetails = [
         {
-          enabled: "false",
+          enabled: "true",
           src: "https://localhost:8443/webshare/resources/webshare-postmessage.html",
         },
         {

Modified: trunk/Source/WebCore/html/FeaturePolicy.cpp (295481 => 295482)


--- trunk/Source/WebCore/html/FeaturePolicy.cpp	2022-06-13 04:26:54 UTC (rev 295481)
+++ trunk/Source/WebCore/html/FeaturePolicy.cpp	2022-06-13 07:15:12 UTC (rev 295482)
@@ -288,7 +288,7 @@
     if (!isPaymentInitialized)
         policy.m_paymentRule.allowedList.add(document.securityOrigin().data());
     if (!isWebShareInitialized)
-        policy.m_webShareRule.allowedList.add(document.securityOrigin().data());
+        policy.m_webShareRule.type = FeaturePolicy::AllowRule::Type::All;
 #if ENABLE(DEVICE_ORIENTATION)
     if (!isGyroscopeInitialized)
         policy.m_gyroscopeRule.allowedList.add(document.securityOrigin().data());
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to