Expose more WKPreferences SPI to match C SPI
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Oct 2017 16:50:13 +0000 (16:50 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Oct 2017 16:50:13 +0000 (16:50 +0000)
https://bugs.webkit.org/show_bug.cgi?id=177697
<rdar://problem/24110556>

Reviewed by Darin Adler.

* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _setJavaEnabledForLocalFiles:]):
(-[WKPreferences _javaEnabledForLocalFiles]):
(-[WKPreferences _setCanvasUsesAcceleratedDrawing:]):
(-[WKPreferences _canvasUsesAcceleratedDrawing]):
(-[WKPreferences _setAcceleratedCompositingEnabled:]):
(-[WKPreferences _acceleratedCompositingEnabled]):
(-[WKPreferences _setDefaultTextEncodingName:]):
(-[WKPreferences _defaultTextEncodingName]):
(-[WKPreferences _setNeedsSiteSpecificQuirks:]):
(-[WKPreferences _needsSiteSpecificQuirks]):
(-[WKPreferences _setAuthorAndUserStylesEnabled:]):
(-[WKPreferences _authorAndUserStylesEnabled]):
(-[WKPreferences _setDOMTimersThrottlingEnabled:]):
(-[WKPreferences _domTimersThrottlingEnabled]):
(-[WKPreferences _setWebArchiveDebugModeEnabled:]):
(-[WKPreferences _webArchiveDebugModeEnabled]):
(-[WKPreferences _setLocalFileContentSniffingEnabled:]):
(-[WKPreferences _localFileContentSniffingEnabled]):
(-[WKPreferences _setUsesPageCache:]):
(-[WKPreferences _usesPageCache]):
(-[WKPreferences _setPageCacheSupportsPlugins:]):
(-[WKPreferences _pageCacheSupportsPlugins]):
(-[WKPreferences _setShouldPrintBackgrounds:]):
(-[WKPreferences _shouldPrintBackgrounds]):
(-[WKPreferences _setWebSecurityEnabled:]):
(-[WKPreferences _webSecurityEnabled]):
(-[WKPreferences _setUniversalAccessFromFileURLsAllowed:]):
(-[WKPreferences _universalAccessFromFileURLsAllowed]):
(-[WKPreferences _setAVFoundationEnabled:]):
(-[WKPreferences _avFoundationEnabled]):
(-[WKPreferences _setSuppressesIncrementalRendering:]):
(-[WKPreferences _suppressesIncrementalRendering]):
(-[WKPreferences _setAsynchronousPluginInitializationEnabled:]):
(-[WKPreferences _asynchronousPluginInitializationEnabled]):
(-[WKPreferences _setArtificialPluginInitializationDelayEnabled:]):
(-[WKPreferences _artificialPluginInitializationDelayEnabled]):
(-[WKPreferences _setCookieEnabled:]):
(-[WKPreferences _cookieEnabled]):
(-[WKPreferences _setPlugInSnapshottingEnabled:]):
(-[WKPreferences _plugInSnapshottingEnabled]):
(-[WKPreferences _setQTKitEnabled:]):
(-[WKPreferences _qtKitEnabled]):
(-[WKPreferences _setSubpixelCSSOMElementMetricsEnabled:]):
(-[WKPreferences _subpixelCSSOMElementMetricsEnabled]):
(-[WKPreferences _setMediaSourceEnabled:]):
(-[WKPreferences _mediaSourceEnabled]):
(-[WKPreferences _setViewGestureDebuggingEnabled:]):
(-[WKPreferences _viewGestureDebuggingEnabled]):
(-[WKPreferences _setCSSAnimationTriggersEnabled:]):
(-[WKPreferences _cssAnimationTriggersEnabled]):
(-[WKPreferences _setStandardFontFamily:]):
(-[WKPreferences _standardFontFamily]):
(-[WKPreferences _setNotificationsEnabled:]):
(-[WKPreferences _notificationsEnabled]):
(-[WKPreferences _setBackspaceKeyNavigationEnabled:]):
(-[WKPreferences _backspaceKeyNavigationEnabled]):
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222711 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/ChangeLog
Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm
Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h

index ea6e42f..bdd95e9 100644 (file)
@@ -1,3 +1,70 @@
+2017-10-02  Alex Christensen  <achristensen@webkit.org>
+
+        Expose more WKPreferences SPI to match C SPI
+        https://bugs.webkit.org/show_bug.cgi?id=177697
+        <rdar://problem/24110556>
+
+        Reviewed by Darin Adler.
+
+        * UIProcess/API/Cocoa/WKPreferences.mm:
+        (-[WKPreferences _setJavaEnabledForLocalFiles:]):
+        (-[WKPreferences _javaEnabledForLocalFiles]):
+        (-[WKPreferences _setCanvasUsesAcceleratedDrawing:]):
+        (-[WKPreferences _canvasUsesAcceleratedDrawing]):
+        (-[WKPreferences _setAcceleratedCompositingEnabled:]):
+        (-[WKPreferences _acceleratedCompositingEnabled]):
+        (-[WKPreferences _setDefaultTextEncodingName:]):
+        (-[WKPreferences _defaultTextEncodingName]):
+        (-[WKPreferences _setNeedsSiteSpecificQuirks:]):
+        (-[WKPreferences _needsSiteSpecificQuirks]):
+        (-[WKPreferences _setAuthorAndUserStylesEnabled:]):
+        (-[WKPreferences _authorAndUserStylesEnabled]):
+        (-[WKPreferences _setDOMTimersThrottlingEnabled:]):
+        (-[WKPreferences _domTimersThrottlingEnabled]):
+        (-[WKPreferences _setWebArchiveDebugModeEnabled:]):
+        (-[WKPreferences _webArchiveDebugModeEnabled]):
+        (-[WKPreferences _setLocalFileContentSniffingEnabled:]):
+        (-[WKPreferences _localFileContentSniffingEnabled]):
+        (-[WKPreferences _setUsesPageCache:]):
+        (-[WKPreferences _usesPageCache]):
+        (-[WKPreferences _setPageCacheSupportsPlugins:]):
+        (-[WKPreferences _pageCacheSupportsPlugins]):
+        (-[WKPreferences _setShouldPrintBackgrounds:]):
+        (-[WKPreferences _shouldPrintBackgrounds]):
+        (-[WKPreferences _setWebSecurityEnabled:]):
+        (-[WKPreferences _webSecurityEnabled]):
+        (-[WKPreferences _setUniversalAccessFromFileURLsAllowed:]):
+        (-[WKPreferences _universalAccessFromFileURLsAllowed]):
+        (-[WKPreferences _setAVFoundationEnabled:]):
+        (-[WKPreferences _avFoundationEnabled]):
+        (-[WKPreferences _setSuppressesIncrementalRendering:]):
+        (-[WKPreferences _suppressesIncrementalRendering]):
+        (-[WKPreferences _setAsynchronousPluginInitializationEnabled:]):
+        (-[WKPreferences _asynchronousPluginInitializationEnabled]):
+        (-[WKPreferences _setArtificialPluginInitializationDelayEnabled:]):
+        (-[WKPreferences _artificialPluginInitializationDelayEnabled]):
+        (-[WKPreferences _setCookieEnabled:]):
+        (-[WKPreferences _cookieEnabled]):
+        (-[WKPreferences _setPlugInSnapshottingEnabled:]):
+        (-[WKPreferences _plugInSnapshottingEnabled]):
+        (-[WKPreferences _setQTKitEnabled:]):
+        (-[WKPreferences _qtKitEnabled]):
+        (-[WKPreferences _setSubpixelCSSOMElementMetricsEnabled:]):
+        (-[WKPreferences _subpixelCSSOMElementMetricsEnabled]):
+        (-[WKPreferences _setMediaSourceEnabled:]):
+        (-[WKPreferences _mediaSourceEnabled]):
+        (-[WKPreferences _setViewGestureDebuggingEnabled:]):
+        (-[WKPreferences _viewGestureDebuggingEnabled]):
+        (-[WKPreferences _setCSSAnimationTriggersEnabled:]):
+        (-[WKPreferences _cssAnimationTriggersEnabled]):
+        (-[WKPreferences _setStandardFontFamily:]):
+        (-[WKPreferences _standardFontFamily]):
+        (-[WKPreferences _setNotificationsEnabled:]):
+        (-[WKPreferences _notificationsEnabled]):
+        (-[WKPreferences _setBackspaceKeyNavigationEnabled:]):
+        (-[WKPreferences _backspaceKeyNavigationEnabled]):
+        * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
+
 2017-10-02  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         [GTK][WPE] Enable interactive forms validation by default
index 757f41c..6be8ea8 100644 (file)
@@ -658,6 +658,286 @@ static _WKStorageBlockingPolicy toAPI(WebCore::SecurityOrigin::StorageBlockingPo
     return _preferences->pluginsEnabled();
 }
 
+- (void)_setJavaEnabledForLocalFiles:(BOOL)enabled
+{
+    _preferences->setJavaEnabledForLocalFiles(enabled);
+}
+
+- (BOOL)_javaEnabledForLocalFiles
+{
+    return _preferences->pluginsEnabled();
+}
+
+- (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);
index c5a1526..2370d7f 100644 (file)
@@ -121,6 +121,34 @@ typedef NS_OPTIONS(NSUInteger, _WKJavaScriptRuntimeFlags) {
 #if !TARGET_OS_IPHONE
 @property (nonatomic, setter=_setPlugInsEnabled:) BOOL _plugInsEnabled WK_API_AVAILABLE(macosx(WK_MAC_TBA));
 @property (nonatomic, setter=_setWebGLEnabled:) BOOL _webGLEnabled WK_API_AVAILABLE(macosx(WK_MAC_TBA));
+@property (nonatomic, setter=_setJavaEnabledForLocalFiles:) BOOL _javaEnabledForLocalFiles WK_API_AVAILABLE(macosx(WK_MAC_TBA));
+@property (nonatomic, setter=_setCanvasUsesAcceleratedDrawing:) BOOL _canvasUsesAcceleratedDrawing WK_API_AVAILABLE(macosx(WK_MAC_TBA));
+@property (nonatomic, setter=_setAcceleratedCompositingEnabled:) BOOL _acceleratedCompositingEnabled WK_API_AVAILABLE(macosx(WK_MAC_TBA));
+@property (nonatomic, setter=_setDefaultTextEncodingName:) NSString *_defaultTextEncodingName WK_API_AVAILABLE(macosx(WK_MAC_TBA));
+@property (nonatomic, setter=_setNeedsSiteSpecificQuirks:) BOOL _needsSiteSpecificQuirks WK_API_AVAILABLE(macosx(WK_MAC_TBA));
+@property (nonatomic, setter=_setAuthorAndUserStylesEnabled:) BOOL _authorAndUserStylesEnabled WK_API_AVAILABLE(macosx(WK_MAC_TBA));
+@property (nonatomic, setter=_setDOMTimersThrottlingEnabled:) BOOL _domTimersThrottlingEnabled WK_API_AVAILABLE(macosx(WK_MAC_TBA));
+@property (nonatomic, setter=_setWebArchiveDebugModeEnabled:) BOOL _webArchiveDebugModeEnabled WK_API_AVAILABLE(macosx(WK_MAC_TBA));
+@property (nonatomic, setter=_setLocalFileContentSniffingEnabled:) BOOL _localFileContentSniffingEnabled WK_API_AVAILABLE(macosx(WK_MAC_TBA));
+@property (nonatomic, setter=_setUsesPageCache:) BOOL _usesPageCache WK_API_AVAILABLE(macosx(WK_MAC_TBA));
+@property (nonatomic, setter=_setPageCacheSupportsPlugins:) BOOL _pageCacheSupportsPlugins WK_API_AVAILABLE(macosx(WK_MAC_TBA));
+@property (nonatomic, setter=_setShouldPrintBackgrounds:) BOOL _shouldPrintBackgrounds WK_API_AVAILABLE(macosx(WK_MAC_TBA));
+@property (nonatomic, setter=_setWebSecurityEnabled:) BOOL _webSecurityEnabled WK_API_AVAILABLE(macosx(WK_MAC_TBA));
+@property (nonatomic, setter=_setUniversalAccessFromFileURLsAllowed:) BOOL _universalAccessFromFileURLsAllowed WK_API_AVAILABLE(macosx(WK_MAC_TBA));
+@property (nonatomic, setter=_setAVFoundationEnabled:) BOOL _avFoundationEnabled WK_API_AVAILABLE(macosx(WK_MAC_TBA));
+@property (nonatomic, setter=_setSuppressesIncrementalRendering:) BOOL _suppressesIncrementalRendering WK_API_AVAILABLE(macosx(WK_MAC_TBA));
+@property (nonatomic, setter=_setAsynchronousPluginInitializationEnabled:) BOOL _asynchronousPluginInitializationEnabled WK_API_AVAILABLE(macosx(WK_MAC_TBA));
+@property (nonatomic, setter=_setArtificialPluginInitializationDelayEnabled:) BOOL _artificialPluginInitializationDelayEnabled WK_API_AVAILABLE(macosx(WK_MAC_TBA));
+@property (nonatomic, setter=_setCookieEnabled:) BOOL _cookieEnabled WK_API_AVAILABLE(macosx(WK_MAC_TBA));
+@property (nonatomic, setter=_setPlugInSnapshottingEnabled:) BOOL _plugInSnapshottingEnabled WK_API_AVAILABLE(macosx(WK_MAC_TBA));
+@property (nonatomic, setter=_setQTKitEnabled:) BOOL _qtKitEnabled WK_API_AVAILABLE(macosx(WK_MAC_TBA));
+@property (nonatomic, setter=_setSubpixelCSSOMElementMetricsEnabled:) BOOL _subpixelCSSOMElementMetricsEnabled WK_API_AVAILABLE(macosx(WK_MAC_TBA));
+@property (nonatomic, setter=_setMediaSourceEnabled:) BOOL _mediaSourceEnabled WK_API_AVAILABLE(macosx(WK_MAC_TBA));
+@property (nonatomic, setter=_setViewGestureDebuggingEnabled:) BOOL _viewGestureDebuggingEnabled WK_API_AVAILABLE(macosx(WK_MAC_TBA));
+@property (nonatomic, setter=_setCSSAnimationTriggersEnabled:) BOOL _cssAnimationTriggersEnabled WK_API_AVAILABLE(macosx(WK_MAC_TBA));
+@property (nonatomic, setter=_setStandardFontFamily:) NSString *_standardFontFamily WK_API_AVAILABLE(macosx(WK_MAC_TBA));
+@property (nonatomic, setter=_setNotificationsEnabled:) BOOL _notificationsEnabled WK_API_AVAILABLE(macosx(WK_MAC_TBA));
+@property (nonatomic, setter=_setBackspaceKeyNavigationEnabled:) BOOL _backspaceKeyNavigationEnabled WK_API_AVAILABLE(macosx(WK_MAC_TBA));
 #endif
 
 @end