Title: [291810] trunk/Source/WebKit
- Revision
- 291810
- Author
- pvol...@apple.com
- Date
- 2022-03-24 12:36:17 -0700 (Thu, 24 Mar 2022)
Log Message
[iOS] Disable unneeded code when content filtering is running in the Network process
https://bugs.webkit.org/show_bug.cgi?id=238332
Reviewed by Geoffrey Garen.
* Shared/Cocoa/LoadParametersCocoa.mm:
(WebKit::LoadParameters::platformEncode const):
(WebKit::LoadParameters::platformDecode):
* Shared/LoadParameters.h:
* UIProcess/Cocoa/WebPageProxyCocoa.mm:
(WebKit::WebPageProxy::addPlatformLoadParameters):
* UIProcess/WebProcessProxy.h:
* WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
(WebKit::WebPage::platformDidReceiveLoadParameters):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (291809 => 291810)
--- trunk/Source/WebKit/ChangeLog 2022-03-24 18:52:26 UTC (rev 291809)
+++ trunk/Source/WebKit/ChangeLog 2022-03-24 19:36:17 UTC (rev 291810)
@@ -1,3 +1,20 @@
+2022-03-24 Per Arne Vollan <pvol...@apple.com>
+
+ [iOS] Disable unneeded code when content filtering is running in the Network process
+ https://bugs.webkit.org/show_bug.cgi?id=238332
+
+ Reviewed by Geoffrey Garen.
+
+ * Shared/Cocoa/LoadParametersCocoa.mm:
+ (WebKit::LoadParameters::platformEncode const):
+ (WebKit::LoadParameters::platformDecode):
+ * Shared/LoadParameters.h:
+ * UIProcess/Cocoa/WebPageProxyCocoa.mm:
+ (WebKit::WebPageProxy::addPlatformLoadParameters):
+ * UIProcess/WebProcessProxy.h:
+ * WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
+ (WebKit::WebPage::platformDidReceiveLoadParameters):
+
2022-03-24 Elliott Williams <e...@apple.com>
[XCBuild] WebKit: Use native headers + build rules for migrated headers
Modified: trunk/Source/WebKit/Shared/Cocoa/LoadParametersCocoa.mm (291809 => 291810)
--- trunk/Source/WebKit/Shared/Cocoa/LoadParametersCocoa.mm 2022-03-24 18:52:26 UTC (rev 291809)
+++ trunk/Source/WebKit/Shared/Cocoa/LoadParametersCocoa.mm 2022-03-24 19:36:17 UTC (rev 291810)
@@ -39,11 +39,11 @@
#if !ENABLE(CONTENT_FILTERING_IN_NETWORKING_PROCESS)
encoder << networkExtensionSandboxExtensionHandles;
-#endif
#if PLATFORM(IOS)
encoder << contentFilterExtensionHandle;
encoder << frontboardServiceExtensionHandle;
#endif
+#endif
}
bool LoadParameters::platformDecode(IPC::Decoder& decoder, LoadParameters& parameters)
@@ -57,8 +57,6 @@
if (!networkExtensionSandboxExtensionHandles)
return false;
parameters.networkExtensionSandboxExtensionHandles = WTFMove(*networkExtensionSandboxExtensionHandles);
-#endif
-
#if PLATFORM(IOS)
std::optional<std::optional<SandboxExtension::Handle>> contentFilterExtensionHandle;
decoder >> contentFilterExtensionHandle;
@@ -71,7 +69,8 @@
if (!frontboardServiceExtensionHandle)
return false;
parameters.frontboardServiceExtensionHandle = WTFMove(*frontboardServiceExtensionHandle);
-#endif
+#endif // PLATFORM(IOS)
+#endif // !ENABLE(CONTENT_FILTERING_IN_NETWORKING_PROCESS)
return true;
}
Modified: trunk/Source/WebKit/Shared/LoadParameters.h (291809 => 291810)
--- trunk/Source/WebKit/Shared/LoadParameters.h 2022-03-24 18:52:26 UTC (rev 291809)
+++ trunk/Source/WebKit/Shared/LoadParameters.h 2022-03-24 19:36:17 UTC (rev 291810)
@@ -87,11 +87,11 @@
RetainPtr<NSDictionary> dataDetectionContext;
#if !ENABLE(CONTENT_FILTERING_IN_NETWORKING_PROCESS)
Vector<SandboxExtension::Handle> networkExtensionSandboxExtensionHandles;
-#endif
-#endif
#if PLATFORM(IOS)
std::optional<SandboxExtension::Handle> contentFilterExtensionHandle;
std::optional<SandboxExtension::Handle> frontboardServiceExtensionHandle;
+#endif // PLATFORM(IOS)
+#endif // !ENABLE(CONTENT_FILTERING_IN_NETWORKING_PROCESS)
#endif
};
Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm (291809 => 291810)
--- trunk/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm 2022-03-24 18:52:26 UTC (rev 291809)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm 2022-03-24 19:36:17 UTC (rev 291810)
@@ -200,7 +200,6 @@
#if !ENABLE(CONTENT_FILTERING_IN_NETWORKING_PROCESS)
loadParameters.networkExtensionSandboxExtensionHandles = createNetworkExtensionsSandboxExtensions(process);
-#endif
#if PLATFORM(IOS)
if (!process.hasManagedSessionSandboxAccess() && [getWebFilterEvaluatorClass() isManagedSession]) {
if (auto handle = SandboxExtension::createHandleForMachLookup("com.apple.uikit.viewservice.com.apple.WebContentFilter.remoteUI"_s, std::nullopt))
@@ -211,7 +210,8 @@
process.markHasManagedSessionSandboxAccess();
}
-#endif
+#endif // PLATFORM(IOS)
+#endif // !ENABLE(CONTENT_FILTERING_IN_NETWORKING_PROCESS)
}
void WebPageProxy::createSandboxExtensionsIfNeeded(const Vector<String>& files, SandboxExtension::Handle& fileReadHandle, Vector<SandboxExtension::Handle>& fileUploadHandles)
Modified: trunk/Source/WebKit/UIProcess/WebProcessProxy.h (291809 => 291810)
--- trunk/Source/WebKit/UIProcess/WebProcessProxy.h 2022-03-24 18:52:26 UTC (rev 291809)
+++ trunk/Source/WebKit/UIProcess/WebProcessProxy.h 2022-03-24 19:36:17 UTC (rev 291810)
@@ -391,7 +391,7 @@
bool hasNetworkExtensionSandboxAccess() const { return m_hasNetworkExtensionSandboxAccess; }
void markHasNetworkExtensionSandboxAccess() { m_hasNetworkExtensionSandboxAccess = true; }
#endif
-#if PLATFORM(IOS)
+#if PLATFORM(IOS) && !ENABLE(CONTENT_FILTERING_IN_NETWORKING_PROCESS)
bool hasManagedSessionSandboxAccess() const { return m_hasManagedSessionSandboxAccess; }
void markHasManagedSessionSandboxAccess() { m_hasManagedSessionSandboxAccess = true; }
#endif
@@ -629,7 +629,7 @@
#if PLATFORM(COCOA)
bool m_hasNetworkExtensionSandboxAccess { false };
#endif
-#if PLATFORM(IOS)
+#if PLATFORM(IOS) && !ENABLE(CONTENT_FILTERING_IN_NETWORKING_PROCESS)
bool m_hasManagedSessionSandboxAccess { false };
#endif
Modified: trunk/Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm (291809 => 291810)
--- trunk/Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm 2022-03-24 18:52:26 UTC (rev 291809)
+++ trunk/Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm 2022-03-24 19:36:17 UTC (rev 291810)
@@ -84,8 +84,6 @@
#if !ENABLE(CONTENT_FILTERING_IN_NETWORKING_PROCESS)
consumeNetworkExtensionSandboxExtensions(parameters.networkExtensionSandboxExtensionHandles);
-#endif
-
#if PLATFORM(IOS)
if (parameters.contentFilterExtensionHandle)
SandboxExtension::consumePermanently(*parameters.contentFilterExtensionHandle);
@@ -93,7 +91,8 @@
if (parameters.frontboardServiceExtensionHandle)
SandboxExtension::consumePermanently(*parameters.frontboardServiceExtensionHandle);
-#endif
+#endif // PLATFORM(IOS)
+#endif // !ENABLE(CONTENT_FILTERING_IN_NETWORKING_PROCESS)
}
void WebPage::requestActiveNowPlayingSessionInfo(CompletionHandler<void(bool, bool, const String&, double, double, uint64_t)>&& completionHandler)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes