Title: [288831] trunk/Source
Revision
288831
Author
[email protected]
Date
2022-01-31 12:32:11 -0800 (Mon, 31 Jan 2022)

Log Message

[iOS] SharePlay is shown prominently for system-provided Share Sheets
https://bugs.webkit.org/show_bug.cgi?id=235895
rdar://88268450

Reviewed by Wenson Hsieh.

Source/WebKit:

Content shared using the Web Share API should not display a SharePlay action.

* UIProcess/Cocoa/WKShareSheet.mm:
(-[WKShareSheet presentWithShareDataArray:inRect:]):

Use `-[UIActivityViewController setExcludedActivityTypes:]` to ensure
a SharePlay action is not displayed.

Source/WTF:

* wtf/PlatformHave.h:

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (288830 => 288831)


--- trunk/Source/WTF/ChangeLog	2022-01-31 20:31:54 UTC (rev 288830)
+++ trunk/Source/WTF/ChangeLog	2022-01-31 20:32:11 UTC (rev 288831)
@@ -1,3 +1,13 @@
+2022-01-31  Aditya Keerthi  <[email protected]>
+
+        [iOS] SharePlay is shown prominently for system-provided Share Sheets
+        https://bugs.webkit.org/show_bug.cgi?id=235895
+        rdar://88268450
+
+        Reviewed by Wenson Hsieh.
+
+        * wtf/PlatformHave.h:
+
 2022-01-31  Keith Miller  <[email protected]>
 
         Reland StructureID overhaul

Modified: trunk/Source/WTF/wtf/PlatformHave.h (288830 => 288831)


--- trunk/Source/WTF/wtf/PlatformHave.h	2022-01-31 20:31:54 UTC (rev 288830)
+++ trunk/Source/WTF/wtf/PlatformHave.h	2022-01-31 20:32:11 UTC (rev 288831)
@@ -1163,3 +1163,7 @@
     || (PLATFORM(WATCHOS) && __WATCH_OS_VERSION_MAX_ALLOWED >= 80500)
 #define HAVE_CFNETWORK_DISABLE_CACHE_SPI 1
 #endif
+
+#if ((PLATFORM(IOS) || PLATFORM(MACCATALYST)) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 150400)
+#define HAVE_UIACTIVITYTYPE_SHAREPLAY 1
+#endif

Modified: trunk/Source/WebKit/ChangeLog (288830 => 288831)


--- trunk/Source/WebKit/ChangeLog	2022-01-31 20:31:54 UTC (rev 288830)
+++ trunk/Source/WebKit/ChangeLog	2022-01-31 20:32:11 UTC (rev 288831)
@@ -1,3 +1,19 @@
+2022-01-31  Aditya Keerthi  <[email protected]>
+
+        [iOS] SharePlay is shown prominently for system-provided Share Sheets
+        https://bugs.webkit.org/show_bug.cgi?id=235895
+        rdar://88268450
+
+        Reviewed by Wenson Hsieh.
+
+        Content shared using the Web Share API should not display a SharePlay action.
+
+        * UIProcess/Cocoa/WKShareSheet.mm:
+        (-[WKShareSheet presentWithShareDataArray:inRect:]):
+
+        Use `-[UIActivityViewController setExcludedActivityTypes:]` to ensure
+        a SharePlay action is not displayed.
+
 2022-01-31  Per Arne Vollan  <[email protected]>
 
         [iOS][WP] Restrict image decoders

Modified: trunk/Source/WebKit/UIProcess/Cocoa/WKShareSheet.mm (288830 => 288831)


--- trunk/Source/WebKit/UIProcess/Cocoa/WKShareSheet.mm	2022-01-31 20:31:54 UTC (rev 288830)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WKShareSheet.mm	2022-01-31 20:32:11 UTC (rev 288831)
@@ -181,6 +181,11 @@
     [_sharingServicePicker showRelativeToRect:presentationRect ofView:webView preferredEdge:NSMinYEdge];
 #else
     _shareSheetViewController = adoptNS([[UIActivityViewController alloc] initWithActivityItems:sharingItems applicationActivities:nil]);
+
+#if HAVE(UIACTIVITYTYPE_SHAREPLAY)
+    [_shareSheetViewController setExcludedActivityTypes:@[ UIActivityTypeSharePlay ]];
+#endif
+
     [_shareSheetViewController setCompletionWithItemsHandler:^(NSString *, BOOL completed, NSArray *, NSError *) {
         _didShareSuccessfully |= completed;
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to