[Cocoa] Add SPI to disallow user-installed fonts
[WebKit-https.git] / Source / WebKit / UIProcess / API / Cocoa / WKPreferences.mm
index f5990a0..76f4044 100644 (file)
     return self;
 }
 
+- (id)copyWithZone:(NSZone *)zone
+{
+    return wrapper(_preferences->copy().leakRef());
+}
+
 - (CGFloat)minimumFontSize
 {
     return _preferences->minimumFontSize();
@@ -539,12 +544,12 @@ static _WKStorageBlockingPolicy toAPI(WebCore::SecurityOrigin::StorageBlockingPo
 
 - (BOOL)_shouldSuppressKeyboardInputDuringProvisionalNavigation
 {
-    return _preferences->shouldSuppressKeyboardInputDuringProvisionalNavigation();
+    return _preferences->shouldSuppressTextInputFromEditingDuringProvisionalNavigation();
 }
 
 - (void)_setShouldSuppressKeyboardInputDuringProvisionalNavigation:(BOOL)shouldSuppress
 {
-    _preferences->setShouldSuppressKeyboardInputDuringProvisionalNavigation(shouldSuppress);
+    _preferences->setShouldSuppressTextInputFromEditingDuringProvisionalNavigation(shouldSuppress);
 }
 
 - (BOOL)_loadsImagesAutomatically
@@ -557,6 +562,16 @@ static _WKStorageBlockingPolicy toAPI(WebCore::SecurityOrigin::StorageBlockingPo
     _preferences->setLoadsImagesAutomatically(loadsImagesAutomatically);
 }
 
+- (BOOL)_peerConnectionEnabled
+{
+    return _preferences->peerConnectionEnabled();
+}
+
+- (void)_setPeerConnectionEnabled:(BOOL)enabled
+{
+    _preferences->setPeerConnectionEnabled(enabled);
+}
+
 - (BOOL)_mediaDevicesEnabled
 {
     return _preferences->mediaDevicesEnabled();
@@ -577,6 +592,16 @@ static _WKStorageBlockingPolicy toAPI(WebCore::SecurityOrigin::StorageBlockingPo
     _preferences->setMockCaptureDevicesEnabled(enabled);
 }
 
+- (BOOL)_mockCaptureDevicesPromptEnabled
+{
+    return _preferences->mockCaptureDevicesPromptEnabled();
+}
+
+- (void)_setMockCaptureDevicesPromptEnabled:(BOOL)enabled
+{
+    _preferences->setMockCaptureDevicesPromptEnabled(enabled);
+}
+
 - (BOOL)_mediaCaptureRequiresSecureConnection
 {
     return _preferences->mediaCaptureRequiresSecureConnection();
@@ -587,6 +612,16 @@ static _WKStorageBlockingPolicy toAPI(WebCore::SecurityOrigin::StorageBlockingPo
     _preferences->setMediaCaptureRequiresSecureConnection(requiresSecureConnection);
 }
 
+- (double)_inactiveMediaCaptureSteamRepromptIntervalInMinutes
+{
+    return _preferences->inactiveMediaCaptureSteamRepromptIntervalInMinutes();
+}
+
+- (void)_setInactiveMediaCaptureSteamRepromptIntervalInMinutes:(double)interval
+{
+    _preferences->setInactiveMediaCaptureSteamRepromptIntervalInMinutes(interval);
+}
+
 - (BOOL)_enumeratingAllNetworkInterfacesEnabled
 {
     return _preferences->enumeratingAllNetworkInterfacesEnabled();
@@ -597,7 +632,7 @@ static _WKStorageBlockingPolicy toAPI(WebCore::SecurityOrigin::StorageBlockingPo
     _preferences->setEnumeratingAllNetworkInterfacesEnabled(enabled);
 }
 
-- (BOOL)_iceCandidateFiltertingEnabled
+- (BOOL)_iceCandidateFilteringEnabled
 {
     return _preferences->iceCandidateFilteringEnabled();
 }
@@ -622,6 +657,308 @@ static _WKStorageBlockingPolicy toAPI(WebCore::SecurityOrigin::StorageBlockingPo
     _preferences->setJavaScriptCanAccessClipboard(javaScriptCanAccessClipboard);
 }
 
+- (BOOL)_shouldDisallowUserInstalledFonts
+{
+    return _preferences->shouldDisallowUserInstalledFonts();
+}
+
+- (void)_setShouldDisallowUserInstalledFonts:(BOOL)_shouldDisallowUserInstalledFonts
+{
+    _preferences->setShouldDisallowUserInstalledFonts(_shouldDisallowUserInstalledFonts);
+}
+
+#if PLATFORM(MAC)
+- (void)_setJavaEnabledForLocalFiles:(BOOL)enabled
+{
+    _preferences->setJavaEnabledForLocalFiles(enabled);
+}
+
+- (BOOL)_javaEnabledForLocalFiles
+{
+    return _preferences->javaEnabledForLocalFiles();
+}
+
+- (void)_setCanvasUsesAcceleratedDrawing:(BOOL)enabled
+{
+    _preferences->setCanvasUsesAcceleratedDrawing(enabled);
+}
+
+- (BOOL)_canvasUsesAcceleratedDrawing
+{
+    return _preferences->canvasUsesAcceleratedDrawing();
+}
+
+- (void)_setAcceleratedCompositingEnabled:(BOOL)enabled
+{
+    _preferences->setAcceleratedCompositingEnabled(enabled);
+}
+
+- (BOOL)_acceleratedCompositingEnabled
+{
+    return _preferences->acceleratedCompositingEnabled();
+}
+
+- (void)_setDefaultTextEncodingName:(NSString *)name
+{
+    _preferences->setDefaultTextEncodingName(name);
+}
+
+- (NSString *)_defaultTextEncodingName
+{
+    return _preferences->defaultTextEncodingName();
+}
+
+- (void)_setNeedsSiteSpecificQuirks:(BOOL)enabled
+{
+    _preferences->setNeedsSiteSpecificQuirks(enabled);
+}
+
+- (BOOL)_needsSiteSpecificQuirks
+{
+    return _preferences->needsSiteSpecificQuirks();
+}
+
+- (void)_setAuthorAndUserStylesEnabled:(BOOL)enabled
+{
+    _preferences->setAuthorAndUserStylesEnabled(enabled);
+}
+
+- (BOOL)_authorAndUserStylesEnabled
+{
+    return _preferences->authorAndUserStylesEnabled();
+}
+
+- (void)_setDOMTimersThrottlingEnabled:(BOOL)enabled
+{
+    _preferences->setDOMTimersThrottlingEnabled(enabled);
+}
+
+- (BOOL)_domTimersThrottlingEnabled
+{
+    return _preferences->domTimersThrottlingEnabled();
+}
+
+- (void)_setWebArchiveDebugModeEnabled:(BOOL)enabled
+{
+    _preferences->setWebArchiveDebugModeEnabled(enabled);
+}
+
+- (BOOL)_webArchiveDebugModeEnabled
+{
+    return _preferences->webArchiveDebugModeEnabled();
+}
+
+- (void)_setLocalFileContentSniffingEnabled:(BOOL)enabled
+{
+    _preferences->setLocalFileContentSniffingEnabled(enabled);
+}
+
+- (BOOL)_localFileContentSniffingEnabled
+{
+    return _preferences->localFileContentSniffingEnabled();
+}
+
+- (void)_setUsesPageCache:(BOOL)enabled
+{
+    _preferences->setUsesPageCache(enabled);
+}
+
+- (BOOL)_usesPageCache
+{
+    return _preferences->usesPageCache();
+}
+
+- (void)_setPageCacheSupportsPlugins:(BOOL)enabled
+{
+    _preferences->setPageCacheSupportsPlugins(enabled);
+}
+
+- (BOOL)_pageCacheSupportsPlugins
+{
+    return _preferences->pageCacheSupportsPlugins();
+}
+
+- (void)_setShouldPrintBackgrounds:(BOOL)enabled
+{
+    _preferences->setShouldPrintBackgrounds(enabled);
+}
+
+- (BOOL)_shouldPrintBackgrounds
+{
+    return _preferences->shouldPrintBackgrounds();
+}
+
+- (void)_setWebSecurityEnabled:(BOOL)enabled
+{
+    _preferences->setWebSecurityEnabled(enabled);
+}
+
+- (BOOL)_webSecurityEnabled
+{
+    return _preferences->webSecurityEnabled();
+}
+
+- (void)_setUniversalAccessFromFileURLsAllowed:(BOOL)enabled
+{
+    _preferences->setAllowUniversalAccessFromFileURLs(enabled);
+}
+
+- (BOOL)_universalAccessFromFileURLsAllowed
+{
+    return _preferences->allowUniversalAccessFromFileURLs();
+}
+
+- (void)_setAVFoundationEnabled:(BOOL)enabled
+{
+    _preferences->setAVFoundationEnabled(enabled);
+}
+
+- (BOOL)_avFoundationEnabled
+{
+    return _preferences->isAVFoundationEnabled();
+}
+
+- (void)_setSuppressesIncrementalRendering:(BOOL)enabled
+{
+    _preferences->setSuppressesIncrementalRendering(enabled);
+}
+
+- (BOOL)_suppressesIncrementalRendering
+{
+    return _preferences->suppressesIncrementalRendering();
+}
+
+- (void)_setAsynchronousPluginInitializationEnabled:(BOOL)enabled
+{
+    _preferences->setAsynchronousPluginInitializationEnabled(enabled);
+}
+
+- (BOOL)_asynchronousPluginInitializationEnabled
+{
+    return _preferences->asynchronousPluginInitializationEnabled();
+}
+
+- (void)_setArtificialPluginInitializationDelayEnabled:(BOOL)enabled
+{
+    _preferences->setArtificialPluginInitializationDelayEnabled(enabled);
+}
+
+- (BOOL)_artificialPluginInitializationDelayEnabled
+{
+    return _preferences->artificialPluginInitializationDelayEnabled();
+}
+
+- (void)_setCookieEnabled:(BOOL)enabled
+{
+    _preferences->setCookieEnabled(enabled);
+}
+
+- (BOOL)_cookieEnabled
+{
+    return _preferences->cookieEnabled();
+}
+
+- (void)_setPlugInSnapshottingEnabled:(BOOL)enabled
+{
+    _preferences->setPlugInSnapshottingEnabled(enabled);
+}
+
+- (BOOL)_plugInSnapshottingEnabled
+{
+    return _preferences->plugInSnapshottingEnabled();
+}
+
+- (void)_setQTKitEnabled:(BOOL)enabled
+{
+    _preferences->setQTKitEnabled(enabled);
+}
+
+- (BOOL)_qtKitEnabled
+{
+    return _preferences->isQTKitEnabled();
+}
+
+- (void)_setSubpixelCSSOMElementMetricsEnabled:(BOOL)enabled
+{
+    _preferences->setSubpixelCSSOMElementMetricsEnabled(enabled);
+}
+
+- (BOOL)_subpixelCSSOMElementMetricsEnabled
+{
+    return _preferences->subpixelCSSOMElementMetricsEnabled();
+}
+
+- (void)_setMediaSourceEnabled:(BOOL)enabled
+{
+    _preferences->setMediaSourceEnabled(enabled);
+}
+
+- (BOOL)_mediaSourceEnabled
+{
+    return _preferences->mediaSourceEnabled();
+}
+
+- (void)_setViewGestureDebuggingEnabled:(BOOL)enabled
+{
+    _preferences->setViewGestureDebuggingEnabled(enabled);
+}
+
+- (BOOL)_viewGestureDebuggingEnabled
+{
+    return _preferences->viewGestureDebuggingEnabled();
+}
+
+- (void)_setCSSAnimationTriggersEnabled:(BOOL)enabled
+{
+    _preferences->setCSSAnimationTriggersEnabled(enabled);
+}
+
+- (BOOL)_cssAnimationTriggersEnabled
+{
+    return _preferences->cssAnimationTriggersEnabled();
+}
+
+- (void)_setStandardFontFamily:(NSString *)family
+{
+    _preferences->setStandardFontFamily(family);
+}
+
+- (NSString *)_standardFontFamily
+{
+    return _preferences->standardFontFamily();
+}
+
+- (void)_setNotificationsEnabled:(BOOL)enabled
+{
+    _preferences->setNotificationsEnabled(enabled);
+}
+
+- (BOOL)_notificationsEnabled
+{
+    return _preferences->notificationsEnabled();
+}
+
+- (void)_setBackspaceKeyNavigationEnabled:(BOOL)enabled
+{
+    _preferences->setBackspaceKeyNavigationEnabled(enabled);
+}
+
+- (BOOL)_backspaceKeyNavigationEnabled
+{
+    return _preferences->backspaceKeyNavigationEnabled();
+}
+
+- (void)_setWebGLEnabled:(BOOL)enabled
+{
+    _preferences->setWebGLEnabled(enabled);
+}
+
+- (BOOL)_webGLEnabled
+{
+    return _preferences->webGLEnabled();
+}
+#endif // PLATFORM(MAC)
+
 - (BOOL)_javaScriptCanAccessClipboard
 {
     return _preferences->javaScriptCanAccessClipboard();