Title: [260650] trunk/Source
Revision
260650
Author
[email protected]
Date
2020-04-24 10:02:15 -0700 (Fri, 24 Apr 2020)

Log Message

Call STDynamicActivityAttributionPublisher in the WebProcess
https://bugs.webkit.org/show_bug.cgi?id=210772
<rdar://problem/62075201>

Patch by Youenn Fablet  <[email protected]> and Luming Yin <[email protected]> on 2020-04-24
Reviewed by Geoffrey Garen.

Source/WebKit:

Call STDynamicActivityAttributionPublisher in WebProcess to make use of the newly added plist entry.
Use of a sandbox extension to protect this call.

* Configurations/WebKit.xcconfig:
* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
* Scripts/process-entitlements.sh:
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/EntryPoint/Cocoa/XPCService/WebContentService/Info-iOS.plist:
* WebProcess/EntryPoint/Cocoa/XPCService/WebContentService/InfoPlist.strings: Added.
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):

Source/WTF:

* wtf/PlatformHave.h:

Modified Paths

Added Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (260649 => 260650)


--- trunk/Source/WTF/ChangeLog	2020-04-24 16:58:57 UTC (rev 260649)
+++ trunk/Source/WTF/ChangeLog	2020-04-24 17:02:15 UTC (rev 260650)
@@ -1,3 +1,13 @@
+2020-04-24  Youenn Fablet  <[email protected]> and Luming Yin <[email protected]>
+
+        Call STDynamicActivityAttributionPublisher in the WebProcess
+        https://bugs.webkit.org/show_bug.cgi?id=210772
+        <rdar://problem/62075201>
+
+        Reviewed by Geoffrey Garen.
+
+        * wtf/PlatformHave.h:
+
 2020-04-23  Don Olmstead  <[email protected]>
 
         [CMake] CMAKE_BINARY_DIR should always be a PRIVATE include directory

Modified: trunk/Source/WTF/wtf/PlatformHave.h (260649 => 260650)


--- trunk/Source/WTF/wtf/PlatformHave.h	2020-04-24 16:58:57 UTC (rev 260649)
+++ trunk/Source/WTF/wtf/PlatformHave.h	2020-04-24 17:02:15 UTC (rev 260650)
@@ -666,6 +666,10 @@
 #define HAVE_UISCENE_BASED_VIEW_SERVICE_STATE_NOTIFICATIONS 1
 #endif
 
+#if PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140000
+#define HAVE_SYSTEM_STATUS_ATTRIBUTION 1
+#endif
+
 #if PLATFORM(IOS_FAMILY) && !PLATFORM(IOS_FAMILY_SIMULATOR) && !PLATFORM(MACCATALYST)
 #define HAVE_IOS_JIT_RESTRICTIONS 1
 #endif

Modified: trunk/Source/WebKit/ChangeLog (260649 => 260650)


--- trunk/Source/WebKit/ChangeLog	2020-04-24 16:58:57 UTC (rev 260649)
+++ trunk/Source/WebKit/ChangeLog	2020-04-24 17:02:15 UTC (rev 260650)
@@ -1,3 +1,29 @@
+2020-04-24  Youenn Fablet  <[email protected]> and Luming Yin <[email protected]>
+
+        Call STDynamicActivityAttributionPublisher in the WebProcess
+        https://bugs.webkit.org/show_bug.cgi?id=210772
+        <rdar://problem/62075201>
+
+        Reviewed by Geoffrey Garen.
+
+        Call STDynamicActivityAttributionPublisher in WebProcess to make use of the newly added plist entry.
+        Use of a sandbox extension to protect this call.
+
+        * Configurations/WebKit.xcconfig:
+        * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
+        * Scripts/process-entitlements.sh:
+        * Shared/WebProcessCreationParameters.cpp:
+        (WebKit::WebProcessCreationParameters::encode const):
+        (WebKit::WebProcessCreationParameters::decode):
+        * Shared/WebProcessCreationParameters.h:
+        * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
+        (WebKit::WebProcessPool::platformInitializeWebProcess):
+        * WebKit.xcodeproj/project.pbxproj:
+        * WebProcess/EntryPoint/Cocoa/XPCService/WebContentService/Info-iOS.plist:
+        * WebProcess/EntryPoint/Cocoa/XPCService/WebContentService/InfoPlist.strings: Added.
+        * WebProcess/cocoa/WebProcessCocoa.mm:
+        (WebKit::WebProcess::platformInitializeWebProcess):
+
 2020-04-24  Simon Fraser  <[email protected]>
 
         Move some post-renderingUpdate code into WebCore

Modified: trunk/Source/WebKit/Configurations/WebKit.xcconfig (260649 => 260650)


--- trunk/Source/WebKit/Configurations/WebKit.xcconfig	2020-04-24 16:58:57 UTC (rev 260649)
+++ trunk/Source/WebKit/Configurations/WebKit.xcconfig	2020-04-24 17:02:15 UTC (rev 260650)
@@ -116,6 +116,12 @@
 WK_SECURITY_INTERFACE_LDFLAGS = $(WK_SECURITY_INTERFACE_LDFLAGS_$(WK_PLATFORM_NAME));
 WK_SECURITY_INTERFACE_LDFLAGS_macosx = -framework SecurityInterface;
 
+WK_SYSTEM_STATUS_LDFLAGS = -framework SystemStatus;
+WK_SYSTEM_STATUS_LDFLAGS[sdk=iphone*13.*] = ;
+WK_SYSTEM_STATUS_LDFLAGS[sdk=macosx*] = ;
+WK_SYSTEM_STATUS_LDFLAGS[sdk=watch*] = ;
+WK_SYSTEM_STATUS_LDFLAGS[sdk=appletv*] = ;
+
 WK_UIKIT_LDFLAGS = $(WK_UIKIT_LDFLAGS_$(WK_COCOA_TOUCH));
 WK_UIKIT_LDFLAGS_cocoatouch = -framework UIKit;
 
@@ -132,7 +138,7 @@
 WK_AUTHKIT_LDFLAGS_macosx = $(WK_AUTHKIT_LDFLAGS$(WK_MACOS_1015));
 WK_AUTHKIT_LDFLAGS_MACOS_SINCE_1015 = -framework AuthKit;
 
-FRAMEWORK_AND_LIBRARY_LDFLAGS = -lobjc -framework CFNetwork -framework CoreAudio -framework CoreFoundation -framework CoreGraphics -framework CoreText -framework Foundation -framework ImageIO -framework IOKit -framework IOSurface -framework WebKitLegacy -lnetwork $(WK_ACCESSIBILITY_LDFLAGS) $(WK_APPKIT_LDFLAGS) $(WK_ASSERTION_SERVICES_LDFLAGS) $(WK_RUNNINGBOARD_SERVICES_LDFLAGS) $(WK_AUTHKIT_LDFLAGS) $(WK_CARBON_LDFLAGS) $(WK_CORE_PREDICTION_LDFLAGS) $(WK_CORE_SERVICES_LDFLAGS) $(WK_GRAPHICS_SERVICES_LDFLAGS) $(WK_LIBSANDBOX_LDFLAGS) $(WK_LIBWEBRTC_LDFLAGS) $(WK_MOBILE_CORE_SERVICES_LDFLAGS) $(WK_MOBILE_GESTALT_LDFLAGS) $(WK_OPENGL_LDFLAGS) $(WK_PDFKIT_LDFLAGS) $(WK_SAFE_BROWSING_LDFLAGS) $(WK_SECURITY_INTERFACE_LDFLAGS) $(WK_UIKIT_LDFLAGS) $(WK_URL_FORMATTING_LDFLAGS) $(WK_WEBINSPECTORUI_LDFLAGS);
+FRAMEWORK_AND_LIBRARY_LDFLAGS = -lobjc -framework CFNetwork -framework CoreAudio -framework CoreFoundation -framework CoreGraphics -framework CoreText -framework Foundation -framework ImageIO -framework IOKit -framework IOSurface -framework WebKitLegacy -lnetwork $(WK_ACCESSIBILITY_LDFLAGS) $(WK_APPKIT_LDFLAGS) $(WK_ASSERTION_SERVICES_LDFLAGS) $(WK_RUNNINGBOARD_SERVICES_LDFLAGS) $(WK_AUTHKIT_LDFLAGS) $(WK_CARBON_LDFLAGS) $(WK_CORE_PREDICTION_LDFLAGS) $(WK_CORE_SERVICES_LDFLAGS) $(WK_GRAPHICS_SERVICES_LDFLAGS) $(WK_LIBSANDBOX_LDFLAGS) $(WK_LIBWEBRTC_LDFLAGS) $(WK_MOBILE_CORE_SERVICES_LDFLAGS) $(WK_MOBILE_GESTALT_LDFLAGS) $(WK_OPENGL_LDFLAGS) $(WK_PDFKIT_LDFLAGS) $(WK_SAFE_BROWSING_LDFLAGS) $(WK_SECURITY_INTERFACE_LDFLAGS) $(WK_SYSTEM_STATUS_LDFLAGS) $(WK_UIKIT_LDFLAGS) $(WK_URL_FORMATTING_LDFLAGS) $(WK_WEBINSPECTORUI_LDFLAGS);
 
 // Prevent C++ standard library basic_stringstream, operator new, delete and their related exception types from being exported as weak symbols.
 UNEXPORTED_SYMBOL_LDFLAGS = -Wl,-unexported_symbol -Wl,__ZTISt9bad_alloc -Wl,-unexported_symbol -Wl,__ZTISt9exception -Wl,-unexported_symbol -Wl,__ZTSSt9bad_alloc -Wl,-unexported_symbol -Wl,__ZTSSt9exception -Wl,-unexported_symbol -Wl,__ZdlPvS_ -Wl,-unexported_symbol -Wl,__ZnwmPv -Wl,-unexported_symbol -Wl,__Znwm -Wl,-unexported_symbol -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEEEC2EOS4_ -Wl,-unexported_symbol -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEEEC1EOS4_ -Wl,-unexported_symbol -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEEEaSEDn -Wl,-unexported_symbol -Wl,__ZNKSt3__18functionIFvN7WebCore12PolicyActionEEEclES2_ -Wl,-unexported_symbol -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEEE4swapERS4_ -Wl,-unexported_symbol -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEEEC1ERKS4_ -Wl,-unexported_symbol -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEEEC2ERKS4_ -Wl,-unexported_symbol -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEE
 ED1Ev -Wl,-unexported_symbol -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEEED2Ev -Wl,-unexported_symbol -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEEEaSERKS4_ -Wl,-unexported_symbol -Wl,__ZTVNSt3__117bad_function_callE -Wl,-unexported_symbol -Wl,__ZTCNSt3__118basic_stringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEE0_NS_13basic_istreamIcS2_EE -Wl,-unexported_symbol -Wl,__ZTCNSt3__118basic_stringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEE0_NS_14basic_iostreamIcS2_EE -Wl,-unexported_symbol -Wl,__ZTCNSt3__118basic_stringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEE16_NS_13basic_ostreamIcS2_EE -Wl,-unexported_symbol -Wl,__ZTTNSt3__118basic_stringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEE -Wl,-unexported_symbol -Wl,__ZTVNSt3__115basic_stringbufIcNS_11char_traitsIcEENS_9allocatorIcEEEE -Wl,-unexported_symbol -Wl,__ZTVNSt3__118basic_stringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEE -Wl,-unexported_symbol -Wl,__ZTCNSt3__118basic_stringstreamIcNS_11char_traitsIcEE
 NS_9allocatorIcEEEE8_NS_13basic_ostreamIcS2_EE;

Modified: trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb (260649 => 260650)


--- trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2020-04-24 16:58:57 UTC (rev 260649)
+++ trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2020-04-24 17:02:15 UTC (rev 260650)
@@ -903,6 +903,7 @@
             "com.apple.mobileassetd.v2"
             "com.apple.nehelper"
             "com.apple.nesessionmanager.content-filter"
+            "com.apple.systemstatus.activityattribution"
             "com.apple.tccd"
             "com.apple.uikit.viewservice.com.apple.WebContentFilter.remoteUI"
             "com.apple.webinspector"

Modified: trunk/Source/WebKit/Scripts/process-entitlements.sh (260649 => 260650)


--- trunk/Source/WebKit/Scripts/process-entitlements.sh	2020-04-24 16:58:57 UTC (rev 260649)
+++ trunk/Source/WebKit/Scripts/process-entitlements.sh	2020-04-24 17:02:15 UTC (rev 260650)
@@ -144,6 +144,7 @@
     plistbuddy Add :com.apple.private.webinspector.allow-remote-inspection bool YES
     plistbuddy Add :com.apple.private.webinspector.proxy-application bool YES
     plistbuddy Add :com.apple.runningboard.assertions.webkit bool YES
+    plistbuddy Add :com.apple.systemstatus.activityattribution bool YES
     plistbuddy Add :dynamic-codesigning bool YES
 
     plistbuddy Add :com.apple.tcc.delegated-services array
@@ -150,6 +151,9 @@
     plistbuddy Add :com.apple.tcc.delegated-services:0 string kTCCServiceCamera
     plistbuddy Add :com.apple.tcc.delegated-services:1 string kTCCServiceMicrophone
 
+    plistbuddy Add :com.apple.security.exception.mach-lookup.global-name array
+    plistbuddy Add :com.apple.security.exception.mach-lookup.global-name:0 string com.apple.systemstatus.activityattribution
+
     plistbuddy Add :seatbelt-profiles array
     plistbuddy Add :seatbelt-profiles:0 string com.apple.WebKit.WebContent
 }

Modified: trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp (260649 => 260650)


--- trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp	2020-04-24 16:58:57 UTC (rev 260649)
+++ trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp	2020-04-24 17:02:15 UTC (rev 260650)
@@ -165,6 +165,11 @@
 #if PLATFORM(IOS_FAMILY)
     encoder << diagnosticsExtensionHandle;
     encoder << runningboardExtensionHandle;
+#endif
+#if HAVE(SYSTEM_STATUS_ATTRIBUTION)
+    encoder << systemStatusActivityAttributionExtensionHandle;
+#endif
+#if PLATFORM(IOS_FAMILY)
     encoder << dynamicMachExtensionHandles;
     encoder << dynamicIOKitExtensionHandles;
 #endif
@@ -453,6 +458,14 @@
         return false;
     parameters.runningboardExtensionHandle = WTFMove(*runningboardExtensionHandle);
 
+#if HAVE(SYSTEM_STATUS_ATTRIBUTION)
+    Optional<Optional<SandboxExtension::Handle>> systemStatusActivityAttributionExtensionHandle;
+    decoder >> systemStatusActivityAttributionExtensionHandle;
+    if (!systemStatusActivityAttributionExtensionHandle)
+        return false;
+    parameters.systemStatusActivityAttributionExtensionHandle = WTFMove(*systemStatusActivityAttributionExtensionHandle);
+#endif
+
     Optional<SandboxExtension::HandleArray> dynamicMachExtensionHandles;
     decoder >> dynamicMachExtensionHandles;
     if (!dynamicMachExtensionHandles)

Modified: trunk/Source/WebKit/Shared/WebProcessCreationParameters.h (260649 => 260650)


--- trunk/Source/WebKit/Shared/WebProcessCreationParameters.h	2020-04-24 16:58:57 UTC (rev 260649)
+++ trunk/Source/WebKit/Shared/WebProcessCreationParameters.h	2020-04-24 17:02:15 UTC (rev 260650)
@@ -208,6 +208,9 @@
     SandboxExtension::HandleArray dynamicMachExtensionHandles;
     SandboxExtension::HandleArray dynamicIOKitExtensionHandles;
 #endif
+#if HAVE(SYSTEM_STATUS_ATTRIBUTION)
+    Optional<SandboxExtension::Handle> systemStatusActivityAttributionExtensionHandle;
+#endif
 
 #if PLATFORM(COCOA)
     Optional<SandboxExtension::Handle> neHelperExtensionHandle;

Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm (260649 => 260650)


--- trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm	2020-04-24 16:58:57 UTC (rev 260649)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm	2020-04-24 17:02:15 UTC (rev 260650)
@@ -374,6 +374,12 @@
     if (SandboxExtension::createHandleForMachLookup("com.apple.runningboard", WTF::nullopt, runningboardExtensionHandle, SandboxExtension::Flags::NoReport))
         parameters.runningboardExtensionHandle = WTFMove(runningboardExtensionHandle);
 
+#if HAVE(SYSTEM_STATUS_ATTRIBUTION)
+    SandboxExtension::Handle systemStatusActivityAttributionExtensionHandle;
+    if (SandboxExtension::createHandleForMachLookup("com.apple.systemstatus.activityattribution", WTF::nullopt, systemStatusActivityAttributionExtensionHandle, SandboxExtension::Flags::NoReport))
+        parameters.systemStatusActivityAttributionExtensionHandle = WTFMove(systemStatusActivityAttributionExtensionHandle);
+#endif
+
     if (WebCore::deviceHasAGXCompilerService()) {
         static const char* const ioKitClasses[] = {
             "AGXCommandQueue",

Modified: trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj (260649 => 260650)


--- trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj	2020-04-24 16:58:57 UTC (rev 260649)
+++ trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj	2020-04-24 17:02:15 UTC (rev 260650)
@@ -1774,6 +1774,7 @@
 		CEC8F9CB1FDF5870002635E7 /* WKWebProcessPlugInNodeHandlePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = CEC8F9CA1FDF5870002635E7 /* WKWebProcessPlugInNodeHandlePrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		CEDA12E3152CD1B300D9E08D /* WebAlternativeTextClient.h in Headers */ = {isa = PBXBuildFile; fileRef = CEDA12DE152CCAE800D9E08D /* WebAlternativeTextClient.h */; };
 		CEE4AE2B1A5DCF430002F49B /* UIKitSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = CEE4AE2A1A5DCF430002F49B /* UIKitSPI.h */; };
+		CFCFD5EB244E6BB80054543C /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = CFCFD5EA244E6BB00054543C /* InfoPlist.strings */; };
 		D3B9484711FF4B6500032B39 /* WebPopupMenu.h in Headers */ = {isa = PBXBuildFile; fileRef = D3B9484311FF4B6500032B39 /* WebPopupMenu.h */; };
 		D3B9484911FF4B6500032B39 /* WebSearchPopupMenu.h in Headers */ = {isa = PBXBuildFile; fileRef = D3B9484511FF4B6500032B39 /* WebSearchPopupMenu.h */; };
 		DF462E0F23F22F5500EFF35F /* WKHTTPCookieStorePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = DF462E0E23F22F5300EFF35F /* WKHTTPCookieStorePrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -5228,6 +5229,7 @@
 		CEDA12DE152CCAE800D9E08D /* WebAlternativeTextClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebAlternativeTextClient.h; sourceTree = "<group>"; };
 		CEDA12DF152CCAE800D9E08D /* WebAlternativeTextClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebAlternativeTextClient.cpp; sourceTree = "<group>"; };
 		CEE4AE2A1A5DCF430002F49B /* UIKitSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIKitSPI.h; sourceTree = "<group>"; };
+		CFCFD5EA244E6BB00054543C /* InfoPlist.strings */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; path = InfoPlist.strings; sourceTree = "<group>"; };
 		D3B9484211FF4B6500032B39 /* WebPopupMenu.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebPopupMenu.cpp; sourceTree = "<group>"; };
 		D3B9484311FF4B6500032B39 /* WebPopupMenu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebPopupMenu.h; sourceTree = "<group>"; };
 		D3B9484411FF4B6500032B39 /* WebSearchPopupMenu.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebSearchPopupMenu.cpp; sourceTree = "<group>"; };
@@ -9752,6 +9754,7 @@
 			children = (
 				375FB4731883415600BE34D4 /* Info-iOS.plist */,
 				BCACC44016B24CAA00B6E092 /* Info-OSX.plist */,
+				CFCFD5EA244E6BB00054543C /* InfoPlist.strings */,
 			);
 			path = WebContentService;
 			sourceTree = "<group>";
@@ -12093,6 +12096,7 @@
 			isa = PBXResourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				CFCFD5EB244E6BB80054543C /* InfoPlist.strings in Resources */,
 				E1D26A53175964D90095BFD1 /* WebContentProcess.xib in Resources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;

Modified: trunk/Source/WebKit/WebProcess/EntryPoint/Cocoa/XPCService/WebContentService/Info-iOS.plist (260649 => 260650)


--- trunk/Source/WebKit/WebProcess/EntryPoint/Cocoa/XPCService/WebContentService/Info-iOS.plist	2020-04-24 16:58:57 UTC (rev 260649)
+++ trunk/Source/WebKit/WebProcess/EntryPoint/Cocoa/XPCService/WebContentService/Info-iOS.plist	2020-04-24 17:02:15 UTC (rev 260650)
@@ -43,5 +43,7 @@
 	</array>
 	<key>CanInheritApplicationStateFromOtherProcesses</key>
 	<true/>
+	<key>_WKGenericWebsiteName</key>
+	<string>Website</string>
 </dict>
 </plist>

Added: trunk/Source/WebKit/WebProcess/EntryPoint/Cocoa/XPCService/WebContentService/InfoPlist.strings (0 => 260650)


--- trunk/Source/WebKit/WebProcess/EntryPoint/Cocoa/XPCService/WebContentService/InfoPlist.strings	                        (rev 0)
+++ trunk/Source/WebKit/WebProcess/EntryPoint/Cocoa/XPCService/WebContentService/InfoPlist.strings	2020-04-24 17:02:15 UTC (rev 260650)
@@ -0,0 +1,29 @@
+/*
+* Copyright (C) 2020 Apple Inc. All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions
+* are met:
+* 1. Redistributions of source code must retain the above copyright
+*    notice, this list of conditions and the following disclaimer.
+* 2. Redistributions in binary form must reproduce the above copyright
+*    notice, this list of conditions and the following disclaimer in the
+*    documentation and/or other materials provided with the distribution.
+*
+* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+* THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/* Localized versions of Info.plist keys */
+
+/* Generic website attribution */
+"_WKGenericWebsiteName" = "Website";

Modified: trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm (260649 => 260650)


--- trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm	2020-04-24 16:58:57 UTC (rev 260649)
+++ trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm	2020-04-24 17:02:15 UTC (rev 260650)
@@ -94,6 +94,10 @@
 #import <_javascript_Core/RemoteInspector.h>
 #endif
 
+#if HAVE(SYSTEM_STATUS_ATTRIBUTION)
+#import <SystemStatus/STDynamicActivityAttributionPublisher.h>
+#endif
+
 #if PLATFORM(IOS)
 #import <WebCore/ParentalControlsContentFilter.h>
 #endif
@@ -193,7 +197,19 @@
         ASSERT_UNUSED(revoked, revoked);
     }
 #endif
+#if HAVE(SYSTEM_STATUS_ATTRIBUTION)
+    if (parameters.systemStatusActivityAttributionExtensionHandle) {
+        auto extension = SandboxExtension::create(WTFMove(*parameters.systemStatusActivityAttributionExtensionHandle));
+        bool consumed = extension->consume();
+        ASSERT_UNUSED(consumed, consumed);
 
+        [STDynamicActivityAttributionPublisher setCurrentAttributionKey:@"_WKGenericWebsiteName" andApp:nil];
+
+        bool revoked = extension->revoke();
+        ASSERT_UNUSED(revoked, revoked);
+    }
+#endif
+
 #if !LOG_DISABLED || !RELEASE_LOG_DISABLED
     WebCore::initializeLogChannelsIfNecessary(parameters.webCoreLoggingChannels);
     WebKit::initializeLogChannelsIfNecessary(parameters.webKitLoggingChannels);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to