Log Message
New SPI to export a dictionary of runtime features https://bugs.webkit.org/show_bug.cgi?id=156645 <rdar://problem/23621666>
Reviewed by Darin Adler. Source/WebKit2: Add a new type of Preference for experimental features so that we can dynamically toggle them from a WebKit2 host. These are special keys that are tied to runtime flags. The host process can ask WebKit for the list of keys, each with a small description, in order to display UI. - Add HumanReadableName and HumanReadableDescription parameters to our macros, which are used when building a ExperimentalFeature. These are both empty strings for the existing preferences. At some point we should probably move all this to code generation rather than macros, so that we don't have to carry around unused parameters. - I've included two sample experimental features: WebGL2 and ShadowDOM. They are not actually hooked up to the runtime settings yet, but its pretty clear how that will happen. Note that these are new preferences that have an "Experimental" prefix. This is so toggling an experimental feature to off won't cause the feature to not work once it becomes stable enough to enable by default. In other words, when it moves out of the experimental stage, the experimental feature flag will be removed, and you'll no longer check for values with that key. - The ExperimentalFeature object is what the host process will read in order to show some UI. It contains the human readable info, as well as the actual key that can be used to query and toggle the experimental feature. * Shared/API/APIObject.h: Add the ExperimentalFeature. * Shared/Cocoa/APIObject.mm: (API::Object::newObject): Exposes a wrapper around a _WKExperimentalFeature ObjC type. * Shared/WebPreferencesDefinitions.h: Change all the existing macros to take the new parameters, and add the initial experimental keys. * Shared/WebPreferencesKeys.cpp: Add new parameters to existing macros. * Shared/WebPreferencesKeys.h: Ditto. * Shared/WebPreferencesStore.cpp: Ditto. (WebKit::defaults): * UIProcess/API/APIExperimentalFeature.cpp: The API side of the ExperimentalFeature. (API::ExperimentalFeature::create): (API::ExperimentalFeature::ExperimentalFeature): (API::ExperimentalFeature::~ExperimentalFeature): * UIProcess/API/APIExperimentalFeature.h: * UIProcess/API/Cocoa/WKPreferences.mm: The actual implementation of the SPI. (+[WKPreferences _experimentalFeatures]): Create and return a list of feature descriptors. (-[WKPreferences _isEnabledForFeature:]): Get the value. (-[WKPreferences _setEnabled:forFeature:]): Set the value. * UIProcess/API/Cocoa/WKPreferencesPrivate.h: * UIProcess/API/Cocoa/_WKExperimentalFeature.h: The ObjC version. * UIProcess/API/Cocoa/_WKExperimentalFeature.mm: (-[_WKExperimentalFeature dealloc]): (-[_WKExperimentalFeature description]): (-[_WKExperimentalFeature name]): (-[_WKExperimentalFeature key]): (-[_WKExperimentalFeature details]): (-[_WKExperimentalFeature _apiObject]): * UIProcess/API/Cocoa/_WKExperimentalFeatureInternal.h: Implementation of the wrapper. (WebKit::wrapper): * UIProcess/WebPreferences.cpp: The C++ implementation that provides the data for the ObjC API. (WebKit::globalExperimentalFeatures): (WebKit::WebPreferences::ExperimentalFeatures): (WebKit::WebPreferences::isEnabledForFeature): (WebKit::WebPreferences::setEnabledForFeature): * UIProcess/WebPreferences.h: * UIProcess/mac/WebPreferencesMac.mm: Update some macros. (WebKit::WebPreferences::platformInitializeStore): * WebProcess/WebPage/WebPage.cpp: Ditto (WebKit::WebPage::updatePreferences): * WebKit2.xcodeproj/project.pbxproj: Add the new files. Tools: Test the experimental features SPI on WKPreferences. * TestWebKitAPI/Tests/WebKit2Cocoa/Preferences.mm:
Modified Paths
- trunk/Source/WebKit2/ChangeLog
- trunk/Source/WebKit2/Shared/API/APIObject.h
- trunk/Source/WebKit2/Shared/Cocoa/APIObject.mm
- trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h
- trunk/Source/WebKit2/Shared/WebPreferencesKeys.cpp
- trunk/Source/WebKit2/Shared/WebPreferencesKeys.h
- trunk/Source/WebKit2/Shared/WebPreferencesStore.cpp
- trunk/Source/WebKit2/UIProcess/API/C/WKAPICast.h
- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKPreferences.mm
- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKPreferencesPrivate.h
- trunk/Source/WebKit2/UIProcess/WebPreferences.cpp
- trunk/Source/WebKit2/UIProcess/WebPreferences.h
- trunk/Source/WebKit2/UIProcess/mac/WebPreferencesMac.mm
- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
- trunk/Tools/ChangeLog
- trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/Preferences.mm
Added Paths
- trunk/Source/WebKit2/UIProcess/API/APIExperimentalFeature.cpp
- trunk/Source/WebKit2/UIProcess/API/APIExperimentalFeature.h
- trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKExperimentalFeature.h
- trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKExperimentalFeature.mm
- trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKExperimentalFeatureInternal.h
Diff
Modified: trunk/Source/WebKit2/ChangeLog (199699 => 199700)
--- trunk/Source/WebKit2/ChangeLog 2016-04-19 01:38:30 UTC (rev 199699)
+++ trunk/Source/WebKit2/ChangeLog 2016-04-19 01:46:48 UTC (rev 199700)
@@ -1,3 +1,87 @@
+2016-04-18 Dean Jackson <[email protected]>
+
+ New SPI to export a dictionary of runtime features
+ https://bugs.webkit.org/show_bug.cgi?id=156645
+ <rdar://problem/23621666>
+
+ Reviewed by Darin Adler.
+
+ Add a new type of Preference for experimental features so that we
+ can dynamically toggle them from a WebKit2 host. These are special
+ keys that are tied to runtime flags. The host process can ask WebKit
+ for the list of keys, each with a small description, in order to
+ display UI.
+
+ - Add HumanReadableName and HumanReadableDescription parameters to our
+ macros, which are used when building a ExperimentalFeature.
+ These are both empty strings for the existing preferences. At some
+ point we should probably move all this to code generation rather
+ than macros, so that we don't have to carry around unused parameters.
+
+ - I've included two sample experimental features: WebGL2 and ShadowDOM.
+ They are not actually hooked up to the runtime settings yet, but its
+ pretty clear how that will happen. Note that these are new preferences
+ that have an "Experimental" prefix. This is so toggling an experimental
+ feature to off won't cause the feature to not work once it becomes
+ stable enough to enable by default. In other words, when it moves
+ out of the experimental stage, the experimental feature flag will be
+ removed, and you'll no longer check for values with that key.
+
+ - The ExperimentalFeature object is what the host process
+ will read in order to show some UI. It contains the human readable info,
+ as well as the actual key that can be used to query and toggle the
+ experimental feature.
+
+ * Shared/API/APIObject.h: Add the ExperimentalFeature.
+
+ * Shared/Cocoa/APIObject.mm:
+ (API::Object::newObject): Exposes a wrapper around a _WKExperimentalFeature ObjC type.
+
+ * Shared/WebPreferencesDefinitions.h: Change all the existing macros to take the new
+ parameters, and add the initial experimental keys.
+
+ * Shared/WebPreferencesKeys.cpp: Add new parameters to existing macros.
+ * Shared/WebPreferencesKeys.h: Ditto.
+ * Shared/WebPreferencesStore.cpp: Ditto.
+ (WebKit::defaults):
+
+ * UIProcess/API/APIExperimentalFeature.cpp: The API side of the ExperimentalFeature.
+ (API::ExperimentalFeature::create):
+ (API::ExperimentalFeature::ExperimentalFeature):
+ (API::ExperimentalFeature::~ExperimentalFeature):
+ * UIProcess/API/APIExperimentalFeature.h:
+
+ * UIProcess/API/Cocoa/WKPreferences.mm: The actual implementation of the SPI.
+ (+[WKPreferences _experimentalFeatures]): Create and return a list of feature descriptors.
+ (-[WKPreferences _isEnabledForFeature:]): Get the value.
+ (-[WKPreferences _setEnabled:forFeature:]): Set the value.
+ * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
+
+ * UIProcess/API/Cocoa/_WKExperimentalFeature.h: The ObjC version.
+ * UIProcess/API/Cocoa/_WKExperimentalFeature.mm:
+ (-[_WKExperimentalFeature dealloc]):
+ (-[_WKExperimentalFeature description]):
+ (-[_WKExperimentalFeature name]):
+ (-[_WKExperimentalFeature key]):
+ (-[_WKExperimentalFeature details]):
+ (-[_WKExperimentalFeature _apiObject]):
+ * UIProcess/API/Cocoa/_WKExperimentalFeatureInternal.h: Implementation of the wrapper.
+ (WebKit::wrapper):
+
+ * UIProcess/WebPreferences.cpp: The C++ implementation that provides the data for the ObjC API.
+ (WebKit::globalExperimentalFeatures):
+ (WebKit::WebPreferences::ExperimentalFeatures):
+ (WebKit::WebPreferences::isEnabledForFeature):
+ (WebKit::WebPreferences::setEnabledForFeature):
+ * UIProcess/WebPreferences.h:
+
+ * UIProcess/mac/WebPreferencesMac.mm: Update some macros.
+ (WebKit::WebPreferences::platformInitializeStore):
+ * WebProcess/WebPage/WebPage.cpp: Ditto
+ (WebKit::WebPage::updatePreferences):
+
+ * WebKit2.xcodeproj/project.pbxproj: Add the new files.
+
2016-04-18 Tim Horton <[email protected]>
Swipe view gesture should be reversed in right-to-left contexts
Modified: trunk/Source/WebKit2/Shared/API/APIObject.h (199699 => 199700)
--- trunk/Source/WebKit2/Shared/API/APIObject.h 2016-04-19 01:38:30 UTC (rev 199699)
+++ trunk/Source/WebKit2/Shared/API/APIObject.h 2016-04-19 01:46:48 UTC (rev 199700)
@@ -107,6 +107,7 @@
ColorPickerResultListener,
CookieManager,
Download,
+ ExperimentalFeature,
FormSubmissionListener,
Frame,
FrameInfo,
Modified: trunk/Source/WebKit2/Shared/Cocoa/APIObject.mm (199699 => 199700)
--- trunk/Source/WebKit2/Shared/Cocoa/APIObject.mm 2016-04-19 01:38:30 UTC (rev 199699)
+++ trunk/Source/WebKit2/Shared/Cocoa/APIObject.mm 2016-04-19 01:46:48 UTC (rev 199700)
@@ -64,6 +64,7 @@
#import "WKWindowFeaturesInternal.h"
#import "_WKAutomationSessionInternal.h"
#import "_WKDownloadInternal.h"
+#import "_WKExperimentalFeatureInternal.h"
#import "_WKFrameHandleInternal.h"
#import "_WKHitTestResultInternal.h"
#import "_WKProcessPoolConfigurationInternal.h"
@@ -150,6 +151,10 @@
wrapper = [_WKDownload alloc];
break;
+ case Type::ExperimentalFeature:
+ wrapper = [_WKExperimentalFeature alloc];
+ break;
+
case Type::Error:
wrapper = NSAllocateObject([WKNSError self], size, nullptr);
break;
Modified: trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h (199699 => 199700)
--- trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h 2016-04-19 01:38:30 UTC (rev 199699)
+++ trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h 2016-04-19 01:46:48 UTC (rev 199700)
@@ -98,184 +98,189 @@
#define DEFAULT_CANVAS_USES_ACCELERATED_DRAWING true
#endif
-// macro(KeyUpper, KeyLower, TypeNameUpper, TypeName, DefaultValue)
+// macro(KeyUpper, KeyLower, TypeNameUpper, TypeName, DefaultValue, HumanReadableName, HumanReadableDescription)
#define FOR_EACH_WEBKIT_BOOL_PREFERENCE(macro) \
- macro(_javascript_Enabled, _javascript_Enabled, Bool, bool, true) \
- macro(_javascript_MarkupEnabled, _javascript_MarkupEnabled, Bool, bool, true) \
- macro(LoadsImagesAutomatically, loadsImagesAutomatically, Bool, bool, true) \
- macro(LoadsSiteIconsIgnoringImageLoadingPreference, loadsSiteIconsIgnoringImageLoadingPreference, Bool, bool, false) \
- macro(PluginsEnabled, pluginsEnabled, Bool, bool, false) \
- macro(JavaEnabled, javaEnabled, Bool, bool, false) \
- macro(JavaEnabledForLocalFiles, javaEnabledForLocalFiles, Bool, bool, false) \
- macro(OfflineWebApplicationCacheEnabled, offlineWebApplicationCacheEnabled, Bool, bool, false) \
- macro(LocalStorageEnabled, localStorageEnabled, Bool, bool, true) \
- macro(DatabasesEnabled, databasesEnabled, Bool, bool, true) \
- macro(XSSAuditorEnabled, xssAuditorEnabled, Bool, bool, true) \
- macro(FrameFlatteningEnabled, frameFlatteningEnabled, Bool, bool, DEFAULT_FRAME_FLATTENING_ENABLED) \
- macro(PrivateBrowsingEnabled, privateBrowsingEnabled, Bool, bool, false) \
- macro(TextAreasAreResizable, textAreasAreResizable, Bool, bool, DEFAULT_TEXT_AREAS_ARE_RESIZABLE) \
- macro(_javascript_CanOpenWindowsAutomatically, _javascript_CanOpenWindowsAutomatically, Bool, bool, DEFAULT_JAVASCRIPT_CAN_OPEN_WINDOWS_AUTOMATICALLY) \
- macro(HyperlinkAuditingEnabled, hyperlinkAuditingEnabled, Bool, bool, true) \
- macro(NeedsSiteSpecificQuirks, needsSiteSpecificQuirks, Bool, bool, false) \
- macro(AcceleratedCompositingEnabled, acceleratedCompositingEnabled, Bool, bool, true) \
- macro(ForceCompositingMode, forceCompositingMode, Bool, bool, false) \
- macro(CanvasUsesAcceleratedDrawing, canvasUsesAcceleratedDrawing, Bool, bool, DEFAULT_CANVAS_USES_ACCELERATED_DRAWING) \
- macro(WebGLEnabled, webGLEnabled, Bool, bool, true) \
- macro(ForceSoftwareWebGLRendering, forceSoftwareWebGLRendering, Bool, bool, false) \
- macro(Accelerated2dCanvasEnabled, accelerated2dCanvasEnabled, Bool, bool, false) \
- macro(CSSAnimationTriggersEnabled, cssAnimationTriggersEnabled, Bool, bool, true) \
- macro(WebAnimationsEnabled, webAnimationsEnabled, Bool, bool, false) \
- macro(CSSRegionsEnabled, cssRegionsEnabled, Bool, bool, true) \
- macro(CSSCompositingEnabled, cssCompositingEnabled, Bool, bool, true) \
- macro(ForceFTPDirectoryListings, forceFTPDirectoryListings, Bool, bool, false) \
- macro(TabsToLinks, tabsToLinks, Bool, bool, DEFAULT_WEBKIT_TABSTOLINKS_ENABLED) \
- macro(DNSPrefetchingEnabled, dnsPrefetchingEnabled, Bool, bool, false) \
- macro(DOMTimersThrottlingEnabled, domTimersThrottlingEnabled, Bool, bool, true) \
- macro(WebArchiveDebugModeEnabled, webArchiveDebugModeEnabled, Bool, bool, false) \
- macro(LocalFileContentSniffingEnabled, localFileContentSniffingEnabled, Bool, bool, false) \
- macro(UsesPageCache, usesPageCache, Bool, bool, true) \
- macro(PageCacheSupportsPlugins, pageCacheSupportsPlugins, Bool, bool, true) \
- macro(AuthorAndUserStylesEnabled, authorAndUserStylesEnabled, Bool, bool, true) \
- macro(PaginateDuringLayoutEnabled, paginateDuringLayoutEnabled, Bool, bool, false) \
- macro(DOMPasteAllowed, domPasteAllowed, Bool, bool, false) \
- macro(_javascript_CanAccessClipboard, _javascript_CanAccessClipboard, Bool, bool, false) \
- macro(ShouldPrintBackgrounds, shouldPrintBackgrounds, Bool, bool, DEFAULT_SHOULD_PRINT_BACKGROUNDS) \
- macro(FullScreenEnabled, fullScreenEnabled, Bool, bool, false) \
- macro(AsynchronousSpellCheckingEnabled, asynchronousSpellCheckingEnabled, Bool, bool, false) \
- macro(WebSecurityEnabled, webSecurityEnabled, Bool, bool, true) \
- macro(AllowUniversalAccessFromFileURLs, allowUniversalAccessFromFileURLs, Bool, bool, false) \
- macro(AllowFileAccessFromFileURLs, allowFileAccessFromFileURLs, Bool, bool, false) \
- macro(AVFoundationEnabled, isAVFoundationEnabled, Bool, bool, true) \
- macro(AVFoundationNSURLSessionEnabled, isAVFoundationNSURLSessionEnabled, Bool, bool, true) \
- macro(RequiresUserGestureForMediaPlayback, requiresUserGestureForMediaPlayback, Bool, bool, DEFAULT_REQUIRES_USER_GESTURE_FOR_MEDIA_PLAYBACK) \
- macro(RequiresUserGestureForVideoPlayback, requiresUserGestureForVideoPlayback, Bool, bool, false) \
- macro(RequiresUserGestureForAudioPlayback, requiresUserGestureForAudioPlayback, Bool, bool, false) \
- macro(MainContentUserGestureOverrideEnabled, mainContentUserGestureOverrideEnabled, Bool, bool, false) \
- macro(AllowsInlineMediaPlayback, allowsInlineMediaPlayback, Bool, bool, DEFAULT_ALLOWS_INLINE_MEDIA_PLAYBACK) \
- macro(InlineMediaPlaybackRequiresPlaysInlineAttribute, inlineMediaPlaybackRequiresPlaysInlineAttribute, Bool, bool, DEFAULT_INLINE_MEDIA_PLAYBACK_REQUIRES_PLAYS_INLINE_ATTRIBUTE) \
- macro(InvisibleAutoplayNotPermitted, invisibleAutoplayNotPermitted, Bool, bool, DEFAULT_INVISIBLE_AUTOPLAY_NOT_PERMITTED) \
- macro(MediaDataLoadsAutomatically, mediaDataLoadsAutomatically, Bool, bool, DEFAULT_MEDIA_DATA_LOADS_AUTOMATICALLY) \
- macro(AllowsPictureInPictureMediaPlayback, allowsPictureInPictureMediaPlayback, Bool, bool, true) \
- macro(AllowsAirPlayForMediaPlayback, allowsAirPlayForMediaPlayback, Bool, bool, true) \
- macro(MediaControlsScaleWithPageZoom, mediaControlsScaleWithPageZoom, Bool, bool, DEFAULT_MEDIA_CONTROLS_SCALE_WITH_PAGE_ZOOM) \
- macro(InspectorStartsAttached, inspectorStartsAttached, Bool, bool, true) \
- macro(ShowsToolTipOverTruncatedText, showsToolTipOverTruncatedText, Bool, bool, false) \
- macro(MockScrollbarsEnabled, mockScrollbarsEnabled, Bool, bool, false) \
- macro(WebAudioEnabled, webAudioEnabled, Bool, bool, true) \
- macro(AttachmentElementEnabled, attachmentElementEnabled, Bool, bool, false) \
- macro(SuppressesIncrementalRendering, suppressesIncrementalRendering, Bool, bool, false) \
- macro(BackspaceKeyNavigationEnabled, backspaceKeyNavigationEnabled, Bool, bool, DEFAULT_BACKSPACE_KEY_NAVIGATION_ENABLED) \
- macro(CaretBrowsingEnabled, caretBrowsingEnabled, Bool, bool, false) \
- macro(ShouldDisplaySubtitles, shouldDisplaySubtitles, Bool, bool, false) \
- macro(ShouldDisplayCaptions, shouldDisplayCaptions, Bool, bool, false) \
- macro(ShouldDisplayTextDescriptions, shouldDisplayTextDescriptions, Bool, bool, false) \
- macro(NotificationsEnabled, notificationsEnabled, Bool, bool, true) \
- macro(ShouldRespectImageOrientation, shouldRespectImageOrientation, Bool, bool, DEFAULT_SHOULD_RESPECT_IMAGE_ORIENTATION) \
- macro(WantsBalancedSetDefersLoadingBehavior, wantsBalancedSetDefersLoadingBehavior, Bool, bool, false) \
- macro(RequestAnimationFrameEnabled, requestAnimationFrameEnabled, Bool, bool, true) \
- macro(DiagnosticLoggingEnabled, diagnosticLoggingEnabled, Bool, bool, false) \
- macro(AsynchronousPluginInitializationEnabled, asynchronousPluginInitializationEnabled, Bool, bool, false) \
- macro(AsynchronousPluginInitializationEnabledForAllPlugins, asynchronousPluginInitializationEnabledForAllPlugins, Bool, bool, false) \
- macro(ArtificialPluginInitializationDelayEnabled, artificialPluginInitializationDelayEnabled, Bool, bool, false) \
- macro(TabToLinksEnabled, tabToLinksEnabled, Bool, bool, false) \
- macro(InteractiveFormValidationEnabled, interactiveFormValidationEnabled, Bool, bool, false) \
- macro(ScrollingPerformanceLoggingEnabled, scrollingPerformanceLoggingEnabled, Bool, bool, false) \
- macro(ScrollAnimatorEnabled, scrollAnimatorEnabled, Bool, bool, DEFAULT_WEBKIT_SCROLL_ANIMATOR_ENABLED) \
- macro(ForceUpdateScrollbarsOnMainThreadForPerformanceTesting, forceUpdateScrollbarsOnMainThreadForPerformanceTesting, Bool, bool, false) \
- macro(CookieEnabled, cookieEnabled, Bool, bool, true) \
- macro(PlugInSnapshottingEnabled, plugInSnapshottingEnabled, Bool, bool, false) \
- macro(SnapshotAllPlugIns, snapshotAllPlugIns, Bool, bool, false) \
- macro(AutostartOriginPlugInSnapshottingEnabled, autostartOriginPlugInSnapshottingEnabled, Bool, bool, true) \
- macro(PrimaryPlugInSnapshotDetectionEnabled, primaryPlugInSnapshotDetectionEnabled, Bool, bool, true) \
- macro(PDFPluginEnabled, pdfPluginEnabled, Bool, bool, DEFAULT_PDFPLUGIN_ENABLED) \
- macro(UsesEncodingDetector, usesEncodingDetector, Bool, bool, false) \
- macro(TextAutosizingEnabled, textAutosizingEnabled, Bool, bool, false) \
- macro(AggressiveTileRetentionEnabled, aggressiveTileRetentionEnabled, Bool, bool, false) \
- macro(TemporaryTileCohortRetentionEnabled, temporaryTileCohortRetentionEnabled, Bool, bool, DEFAULT_TEMPORARY_TILE_COHORT_RETENTION_ENABLED) \
- macro(QTKitEnabled, isQTKitEnabled, Bool, bool, WebCore::Settings::isQTKitEnabled()) \
- macro(PageVisibilityBasedProcessSuppressionEnabled, pageVisibilityBasedProcessSuppressionEnabled, Bool, bool, true) \
- macro(SmartInsertDeleteEnabled, smartInsertDeleteEnabled, Bool, bool, true) \
- macro(SelectTrailingWhitespaceEnabled, selectTrailingWhitespaceEnabled, Bool, bool, false) \
- macro(ShowsURLsInToolTipsEnabled, showsURLsInToolTipsEnabled, Bool, bool, false) \
- macro(AcceleratedCompositingForOverflowScrollEnabled, acceleratedCompositingForOverflowScrollEnabled, Bool, bool, false) \
- macro(HiddenPageDOMTimerThrottlingEnabled, hiddenPageDOMTimerThrottlingEnabled, Bool, bool, DEFAULT_HIDDEN_PAGE_DOM_TIMER_THROTTLING_ENABLED) \
- macro(HiddenPageDOMTimerThrottlingAutoIncreases, hiddenPageDOMTimerThrottlingAutoIncreases, Bool, bool, false) \
- macro(HiddenPageCSSAnimationSuspensionEnabled, hiddenPageCSSAnimationSuspensionEnabled, Bool, bool, DEFAULT_HIDDEN_PAGE_CSS_ANIMATION_SUSPENSION_ENABLED) \
- macro(LowPowerVideoAudioBufferSizeEnabled, lowPowerVideoAudioBufferSizeEnabled, Bool, bool, false) \
- macro(ThreadedScrollingEnabled, threadedScrollingEnabled, Bool, bool, true) \
- macro(SimpleLineLayoutEnabled, simpleLineLayoutEnabled, Bool, bool, true) \
- macro(SubpixelCSSOMElementMetricsEnabled, subpixelCSSOMElementMetricsEnabled, Bool, bool, false) \
- macro(UseGiantTiles, useGiantTiles, Bool, bool, false) \
- macro(MediaStreamEnabled, mediaStreamEnabled, Bool, bool, false) \
- macro(UseLegacyTextAlignPositionedElementBehavior, useLegacyTextAlignPositionedElementBehavior, Bool, bool, false) \
- macro(SpatialNavigationEnabled, spatialNavigationEnabled, Bool, bool, false) \
- macro(MediaSourceEnabled, mediaSourceEnabled, Bool, bool, true) \
- macro(ViewGestureDebuggingEnabled, viewGestureDebuggingEnabled, Bool, bool, false) \
- macro(ShouldConvertPositionStyleOnCopy, shouldConvertPositionStyleOnCopy, Bool, bool, false) \
- macro(Standalone, standalone, Bool, bool, false) \
- macro(TelephoneNumberParsingEnabled, telephoneNumberParsingEnabled, Bool, bool, false) \
- macro(AllowMultiElementImplicitSubmission, allowMultiElementImplicitSubmission, Bool, bool, false) \
- macro(AlwaysUseAcceleratedOverflowScroll, alwaysUseAcceleratedOverflowScroll, Bool, bool, false) \
- macro(PasswordEchoEnabled, passwordEchoEnabled, Bool, bool, DEFAULT_PASSWORD_ECHO_ENABLED) \
- macro(ImageControlsEnabled, imageControlsEnabled, Bool, bool, false) \
- macro(EnableInheritURIQueryComponent, enableInheritURIQueryComponent, Bool, bool, false) \
- macro(ServiceControlsEnabled, serviceControlsEnabled, Bool, bool, false) \
- macro(GamepadsEnabled, gamepadsEnabled, Bool, bool, false) \
- macro(NewBlockInsideInlineModelEnabled, newBlockInsideInlineModelEnabled, Bool, bool, false) \
- macro(HTTPEquivEnabled, httpEquivEnabled, Bool, bool, true) \
- macro(MockCaptureDevicesEnabled, mockCaptureDevicesEnabled, Bool, bool, false) \
- macro(ShadowDOMEnabled, shadowDOMEnabled, Bool, bool, true) \
- macro(CustomElementsEnabled, customElementsEnabled, Bool, bool, false) \
- macro(FetchAPIEnabled, fetchAPIEnabled, Bool, bool, false) \
- macro(WebGL2Enabled, webGL2Enabled, Bool, bool, false) \
- macro(DownloadAttributeEnabled, downloadAttributeEnabled, Bool, bool, false) \
+ macro(_javascript_Enabled, _javascript_Enabled, Bool, bool, true, "", "") \
+ macro(_javascript_MarkupEnabled, _javascript_MarkupEnabled, Bool, bool, true, "", "") \
+ macro(LoadsImagesAutomatically, loadsImagesAutomatically, Bool, bool, true, "", "") \
+ macro(LoadsSiteIconsIgnoringImageLoadingPreference, loadsSiteIconsIgnoringImageLoadingPreference, Bool, bool, false, "", "") \
+ macro(PluginsEnabled, pluginsEnabled, Bool, bool, false, "", "") \
+ macro(JavaEnabled, javaEnabled, Bool, bool, false, "", "") \
+ macro(JavaEnabledForLocalFiles, javaEnabledForLocalFiles, Bool, bool, false, "", "") \
+ macro(OfflineWebApplicationCacheEnabled, offlineWebApplicationCacheEnabled, Bool, bool, false, "", "") \
+ macro(LocalStorageEnabled, localStorageEnabled, Bool, bool, true, "", "") \
+ macro(DatabasesEnabled, databasesEnabled, Bool, bool, true, "", "") \
+ macro(XSSAuditorEnabled, xssAuditorEnabled, Bool, bool, true, "", "") \
+ macro(FrameFlatteningEnabled, frameFlatteningEnabled, Bool, bool, DEFAULT_FRAME_FLATTENING_ENABLED, "", "") \
+ macro(PrivateBrowsingEnabled, privateBrowsingEnabled, Bool, bool, false, "", "") \
+ macro(TextAreasAreResizable, textAreasAreResizable, Bool, bool, DEFAULT_TEXT_AREAS_ARE_RESIZABLE, "", "") \
+ macro(_javascript_CanOpenWindowsAutomatically, _javascript_CanOpenWindowsAutomatically, Bool, bool, DEFAULT_JAVASCRIPT_CAN_OPEN_WINDOWS_AUTOMATICALLY, "", "") \
+ macro(HyperlinkAuditingEnabled, hyperlinkAuditingEnabled, Bool, bool, true, "", "") \
+ macro(NeedsSiteSpecificQuirks, needsSiteSpecificQuirks, Bool, bool, false, "", "") \
+ macro(AcceleratedCompositingEnabled, acceleratedCompositingEnabled, Bool, bool, true, "", "") \
+ macro(ForceCompositingMode, forceCompositingMode, Bool, bool, false, "", "") \
+ macro(CanvasUsesAcceleratedDrawing, canvasUsesAcceleratedDrawing, Bool, bool, DEFAULT_CANVAS_USES_ACCELERATED_DRAWING, "", "") \
+ macro(WebGLEnabled, webGLEnabled, Bool, bool, true, "", "") \
+ macro(ForceSoftwareWebGLRendering, forceSoftwareWebGLRendering, Bool, bool, false, "", "") \
+ macro(Accelerated2dCanvasEnabled, accelerated2dCanvasEnabled, Bool, bool, false, "", "") \
+ macro(CSSAnimationTriggersEnabled, cssAnimationTriggersEnabled, Bool, bool, true, "", "") \
+ macro(WebAnimationsEnabled, webAnimationsEnabled, Bool, bool, false, "", "") \
+ macro(CSSRegionsEnabled, cssRegionsEnabled, Bool, bool, true, "", "") \
+ macro(CSSCompositingEnabled, cssCompositingEnabled, Bool, bool, true, "", "") \
+ macro(ForceFTPDirectoryListings, forceFTPDirectoryListings, Bool, bool, false, "", "") \
+ macro(TabsToLinks, tabsToLinks, Bool, bool, DEFAULT_WEBKIT_TABSTOLINKS_ENABLED, "", "") \
+ macro(DNSPrefetchingEnabled, dnsPrefetchingEnabled, Bool, bool, false, "", "") \
+ macro(DOMTimersThrottlingEnabled, domTimersThrottlingEnabled, Bool, bool, true, "", "") \
+ macro(WebArchiveDebugModeEnabled, webArchiveDebugModeEnabled, Bool, bool, false, "", "") \
+ macro(LocalFileContentSniffingEnabled, localFileContentSniffingEnabled, Bool, bool, false, "", "") \
+ macro(UsesPageCache, usesPageCache, Bool, bool, true, "", "") \
+ macro(PageCacheSupportsPlugins, pageCacheSupportsPlugins, Bool, bool, true, "", "") \
+ macro(AuthorAndUserStylesEnabled, authorAndUserStylesEnabled, Bool, bool, true, "", "") \
+ macro(PaginateDuringLayoutEnabled, paginateDuringLayoutEnabled, Bool, bool, false, "", "") \
+ macro(DOMPasteAllowed, domPasteAllowed, Bool, bool, false, "", "") \
+ macro(_javascript_CanAccessClipboard, _javascript_CanAccessClipboard, Bool, bool, false, "", "") \
+ macro(ShouldPrintBackgrounds, shouldPrintBackgrounds, Bool, bool, DEFAULT_SHOULD_PRINT_BACKGROUNDS, "", "") \
+ macro(FullScreenEnabled, fullScreenEnabled, Bool, bool, false, "", "") \
+ macro(AsynchronousSpellCheckingEnabled, asynchronousSpellCheckingEnabled, Bool, bool, false, "", "") \
+ macro(WebSecurityEnabled, webSecurityEnabled, Bool, bool, true, "", "") \
+ macro(AllowUniversalAccessFromFileURLs, allowUniversalAccessFromFileURLs, Bool, bool, false, "", "") \
+ macro(AllowFileAccessFromFileURLs, allowFileAccessFromFileURLs, Bool, bool, false, "", "") \
+ macro(AVFoundationEnabled, isAVFoundationEnabled, Bool, bool, true, "", "") \
+ macro(AVFoundationNSURLSessionEnabled, isAVFoundationNSURLSessionEnabled, Bool, bool, true, "", "") \
+ macro(RequiresUserGestureForMediaPlayback, requiresUserGestureForMediaPlayback, Bool, bool, DEFAULT_REQUIRES_USER_GESTURE_FOR_MEDIA_PLAYBACK, "", "") \
+ macro(RequiresUserGestureForVideoPlayback, requiresUserGestureForVideoPlayback, Bool, bool, false, "", "") \
+ macro(RequiresUserGestureForAudioPlayback, requiresUserGestureForAudioPlayback, Bool, bool, false, "", "") \
+ macro(MainContentUserGestureOverrideEnabled, mainContentUserGestureOverrideEnabled, Bool, bool, false, "", "") \
+ macro(AllowsInlineMediaPlayback, allowsInlineMediaPlayback, Bool, bool, DEFAULT_ALLOWS_INLINE_MEDIA_PLAYBACK, "", "") \
+ macro(InlineMediaPlaybackRequiresPlaysInlineAttribute, inlineMediaPlaybackRequiresPlaysInlineAttribute, Bool, bool, DEFAULT_INLINE_MEDIA_PLAYBACK_REQUIRES_PLAYS_INLINE_ATTRIBUTE, "", "") \
+ macro(InvisibleAutoplayNotPermitted, invisibleAutoplayNotPermitted, Bool, bool, DEFAULT_INVISIBLE_AUTOPLAY_NOT_PERMITTED, "", "") \
+ macro(MediaDataLoadsAutomatically, mediaDataLoadsAutomatically, Bool, bool, DEFAULT_MEDIA_DATA_LOADS_AUTOMATICALLY, "", "") \
+ macro(AllowsPictureInPictureMediaPlayback, allowsPictureInPictureMediaPlayback, Bool, bool, true, "", "") \
+ macro(AllowsAirPlayForMediaPlayback, allowsAirPlayForMediaPlayback, Bool, bool, true, "", "") \
+ macro(MediaControlsScaleWithPageZoom, mediaControlsScaleWithPageZoom, Bool, bool, DEFAULT_MEDIA_CONTROLS_SCALE_WITH_PAGE_ZOOM, "", "") \
+ macro(InspectorStartsAttached, inspectorStartsAttached, Bool, bool, true, "", "") \
+ macro(ShowsToolTipOverTruncatedText, showsToolTipOverTruncatedText, Bool, bool, false, "", "") \
+ macro(MockScrollbarsEnabled, mockScrollbarsEnabled, Bool, bool, false, "", "") \
+ macro(WebAudioEnabled, webAudioEnabled, Bool, bool, true, "", "") \
+ macro(AttachmentElementEnabled, attachmentElementEnabled, Bool, bool, false, "", "") \
+ macro(SuppressesIncrementalRendering, suppressesIncrementalRendering, Bool, bool, false, "", "") \
+ macro(BackspaceKeyNavigationEnabled, backspaceKeyNavigationEnabled, Bool, bool, DEFAULT_BACKSPACE_KEY_NAVIGATION_ENABLED, "", "") \
+ macro(CaretBrowsingEnabled, caretBrowsingEnabled, Bool, bool, false, "", "") \
+ macro(ShouldDisplaySubtitles, shouldDisplaySubtitles, Bool, bool, false, "", "") \
+ macro(ShouldDisplayCaptions, shouldDisplayCaptions, Bool, bool, false, "", "") \
+ macro(ShouldDisplayTextDescriptions, shouldDisplayTextDescriptions, Bool, bool, false, "", "") \
+ macro(NotificationsEnabled, notificationsEnabled, Bool, bool, true, "", "") \
+ macro(ShouldRespectImageOrientation, shouldRespectImageOrientation, Bool, bool, DEFAULT_SHOULD_RESPECT_IMAGE_ORIENTATION, "", "") \
+ macro(WantsBalancedSetDefersLoadingBehavior, wantsBalancedSetDefersLoadingBehavior, Bool, bool, false, "", "") \
+ macro(RequestAnimationFrameEnabled, requestAnimationFrameEnabled, Bool, bool, true, "", "") \
+ macro(DiagnosticLoggingEnabled, diagnosticLoggingEnabled, Bool, bool, false, "", "") \
+ macro(AsynchronousPluginInitializationEnabled, asynchronousPluginInitializationEnabled, Bool, bool, false, "", "") \
+ macro(AsynchronousPluginInitializationEnabledForAllPlugins, asynchronousPluginInitializationEnabledForAllPlugins, Bool, bool, false, "", "") \
+ macro(ArtificialPluginInitializationDelayEnabled, artificialPluginInitializationDelayEnabled, Bool, bool, false, "", "") \
+ macro(TabToLinksEnabled, tabToLinksEnabled, Bool, bool, false, "", "") \
+ macro(InteractiveFormValidationEnabled, interactiveFormValidationEnabled, Bool, bool, false, "", "") \
+ macro(ScrollingPerformanceLoggingEnabled, scrollingPerformanceLoggingEnabled, Bool, bool, false, "", "") \
+ macro(ScrollAnimatorEnabled, scrollAnimatorEnabled, Bool, bool, DEFAULT_WEBKIT_SCROLL_ANIMATOR_ENABLED, "", "") \
+ macro(ForceUpdateScrollbarsOnMainThreadForPerformanceTesting, forceUpdateScrollbarsOnMainThreadForPerformanceTesting, Bool, bool, false, "", "") \
+ macro(CookieEnabled, cookieEnabled, Bool, bool, true, "", "") \
+ macro(PlugInSnapshottingEnabled, plugInSnapshottingEnabled, Bool, bool, false, "", "") \
+ macro(SnapshotAllPlugIns, snapshotAllPlugIns, Bool, bool, false, "", "") \
+ macro(AutostartOriginPlugInSnapshottingEnabled, autostartOriginPlugInSnapshottingEnabled, Bool, bool, true, "", "") \
+ macro(PrimaryPlugInSnapshotDetectionEnabled, primaryPlugInSnapshotDetectionEnabled, Bool, bool, true, "", "") \
+ macro(PDFPluginEnabled, pdfPluginEnabled, Bool, bool, DEFAULT_PDFPLUGIN_ENABLED, "", "") \
+ macro(UsesEncodingDetector, usesEncodingDetector, Bool, bool, false, "", "") \
+ macro(TextAutosizingEnabled, textAutosizingEnabled, Bool, bool, false, "", "") \
+ macro(AggressiveTileRetentionEnabled, aggressiveTileRetentionEnabled, Bool, bool, false, "", "") \
+ macro(TemporaryTileCohortRetentionEnabled, temporaryTileCohortRetentionEnabled, Bool, bool, DEFAULT_TEMPORARY_TILE_COHORT_RETENTION_ENABLED, "", "") \
+ macro(QTKitEnabled, isQTKitEnabled, Bool, bool, WebCore::Settings::isQTKitEnabled(), "", "") \
+ macro(PageVisibilityBasedProcessSuppressionEnabled, pageVisibilityBasedProcessSuppressionEnabled, Bool, bool, true, "", "") \
+ macro(SmartInsertDeleteEnabled, smartInsertDeleteEnabled, Bool, bool, true, "", "") \
+ macro(SelectTrailingWhitespaceEnabled, selectTrailingWhitespaceEnabled, Bool, bool, false, "", "") \
+ macro(ShowsURLsInToolTipsEnabled, showsURLsInToolTipsEnabled, Bool, bool, false, "", "") \
+ macro(AcceleratedCompositingForOverflowScrollEnabled, acceleratedCompositingForOverflowScrollEnabled, Bool, bool, false, "", "") \
+ macro(HiddenPageDOMTimerThrottlingEnabled, hiddenPageDOMTimerThrottlingEnabled, Bool, bool, DEFAULT_HIDDEN_PAGE_DOM_TIMER_THROTTLING_ENABLED, "", "") \
+ macro(HiddenPageDOMTimerThrottlingAutoIncreases, hiddenPageDOMTimerThrottlingAutoIncreases, Bool, bool, false, "", "") \
+ macro(HiddenPageCSSAnimationSuspensionEnabled, hiddenPageCSSAnimationSuspensionEnabled, Bool, bool, DEFAULT_HIDDEN_PAGE_CSS_ANIMATION_SUSPENSION_ENABLED, "", "") \
+ macro(LowPowerVideoAudioBufferSizeEnabled, lowPowerVideoAudioBufferSizeEnabled, Bool, bool, false, "", "") \
+ macro(ThreadedScrollingEnabled, threadedScrollingEnabled, Bool, bool, true, "", "") \
+ macro(SimpleLineLayoutEnabled, simpleLineLayoutEnabled, Bool, bool, true, "", "") \
+ macro(SubpixelCSSOMElementMetricsEnabled, subpixelCSSOMElementMetricsEnabled, Bool, bool, false, "", "") \
+ macro(UseGiantTiles, useGiantTiles, Bool, bool, false, "", "") \
+ macro(MediaStreamEnabled, mediaStreamEnabled, Bool, bool, false, "", "") \
+ macro(UseLegacyTextAlignPositionedElementBehavior, useLegacyTextAlignPositionedElementBehavior, Bool, bool, false, "", "") \
+ macro(SpatialNavigationEnabled, spatialNavigationEnabled, Bool, bool, false, "", "") \
+ macro(MediaSourceEnabled, mediaSourceEnabled, Bool, bool, true, "", "") \
+ macro(ViewGestureDebuggingEnabled, viewGestureDebuggingEnabled, Bool, bool, false, "", "") \
+ macro(ShouldConvertPositionStyleOnCopy, shouldConvertPositionStyleOnCopy, Bool, bool, false, "", "") \
+ macro(Standalone, standalone, Bool, bool, false, "", "") \
+ macro(TelephoneNumberParsingEnabled, telephoneNumberParsingEnabled, Bool, bool, false, "", "") \
+ macro(AllowMultiElementImplicitSubmission, allowMultiElementImplicitSubmission, Bool, bool, false, "", "") \
+ macro(AlwaysUseAcceleratedOverflowScroll, alwaysUseAcceleratedOverflowScroll, Bool, bool, false, "", "") \
+ macro(PasswordEchoEnabled, passwordEchoEnabled, Bool, bool, DEFAULT_PASSWORD_ECHO_ENABLED, "", "") \
+ macro(ImageControlsEnabled, imageControlsEnabled, Bool, bool, false, "", "") \
+ macro(EnableInheritURIQueryComponent, enableInheritURIQueryComponent, Bool, bool, false, "", "") \
+ macro(ServiceControlsEnabled, serviceControlsEnabled, Bool, bool, false, "", "") \
+ macro(GamepadsEnabled, gamepadsEnabled, Bool, bool, false, "", "") \
+ macro(NewBlockInsideInlineModelEnabled, newBlockInsideInlineModelEnabled, Bool, bool, false, "", "") \
+ macro(HTTPEquivEnabled, httpEquivEnabled, Bool, bool, true, "", "") \
+ macro(MockCaptureDevicesEnabled, mockCaptureDevicesEnabled, Bool, bool, false, "", "") \
+ macro(ShadowDOMEnabled, shadowDOMEnabled, Bool, bool, true, "", "") \
+ macro(CustomElementsEnabled, customElementsEnabled, Bool, bool, false, "", "") \
+ macro(FetchAPIEnabled, fetchAPIEnabled, Bool, bool, false, "", "") \
+ macro(WebGL2Enabled, webGL2Enabled, Bool, bool, false, "", "") \
+ macro(DownloadAttributeEnabled, downloadAttributeEnabled, Bool, bool, false, "", "") \
FOR_EACH_ADDITIONAL_WEBKIT_BOOL_PREFERENCE(macro) \
\
#define FOR_EACH_WEBKIT_DOUBLE_PREFERENCE(macro) \
- macro(IncrementalRenderingSuppressionTimeout, incrementalRenderingSuppressionTimeout, Double, double, 5) \
- macro(MinimumFontSize, minimumFontSize, Double, double, 0) \
- macro(MinimumLogicalFontSize, minimumLogicalFontSize, Double, double, 9) \
- macro(MinimumZoomFontSize, minimumZoomFontSize, Double, double, DEFAULT_MINIMUM_FONT_ZOOM_SIZE) \
- macro(DefaultFontSize, defaultFontSize, Double, double, 16) \
- macro(DefaultFixedFontSize, defaultFixedFontSize, Double, double, 13) \
- macro(LayoutInterval, layoutInterval, Double, double, -1) \
- macro(MaxParseDuration, maxParseDuration, Double, double, -1) \
- macro(PasswordEchoDuration, passwordEchoDuration, Double, double, 2) \
+ macro(IncrementalRenderingSuppressionTimeout, incrementalRenderingSuppressionTimeout, Double, double, 5, "", "") \
+ macro(MinimumFontSize, minimumFontSize, Double, double, 0, "", "") \
+ macro(MinimumLogicalFontSize, minimumLogicalFontSize, Double, double, 9, "", "") \
+ macro(MinimumZoomFontSize, minimumZoomFontSize, Double, double, DEFAULT_MINIMUM_FONT_ZOOM_SIZE, "", "") \
+ macro(DefaultFontSize, defaultFontSize, Double, double, 16, "", "") \
+ macro(DefaultFixedFontSize, defaultFixedFontSize, Double, double, 13, "", "") \
+ macro(LayoutInterval, layoutInterval, Double, double, -1, "", "") \
+ macro(MaxParseDuration, maxParseDuration, Double, double, -1, "", "") \
+ macro(PasswordEchoDuration, passwordEchoDuration, Double, double, 2, "", "") \
\
#define FOR_EACH_WEBKIT_UINT32_PREFERENCE(macro) \
- macro(FontSmoothingLevel, fontSmoothingLevel, UInt32, uint32_t, FontSmoothingLevelMedium) \
- macro(LayoutFallbackWidth, layoutFallbackWidth, UInt32, uint32_t, 980) \
- macro(DeviceWidth, deviceWidth, UInt32, uint32_t, 0) \
- macro(DeviceHeight, deviceHeight, UInt32, uint32_t, 0) \
- macro(EditableLinkBehavior, editableLinkBehavior, UInt32, uint32_t, WebCore::EditableLinkNeverLive) \
- macro(InspectorAttachedHeight, inspectorAttachedHeight, UInt32, uint32_t, 300) \
- macro(InspectorAttachedWidth, inspectorAttachedWidth, UInt32, uint32_t, 750) \
- macro(InspectorAttachmentSide, inspectorAttachmentSide, UInt32, uint32_t, 0) \
- macro(StorageBlockingPolicy, storageBlockingPolicy, UInt32, uint32_t, WebCore::SecurityOrigin::BlockThirdPartyStorage) \
- macro(_javascript_RuntimeFlags, _javascript_RuntimeFlags, UInt32, uint32_t, 0) \
- macro(DataDetectorTypes, dataDetectorTypes, UInt32, uint32_t, 0) \
+ macro(FontSmoothingLevel, fontSmoothingLevel, UInt32, uint32_t, FontSmoothingLevelMedium, "", "") \
+ macro(LayoutFallbackWidth, layoutFallbackWidth, UInt32, uint32_t, 980, "", "") \
+ macro(DeviceWidth, deviceWidth, UInt32, uint32_t, 0, "", "") \
+ macro(DeviceHeight, deviceHeight, UInt32, uint32_t, 0, "", "") \
+ macro(EditableLinkBehavior, editableLinkBehavior, UInt32, uint32_t, WebCore::EditableLinkNeverLive, "", "") \
+ macro(InspectorAttachedHeight, inspectorAttachedHeight, UInt32, uint32_t, 300, "", "") \
+ macro(InspectorAttachedWidth, inspectorAttachedWidth, UInt32, uint32_t, 750, "", "") \
+ macro(InspectorAttachmentSide, inspectorAttachmentSide, UInt32, uint32_t, 0, "", "") \
+ macro(StorageBlockingPolicy, storageBlockingPolicy, UInt32, uint32_t, WebCore::SecurityOrigin::BlockThirdPartyStorage, "", "") \
+ macro(_javascript_RuntimeFlags, _javascript_RuntimeFlags, UInt32, uint32_t, 0, "", "") \
+ macro(DataDetectorTypes, dataDetectorTypes, UInt32, uint32_t, 0, "", "") \
\
#define FOR_EACH_WEBKIT_DEBUG_BOOL_PREFERENCE(macro) \
- macro(AcceleratedDrawingEnabled, acceleratedDrawingEnabled, Bool, bool, DEFAULT_ACCELERATED_DRAWING_ENABLED) \
- macro(DisplayListDrawingEnabled, displayListDrawingEnabled, Bool, bool, false) \
- macro(CompositingBordersVisible, compositingBordersVisible, Bool, bool, false) \
- macro(CompositingRepaintCountersVisible, compositingRepaintCountersVisible, Bool, bool, false) \
- macro(TiledScrollingIndicatorVisible, tiledScrollingIndicatorVisible, Bool, bool, false) \
- macro(SimpleLineLayoutDebugBordersEnabled, simpleLineLayoutDebugBordersEnabled, Bool, bool, false) \
- macro(DeveloperExtrasEnabled, developerExtrasEnabled, Bool, bool, false) \
- macro(LogsPageMessagesToSystemConsoleEnabled, logsPageMessagesToSystemConsoleEnabled, Bool, bool, false) \
- macro(IgnoreViewportScalingConstraints, ignoreViewportScalingConstraints, Bool, bool, true) \
- macro(ForceAlwaysUserScalable, forceAlwaysUserScalable, Bool, bool, false) \
- macro(ResourceUsageOverlayVisible, resourceUsageOverlayVisible, Bool, bool, false) \
+ macro(AcceleratedDrawingEnabled, acceleratedDrawingEnabled, Bool, bool, DEFAULT_ACCELERATED_DRAWING_ENABLED, "", "") \
+ macro(DisplayListDrawingEnabled, displayListDrawingEnabled, Bool, bool, false, "", "") \
+ macro(CompositingBordersVisible, compositingBordersVisible, Bool, bool, false, "", "") \
+ macro(CompositingRepaintCountersVisible, compositingRepaintCountersVisible, Bool, bool, false, "", "") \
+ macro(TiledScrollingIndicatorVisible, tiledScrollingIndicatorVisible, Bool, bool, false, "", "") \
+ macro(SimpleLineLayoutDebugBordersEnabled, simpleLineLayoutDebugBordersEnabled, Bool, bool, false, "", "") \
+ macro(DeveloperExtrasEnabled, developerExtrasEnabled, Bool, bool, false, "", "") \
+ macro(LogsPageMessagesToSystemConsoleEnabled, logsPageMessagesToSystemConsoleEnabled, Bool, bool, false, "", "") \
+ macro(IgnoreViewportScalingConstraints, ignoreViewportScalingConstraints, Bool, bool, true, "", "") \
+ macro(ForceAlwaysUserScalable, forceAlwaysUserScalable, Bool, bool, false, "", "") \
+ macro(ResourceUsageOverlayVisible, resourceUsageOverlayVisible, Bool, bool, false, "", "") \
\
#define FOR_EACH_WEBKIT_DEBUG_UINT32_PREFERENCE(macro) \
- macro(VisibleDebugOverlayRegions, visibleDebugOverlayRegions, UInt32, uint32_t, 0)
+ macro(VisibleDebugOverlayRegions, visibleDebugOverlayRegions, UInt32, uint32_t, 0, "", "")
+#define FOR_EACH_WEBKIT_EXPERIMENTAL_FEATURE_PREFERENCE(macro) \
+ macro(ExperimentalShadowDOMEnabled, experimentalShadowDOMEnabled, Bool, bool, false, "Shadow DOM", "Support for the Shadow DOM feature") \
+ macro(ExperimentalWebGL2Enabled, experimentalWebGL2Enabled, Bool, bool, false, "WebGL 2.0", "Prototype WebGL 2 Support") \
+ \
+
#if PLATFORM(COCOA)
#if PLATFORM(IOS)
@@ -288,37 +293,37 @@
#define FOR_EACH_WEBKIT_FONT_FAMILY_PREFERENCE(macro) \
- macro(StandardFontFamily, standardFontFamily, String, String, "Times") \
- macro(CursiveFontFamily, cursiveFontFamily, String, String, DEFAULT_CURSIVE_FONT_FAMILY) \
- macro(FantasyFontFamily, fantasyFontFamily, String, String, "Papyrus") \
- macro(FixedFontFamily, fixedFontFamily, String, String, "Courier") \
- macro(SansSerifFontFamily, sansSerifFontFamily, String, String, "Helvetica") \
- macro(SerifFontFamily, serifFontFamily, String, String, "Times") \
- macro(PictographFontFamily, pictographFontFamily, String, String, "Apple Color Emoji") \
+ macro(StandardFontFamily, standardFontFamily, String, String, "Times", "", "") \
+ macro(CursiveFontFamily, cursiveFontFamily, String, String, DEFAULT_CURSIVE_FONT_FAMILY, "", "") \
+ macro(FantasyFontFamily, fantasyFontFamily, String, String, "Papyrus", "", "") \
+ macro(FixedFontFamily, fixedFontFamily, String, String, "Courier", "", "") \
+ macro(SansSerifFontFamily, sansSerifFontFamily, String, String, "Helvetica", "", "") \
+ macro(SerifFontFamily, serifFontFamily, String, String, "Times", "", "") \
+ macro(PictographFontFamily, pictographFontFamily, String, String, "Apple Color Emoji", "", "") \
\
#elif PLATFORM(GTK) || PLATFORM(EFL)
#define FOR_EACH_WEBKIT_FONT_FAMILY_PREFERENCE(macro) \
- macro(StandardFontFamily, standardFontFamily, String, String, "Times") \
- macro(CursiveFontFamily, cursiveFontFamily, String, String, "Comic Sans MS") \
- macro(FantasyFontFamily, fantasyFontFamily, String, String, "Impact") \
- macro(FixedFontFamily, fixedFontFamily, String, String, "Courier New") \
- macro(SansSerifFontFamily, sansSerifFontFamily, String, String, "Helvetica") \
- macro(SerifFontFamily, serifFontFamily, String, String, "Times") \
- macro(PictographFontFamily, pictographFontFamily, String, String, "Times") \
+ macro(StandardFontFamily, standardFontFamily, String, String, "Times", "", "") \
+ macro(CursiveFontFamily, cursiveFontFamily, String, String, "Comic Sans MS", "", "") \
+ macro(FantasyFontFamily, fantasyFontFamily, String, String, "Impact", "", "") \
+ macro(FixedFontFamily, fixedFontFamily, String, String, "Courier New", "", "") \
+ macro(SansSerifFontFamily, sansSerifFontFamily, String, String, "Helvetica", "", "") \
+ macro(SerifFontFamily, serifFontFamily, String, String, "Times", "", "") \
+ macro(PictographFontFamily, pictographFontFamily, String, String, "Times", "", "") \
\
#endif
#define FOR_EACH_WEBKIT_STRING_PREFERENCE(macro) \
FOR_EACH_WEBKIT_FONT_FAMILY_PREFERENCE(macro) \
- macro(DefaultTextEncodingName, defaultTextEncodingName, String, String, defaultTextEncodingNameForSystemLanguage()) \
- macro(FTPDirectoryTemplatePath, ftpDirectoryTemplatePath, String, String, "") \
+ macro(DefaultTextEncodingName, defaultTextEncodingName, String, String, defaultTextEncodingNameForSystemLanguage(), "", "") \
+ macro(FTPDirectoryTemplatePath, ftpDirectoryTemplatePath, String, String, "", "", "") \
\
#define FOR_EACH_WEBKIT_STRING_PREFERENCE_NOT_IN_WEBCORE(macro) \
- macro(InspectorWindowFrame, inspectorWindowFrame, String, String, "") \
+ macro(InspectorWindowFrame, inspectorWindowFrame, String, String, "", "", "") \
\
#define FOR_EACH_WEBKIT_DEBUG_PREFERENCE(macro) \
Modified: trunk/Source/WebKit2/Shared/WebPreferencesKeys.cpp (199699 => 199700)
--- trunk/Source/WebKit2/Shared/WebPreferencesKeys.cpp 2016-04-19 01:38:30 UTC (rev 199699)
+++ trunk/Source/WebKit2/Shared/WebPreferencesKeys.cpp 2016-04-19 01:46:48 UTC (rev 199700)
@@ -31,7 +31,7 @@
namespace WebKit {
namespace WebPreferencesKey {
-#define DEFINE_KEY_GETTERS(KeyUpper, KeyLower, TypeName, Type, DefaultValue) \
+#define DEFINE_KEY_GETTERS(KeyUpper, KeyLower, TypeName, Type, DefaultValue, HumanReadableName, HumanReadableDescription) \
const String& KeyLower##Key() \
{ \
static NeverDestroyed<String> key(ASCIILiteral(#KeyUpper)); \
@@ -40,6 +40,7 @@
FOR_EACH_WEBKIT_PREFERENCE(DEFINE_KEY_GETTERS)
FOR_EACH_WEBKIT_DEBUG_PREFERENCE(DEFINE_KEY_GETTERS)
+FOR_EACH_WEBKIT_EXPERIMENTAL_FEATURE_PREFERENCE(DEFINE_KEY_GETTERS)
#undef DEFINE_KEY_GETTERS
Modified: trunk/Source/WebKit2/Shared/WebPreferencesKeys.h (199699 => 199700)
--- trunk/Source/WebKit2/Shared/WebPreferencesKeys.h 2016-04-19 01:38:30 UTC (rev 199699)
+++ trunk/Source/WebKit2/Shared/WebPreferencesKeys.h 2016-04-19 01:46:48 UTC (rev 199700)
@@ -32,10 +32,11 @@
namespace WebKit {
namespace WebPreferencesKey {
-#define DECLARE_KEY_GETTERS(KeyUpper, KeyLower, TypeName, Type, DefaultValue) const String& KeyLower##Key();
+#define DECLARE_KEY_GETTERS(KeyUpper, KeyLower, TypeName, Type, DefaultValue, HumanReadableName, HumanReadableDescription) const String& KeyLower##Key();
FOR_EACH_WEBKIT_PREFERENCE(DECLARE_KEY_GETTERS)
FOR_EACH_WEBKIT_DEBUG_PREFERENCE(DECLARE_KEY_GETTERS)
+FOR_EACH_WEBKIT_EXPERIMENTAL_FEATURE_PREFERENCE(DECLARE_KEY_GETTERS)
#undef DECLARE_KEY_GETTERS
Modified: trunk/Source/WebKit2/Shared/WebPreferencesStore.cpp (199699 => 199700)
--- trunk/Source/WebKit2/Shared/WebPreferencesStore.cpp 2016-04-19 01:38:30 UTC (rev 199699)
+++ trunk/Source/WebKit2/Shared/WebPreferencesStore.cpp 2016-04-19 01:46:48 UTC (rev 199700)
@@ -160,9 +160,10 @@
{
static NeverDestroyed<WebPreferencesStore::ValueMap> defaults;
if (defaults.get().isEmpty()) {
-#define DEFINE_DEFAULTS(KeyUpper, KeyLower, TypeName, Type, DefaultValue) defaults.get().set(WebPreferencesKey::KeyLower##Key(), WebPreferencesStore::Value((Type)DefaultValue));
+#define DEFINE_DEFAULTS(KeyUpper, KeyLower, TypeName, Type, DefaultValue, HumanReadableName, HumanReadableDescription) defaults.get().set(WebPreferencesKey::KeyLower##Key(), WebPreferencesStore::Value((Type)DefaultValue));
FOR_EACH_WEBKIT_PREFERENCE(DEFINE_DEFAULTS)
FOR_EACH_WEBKIT_DEBUG_PREFERENCE(DEFINE_DEFAULTS)
+ FOR_EACH_WEBKIT_EXPERIMENTAL_FEATURE_PREFERENCE(DEFINE_DEFAULTS)
#undef DEFINE_DEFAULTS
#if USE(APPLE_INTERNAL_SDK)
#include <WebKitAdditions/WebPreferencesStoreDefaultsAdditions.cpp>
Copied: trunk/Source/WebKit2/UIProcess/API/APIExperimentalFeature.cpp (from rev 199699, trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/Preferences.mm) (0 => 199700)
--- trunk/Source/WebKit2/UIProcess/API/APIExperimentalFeature.cpp (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/APIExperimentalFeature.cpp 2016-04-19 01:46:48 UTC (rev 199700)
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2016 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.
+ */
+
+#include "config.h"
+#include "APIExperimentalFeature.h"
+
+namespace API {
+
+Ref<ExperimentalFeature> ExperimentalFeature::create(const WTF::String& name, const WTF::String& key, const WTF::String& details)
+{
+ return adoptRef(*new ExperimentalFeature(name, key, details));
+}
+
+ExperimentalFeature::ExperimentalFeature(const WTF::String& name, const WTF::String& key, const WTF::String& details)
+ : m_name(name)
+ , m_key(key)
+ , m_details(details)
+{
+}
+
+ExperimentalFeature::~ExperimentalFeature()
+{
+}
+
+}
Copied: trunk/Source/WebKit2/UIProcess/API/APIExperimentalFeature.h (from rev 199699, trunk/Source/WebKit2/Shared/WebPreferencesKeys.h) (0 => 199700)
--- trunk/Source/WebKit2/UIProcess/API/APIExperimentalFeature.h (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/APIExperimentalFeature.h 2016-04-19 01:46:48 UTC (rev 199700)
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2016 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.
+ */
+
+#ifndef APIExperimentalFeature_h
+#define APIExperimentalFeature_h
+
+#include "APIObject.h"
+#include <wtf/text/WTFString.h>
+
+namespace API {
+
+class ExperimentalFeature final : public ObjectImpl<Object::Type::ExperimentalFeature> {
+public:
+ static Ref<ExperimentalFeature> create(const WTF::String& name, const WTF::String& key, const WTF::String& details);
+ virtual ~ExperimentalFeature();
+
+ WTF::String name() const { return m_name; }
+ WTF::String key() const { return m_key; }
+ WTF::String details() const { return m_details; }
+
+private:
+ explicit ExperimentalFeature(const WTF::String& name, const WTF::String& key, const WTF::String& details);
+
+ WTF::String m_name;
+ WTF::String m_key;
+ WTF::String m_details;
+};
+
+}
+
+#endif // APIExperimentalFeature_h
Modified: trunk/Source/WebKit2/UIProcess/API/C/WKAPICast.h (199699 => 199700)
--- trunk/Source/WebKit2/UIProcess/API/C/WKAPICast.h 2016-04-19 01:38:30 UTC (rev 199699)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKAPICast.h 2016-04-19 01:46:48 UTC (rev 199700)
@@ -51,6 +51,7 @@
#include <WebCore/Settings.h>
namespace API {
+class ExperimentalFeature;
class FrameHandle;
class FrameInfo;
class HitTestResult;
Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKPreferences.mm (199699 => 199700)
--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKPreferences.mm 2016-04-19 01:38:30 UTC (rev 199699)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKPreferences.mm 2016-04-19 01:46:48 UTC (rev 199700)
@@ -28,7 +28,11 @@
#if WK_API_ENABLED
+#import "APIArray.h"
+#import "WKNSArray.h"
#import "WebPreferences.h"
+#import "_WKExperimentalFeature.h"
+#import "_WKExperimentalFeatureInternal.h"
#import <WebCore/SecurityOrigin.h>
#import <wtf/RetainPtr.h>
@@ -419,6 +423,22 @@
_preferences->setFixedFontFamily(fixedPitchFontFamily);
}
++ (WK_ARRAY(_WKExperimentalFeature *) *)_experimentalFeatures
+{
+ auto features = WebKit::WebPreferences::experimentalFeatures();
+ return [wrapper(API::Array::create(WTFMove(features)).leakRef()) autorelease];
+}
+
+- (BOOL)_isEnabledForFeature:(_WKExperimentalFeature *)feature
+{
+ return _preferences->isEnabledForFeature(*feature->_experimentalFeature);
+}
+
+- (void)_setEnabled:(BOOL)value forFeature:(_WKExperimentalFeature *)feature
+{
+ _preferences->setEnabledForFeature(value, *feature->_experimentalFeature);
+}
+
@end
#endif // WK_API_ENABLED
Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKPreferencesPrivate.h (199699 => 199700)
--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKPreferencesPrivate.h 2016-04-19 01:38:30 UTC (rev 199699)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKPreferencesPrivate.h 2016-04-19 01:46:48 UTC (rev 199700)
@@ -46,6 +46,8 @@
_WKJavaScriptRuntimeFlagsAllEnabled = 0
} WK_ENUM_AVAILABLE(10_11, 9_0);
+@class _WKExperimentalFeature;
+
@interface WKPreferences (WKPrivate)
// FIXME: This property should not have the verb "is" in it.
@@ -85,6 +87,10 @@
@property (nonatomic, setter=_setOfflineApplicationCacheIsEnabled:) BOOL _offlineApplicationCacheIsEnabled;
@property (nonatomic, setter=_setFullScreenEnabled:) BOOL _fullScreenEnabled WK_AVAILABLE(10_11, 9_0);
++ (WK_ARRAY(_WKExperimentalFeature *) *)_experimentalFeatures;
+- (BOOL)_isEnabledForFeature:(_WKExperimentalFeature *)feature;
+- (void)_setEnabled:(BOOL)value forFeature:(_WKExperimentalFeature *)feature;
+
@end
#endif
Copied: trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKExperimentalFeature.h (from rev 199699, trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/Preferences.mm) (0 => 199700)
--- trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKExperimentalFeature.h (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKExperimentalFeature.h 2016-04-19 01:46:48 UTC (rev 199700)
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2016 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.
+ */
+
+#import <WebKit/WKFoundation.h>
+
+#if WK_API_ENABLED
+
+#import <Foundation/Foundation.h>
+
+WK_CLASS_AVAILABLE(10_11, 9_0)
+@interface _WKExperimentalFeature : NSObject
+
+@property (nonatomic, readonly, copy) NSString *key;
+@property (nonatomic, readonly, copy) NSString *name;
+@property (nonatomic, readonly, copy) NSString *details;
+
+@end
+
+#endif
Copied: trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKExperimentalFeature.mm (from rev 199699, trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/Preferences.mm) (0 => 199700)
--- trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKExperimentalFeature.mm (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKExperimentalFeature.mm 2016-04-19 01:46:48 UTC (rev 199700)
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2016 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.
+ */
+
+#import "config.h"
+#import "_WKExperimentalFeatureInternal.h"
+
+#if WK_API_ENABLED
+
+@implementation _WKExperimentalFeature
+
+- (void)dealloc
+{
+ _experimentalFeature->API::ExperimentalFeature::~ExperimentalFeature();
+
+ [super dealloc];
+}
+
+- (NSString *)description
+{
+ return [NSString stringWithFormat:@"<%@: %p; name = %@; key = { %@ }>", NSStringFromClass(self.class), self, self.name, self.key];
+}
+
+- (NSString *)name
+{
+ return _experimentalFeature->name();
+}
+
+- (NSString *)key
+{
+ return _experimentalFeature->key();
+}
+
+- (NSString *)details
+{
+ return _experimentalFeature->details();
+}
+
+#pragma mark WKObject protocol implementation
+
+- (API::Object&)_apiObject
+{
+ return *_experimentalFeature;
+}
+
+@end
+
+#endif
Copied: trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKExperimentalFeatureInternal.h (from rev 199699, trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/Preferences.mm) (0 => 199700)
--- trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKExperimentalFeatureInternal.h (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKExperimentalFeatureInternal.h 2016-04-19 01:46:48 UTC (rev 199700)
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2016 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.
+ */
+
+#import "_WKExperimentalFeature.h"
+
+#if WK_API_ENABLED
+
+#import "APIExperimentalFeature.h"
+#import "WKObject.h"
+
+namespace WebKit {
+
+inline _WKExperimentalFeature *wrapper(API::ExperimentalFeature& experimentalFeature)
+{
+ ASSERT([experimentalFeature.wrapper() isKindOfClass:[_WKExperimentalFeature class]]);
+ return (_WKExperimentalFeature *)experimentalFeature.wrapper();
+}
+
+}
+
+@interface _WKExperimentalFeature () <WKObject> {
+@package
+ API::ObjectStorage<API::ExperimentalFeature> _experimentalFeature;
+}
+@end
+
+#endif
Modified: trunk/Source/WebKit2/UIProcess/WebPreferences.cpp (199699 => 199700)
--- trunk/Source/WebKit2/UIProcess/WebPreferences.cpp 2016-04-19 01:38:30 UTC (rev 199699)
+++ trunk/Source/WebKit2/UIProcess/WebPreferences.cpp 2016-04-19 01:46:48 UTC (rev 199700)
@@ -29,6 +29,7 @@
#include "WebPageGroup.h"
#include "WebPreferencesKeys.h"
#include "WebProcessPool.h"
+#include <wtf/NeverDestroyed.h>
#include <wtf/ThreadingPrimitives.h>
namespace WebKit {
@@ -170,7 +171,7 @@
}
}
-#define DEFINE_PREFERENCE_GETTER_AND_SETTERS(KeyUpper, KeyLower, TypeName, Type, DefaultValue) \
+#define DEFINE_PREFERENCE_GETTER_AND_SETTERS(KeyUpper, KeyLower, TypeName, Type, DefaultValue, HumanReadableName, HumanReadableDescription) \
void WebPreferences::set##KeyUpper(const Type& value) \
{ \
if (!m_store.set##TypeName##ValueForKey(WebPreferencesKey::KeyLower##Key(), value)) \
@@ -186,9 +187,58 @@
FOR_EACH_WEBKIT_PREFERENCE(DEFINE_PREFERENCE_GETTER_AND_SETTERS)
FOR_EACH_WEBKIT_DEBUG_PREFERENCE(DEFINE_PREFERENCE_GETTER_AND_SETTERS)
+FOR_EACH_WEBKIT_EXPERIMENTAL_FEATURE_PREFERENCE(DEFINE_PREFERENCE_GETTER_AND_SETTERS)
#undef DEFINE_PREFERENCE_GETTER_AND_SETTERS
+static Vector<RefPtr<API::Object>> createExperimentalFeaturesVector()
+{
+ Vector<RefPtr<API::Object>> features;
+
+#define ADD_EXPERIMENTAL_PREFERENCE_DESCRIPTION(KeyUpper, KeyLower, TypeName, Type, DefaultValue, HumanReadableName, HumanReadableDescription) \
+ features.append(API::ExperimentalFeature::create(HumanReadableName, #KeyUpper, HumanReadableDescription)); \
+
+ FOR_EACH_WEBKIT_EXPERIMENTAL_FEATURE_PREFERENCE(ADD_EXPERIMENTAL_PREFERENCE_DESCRIPTION)
+
+#undef ADD_EXPERIMENTAL_PREFERENCE_DESCRIPTION
+
+ return features;
+}
+
+const Vector<RefPtr<API::Object>>& WebPreferences::experimentalFeatures()
+{
+ static NeverDestroyed<Vector<RefPtr<API::Object>>> features = createExperimentalFeaturesVector();
+ return features;
+}
+
+bool WebPreferences::isEnabledForFeature(const API::ExperimentalFeature& feature) const
+{
+ const String& key = feature.key();
+
+#define CALL_EXPERIMENTAL_GETTER(KeyUpper, KeyLower, TypeName, Type, DefaultValue, HumanReadableName, HumanReadableDescription) \
+ if (key == #KeyUpper) \
+ return KeyLower(); \
+
+ FOR_EACH_WEBKIT_EXPERIMENTAL_FEATURE_PREFERENCE(CALL_EXPERIMENTAL_GETTER)
+
+#undef CALL_EXPERIMENTAL_GETTER
+
+ return false;
+}
+
+void WebPreferences::setEnabledForFeature(bool value, const API::ExperimentalFeature& feature)
+{
+ const String& key = feature.key();
+
+#define CALL_EXPERIMENTAL_SETTER(KeyUpper, KeyLower, TypeName, Type, DefaultValue, HumanReadableName, HumanReadableDescription) \
+ if (key == #KeyUpper) \
+ set##KeyUpper(value); \
+
+ FOR_EACH_WEBKIT_EXPERIMENTAL_FEATURE_PREFERENCE(CALL_EXPERIMENTAL_SETTER)
+
+#undef CALL_EXPERIMENTAL_SETTER
+}
+
bool WebPreferences::anyPagesAreUsingPrivateBrowsing()
{
return privateBrowsingPageCount;
Modified: trunk/Source/WebKit2/UIProcess/WebPreferences.h (199699 => 199700)
--- trunk/Source/WebKit2/UIProcess/WebPreferences.h 2016-04-19 01:38:30 UTC (rev 199699)
+++ trunk/Source/WebKit2/UIProcess/WebPreferences.h 2016-04-19 01:46:48 UTC (rev 199700)
@@ -26,6 +26,7 @@
#ifndef WebPreferences_h
#define WebPreferences_h
+#include "APIExperimentalFeature.h"
#include "APIObject.h"
#include "FontSmoothingLevel.h"
#include "WebPreferencesDefinitions.h"
@@ -34,7 +35,7 @@
#include <wtf/PassRefPtr.h>
#include <wtf/RefPtr.h>
-#define DECLARE_PREFERENCE_GETTER_AND_SETTERS(KeyUpper, KeyLower, TypeName, Type, DefaultValue) \
+#define DECLARE_PREFERENCE_GETTER_AND_SETTERS(KeyUpper, KeyLower, TypeName, Type, DefaultValue, HumanReadableName, HumanReadableDescription) \
void set##KeyUpper(const Type& value); \
Type KeyLower() const;
@@ -59,14 +60,13 @@
const WebPreferencesStore& store() const { return m_store; }
-#define DECLARE_PREFERENCE_GETTER_AND_SETTERS(KeyUpper, KeyLower, TypeName, Type, DefaultValue) \
- void set##KeyUpper(const Type& value); \
- Type KeyLower() const; \
-
FOR_EACH_WEBKIT_PREFERENCE(DECLARE_PREFERENCE_GETTER_AND_SETTERS)
FOR_EACH_WEBKIT_DEBUG_PREFERENCE(DECLARE_PREFERENCE_GETTER_AND_SETTERS)
+ FOR_EACH_WEBKIT_EXPERIMENTAL_FEATURE_PREFERENCE(DECLARE_PREFERENCE_GETTER_AND_SETTERS)
-#undef DECLARE_PREFERENCE_GETTER_AND_SETTERS
+ static const Vector<RefPtr<API::Object>>& experimentalFeatures();
+ bool isEnabledForFeature(const API::ExperimentalFeature&) const;
+ void setEnabledForFeature(bool, const API::ExperimentalFeature&);
// Exposed for WebKitTestRunner use only.
void forceUpdate() { update(); }
Modified: trunk/Source/WebKit2/UIProcess/mac/WebPreferencesMac.mm (199699 => 199700)
--- trunk/Source/WebKit2/UIProcess/mac/WebPreferencesMac.mm 2016-04-19 01:38:30 UTC (rev 199699)
+++ trunk/Source/WebKit2/UIProcess/mac/WebPreferencesMac.mm 2016-04-19 01:46:48 UTC (rev 199700)
@@ -144,9 +144,10 @@
void WebPreferences::platformInitializeStore()
{
-#define INITIALIZE_DEBUG_PREFERENCE_FROM_NSUSERDEFAULTS(KeyUpper, KeyLower, TypeName, Type, DefaultValue) \
+#define INITIALIZE_DEBUG_PREFERENCE_FROM_NSUSERDEFAULTS(KeyUpper, KeyLower, TypeName, Type, DefaultValue, HumanReadableName, HumanReadableDescription) \
setDebug##TypeName##ValueIfInUserDefaults(m_identifier, m_keyPrefix, m_globalDebugKeyPrefix, WebPreferencesKey::KeyLower##Key(), m_store);
+ FOR_EACH_WEBKIT_EXPERIMENTAL_FEATURE_PREFERENCE(INITIALIZE_DEBUG_PREFERENCE_FROM_NSUSERDEFAULTS)
FOR_EACH_WEBKIT_DEBUG_PREFERENCE(INITIALIZE_DEBUG_PREFERENCE_FROM_NSUSERDEFAULTS)
#undef INITIALIZE_DEBUG_PREFERENCE_FROM_NSUSERDEFAULTS
@@ -154,7 +155,7 @@
if (!m_identifier)
return;
-#define INITIALIZE_PREFERENCE_FROM_NSUSERDEFAULTS(KeyUpper, KeyLower, TypeName, Type, DefaultValue) \
+#define INITIALIZE_PREFERENCE_FROM_NSUSERDEFAULTS(KeyUpper, KeyLower, TypeName, Type, DefaultValue, HumanReadableName, HumanReadableDescription) \
Type user##KeyUpper##Value; \
if (platformGet##TypeName##UserValueForKey(WebPreferencesKey::KeyLower##Key(), user##KeyUpper##Value)) \
m_store.set##TypeName##ValueForKey(WebPreferencesKey::KeyLower##Key(), user##KeyUpper##Value);
Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (199699 => 199700)
--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj 2016-04-19 01:38:30 UTC (rev 199699)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj 2016-04-19 01:46:48 UTC (rev 199700)
@@ -712,6 +712,11 @@
3131261F148FF82C00BA2A39 /* NotificationPermissionRequestManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 3131261A148FF82B00BA2A39 /* NotificationPermissionRequestManager.h */; };
31312620148FF82C00BA2A39 /* WebNotificationManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3131261B148FF82B00BA2A39 /* WebNotificationManager.cpp */; };
31312621148FF82C00BA2A39 /* WebNotificationManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 3131261C148FF82B00BA2A39 /* WebNotificationManager.h */; };
+ 317FE7C51C487A6C00A0CA89 /* APIExperimentalFeature.h in Headers */ = {isa = PBXBuildFile; fileRef = 317FE7C21C487A6600A0CA89 /* APIExperimentalFeature.h */; };
+ 317FE7C61C487A7100A0CA89 /* APIExperimentalFeature.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 317FE7C11C487A6600A0CA89 /* APIExperimentalFeature.cpp */; };
+ 317FE7CD1C487DAE00A0CA89 /* _WKExperimentalFeatureInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 317FE7C91C487D9D00A0CA89 /* _WKExperimentalFeatureInternal.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 317FE7CE1C487DB800A0CA89 /* _WKExperimentalFeature.mm in Sources */ = {isa = PBXBuildFile; fileRef = 317FE7C81C487D9D00A0CA89 /* _WKExperimentalFeature.mm */; };
+ 317FE7CF1C487DBD00A0CA89 /* _WKExperimentalFeature.h in Headers */ = {isa = PBXBuildFile; fileRef = 317FE7C71C487D9D00A0CA89 /* _WKExperimentalFeature.h */; settings = {ATTRIBUTES = (Private, ); }; };
318BE17114743DB100A8FBB2 /* WKNotificationManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 318BE17014743DB100A8FBB2 /* WKNotificationManager.h */; settings = {ATTRIBUTES = (Private, ); }; };
318BE17514743DD700A8FBB2 /* WKNotificationManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 318BE17414743DD600A8FBB2 /* WKNotificationManager.cpp */; };
318BE17714743E6000A8FBB2 /* WKNotification.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 318BE17614743E6000A8FBB2 /* WKNotification.cpp */; };
@@ -2717,6 +2722,11 @@
3131261C148FF82B00BA2A39 /* WebNotificationManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebNotificationManager.h; sourceTree = "<group>"; };
3131261D148FF82C00BA2A39 /* WebNotificationManager.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebNotificationManager.messages.in; sourceTree = "<group>"; };
31607F3819627002009B87DA /* LegacySessionStateCoding.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LegacySessionStateCoding.h; sourceTree = "<group>"; };
+ 317FE7C11C487A6600A0CA89 /* APIExperimentalFeature.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = APIExperimentalFeature.cpp; sourceTree = "<group>"; };
+ 317FE7C21C487A6600A0CA89 /* APIExperimentalFeature.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIExperimentalFeature.h; sourceTree = "<group>"; };
+ 317FE7C71C487D9D00A0CA89 /* _WKExperimentalFeature.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _WKExperimentalFeature.h; sourceTree = "<group>"; };
+ 317FE7C81C487D9D00A0CA89 /* _WKExperimentalFeature.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = _WKExperimentalFeature.mm; sourceTree = "<group>"; };
+ 317FE7C91C487D9D00A0CA89 /* _WKExperimentalFeatureInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _WKExperimentalFeatureInternal.h; sourceTree = "<group>"; };
318BE17014743DB100A8FBB2 /* WKNotificationManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKNotificationManager.h; sourceTree = "<group>"; };
318BE17414743DD600A8FBB2 /* WKNotificationManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKNotificationManager.cpp; sourceTree = "<group>"; };
318BE17614743E6000A8FBB2 /* WKNotification.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKNotification.cpp; sourceTree = "<group>"; };
@@ -5034,6 +5044,9 @@
379A873B18BBFF0700588AF2 /* _WKElementActionInternal.h */,
1AD01BC71905D37E00C9C45F /* _WKErrorRecoveryAttempting.h */,
1AD01BC61905D37E00C9C45F /* _WKErrorRecoveryAttempting.mm */,
+ 317FE7C71C487D9D00A0CA89 /* _WKExperimentalFeature.h */,
+ 317FE7C81C487D9D00A0CA89 /* _WKExperimentalFeature.mm */,
+ 317FE7C91C487D9D00A0CA89 /* _WKExperimentalFeatureInternal.h */,
005D158E18E4C4EB00734619 /* _WKFindDelegate.h */,
2DEAC5CE1AC368BB00A195D8 /* _WKFindOptions.h */,
2E7A94491BBD95C600945547 /* _WKFocusedElementInfo.h */,
@@ -6018,6 +6031,8 @@
076E884D1A13CADF005E90FC /* APIContextMenuClient.h */,
83891B621A68B3420030F386 /* APIDiagnosticLoggingClient.h */,
1F7D36C018DA513F00D9D659 /* APIDownloadClient.h */,
+ 317FE7C11C487A6600A0CA89 /* APIExperimentalFeature.cpp */,
+ 317FE7C21C487A6600A0CA89 /* APIExperimentalFeature.h */,
00B9661518E24CBA00CE1F88 /* APIFindClient.h */,
2DD67A2D1BD819730053B251 /* APIFindMatchesClient.h */,
37E25D6D18FDE5D6005D3A00 /* APIFormClient.h */,
@@ -7614,6 +7629,7 @@
2DE6943E18BD2A68005C15E5 /* SmartMagnificationControllerMessages.h in Headers */,
5272B28B1406985D0096A5D0 /* StatisticsData.h in Headers */,
514BDED316C98EDD00E4E25E /* StatisticsRequest.h in Headers */,
+ 317FE7CD1C487DAE00A0CA89 /* _WKExperimentalFeatureInternal.h in Headers */,
1AD3306F16B1D991004F60E7 /* StorageAreaImpl.h in Headers */,
1ACECD2517162DB1001FC9EF /* StorageAreaMap.h in Headers */,
1A334DEE16DE8F88006A8E38 /* StorageAreaMapMessages.h in Headers */,
@@ -7796,6 +7812,7 @@
51F060E01654317F00F3281B /* WebResourceLoaderMessages.h in Headers */,
7C361D731927FA360036A59D /* WebScriptMessageHandler.h in Headers */,
D3B9484911FF4B6500032B39 /* WebSearchPopupMenu.h in Headers */,
+ 317FE7C51C487A6C00A0CA89 /* APIExperimentalFeature.h in Headers */,
1A4832D71A9CDF96008B4DFE /* WebsiteData.h in Headers */,
1A4832D11A9BDC2F008B4DFE /* WebsiteDataRecord.h in Headers */,
1A53C2AA1A325730004E8C70 /* WebsiteDataStore.h in Headers */,
@@ -8142,6 +8159,7 @@
26F9A83B18A3468100AEB88A /* WKWebViewPrivate.h in Headers */,
1AD60F5E18E20F4C0020C034 /* WKWindowFeatures.h in Headers */,
1AD60F6018E20F740020C034 /* WKWindowFeaturesInternal.h in Headers */,
+ 317FE7CF1C487DBD00A0CA89 /* _WKExperimentalFeature.h in Headers */,
1A7C0DF71B7D1F1000A9B848 /* WKWindowFeaturesRef.h in Headers */,
BCBECDE816B6416800047A1A /* XPCServiceEntryPoint.h in Headers */,
);
@@ -9080,6 +9098,7 @@
1A002D48196B345D00B9AD44 /* SessionStateCoding.mm in Sources */,
1A7284481959F8040007BCE5 /* SessionStateConversion.cpp in Sources */,
753E3E0D1887398500188496 /* SessionTracker.cpp in Sources */,
+ 317FE7C61C487A7100A0CA89 /* APIExperimentalFeature.cpp in Sources */,
1A6420E412DCE2FF00CAAE2C /* ShareableBitmap.cpp in Sources */,
C01A260112662F2100C9ED55 /* ShareableBitmapCG.cpp in Sources */,
1ACC50F11CBC381D003C7D03 /* WKOpenPanelParameters.mm in Sources */,
@@ -9296,6 +9315,7 @@
BCEE7AD012817988009827DA /* WebProcessProxyMessageReceiver.cpp in Sources */,
1A1E093318861D3800D2DC49 /* WebProgressTrackerClient.cpp in Sources */,
512F589C12A8838800629530 /* WebProtectionSpace.cpp in Sources */,
+ 317FE7CE1C487DB800A0CA89 /* _WKExperimentalFeature.mm in Sources */,
A1C512C8190656E500448914 /* WebQuickLookHandleClient.cpp in Sources */,
37948403150C350600E52CE9 /* WebRenderLayer.cpp in Sources */,
3760881E150413E900FC82C7 /* WebRenderObject.cpp in Sources */,
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (199699 => 199700)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2016-04-19 01:38:30 UTC (rev 199699)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2016-04-19 01:46:48 UTC (rev 199700)
@@ -2844,7 +2844,7 @@
// but we currently don't match the naming of WebCore exactly so we are
// handrolling the boolean and integer preferences until that is fixed.
-#define INITIALIZE_SETTINGS(KeyUpper, KeyLower, TypeName, Type, DefaultValue) settings.set##KeyUpper(store.get##TypeName##ValueForKey(WebPreferencesKey::KeyLower##Key()));
+#define INITIALIZE_SETTINGS(KeyUpper, KeyLower, TypeName, Type, DefaultValue, HumanReadableName, HumanReadableDescription) settings.set##KeyUpper(store.get##TypeName##ValueForKey(WebPreferencesKey::KeyLower##Key()));
FOR_EACH_WEBKIT_STRING_PREFERENCE(INITIALIZE_SETTINGS)
@@ -3108,7 +3108,7 @@
#if ENABLE(DOWNLOAD_ATTRIBUTE)
RuntimeEnabledFeatures::sharedFeatures().setDownloadAttributeEnabled(store.getBoolValueForKey(WebPreferencesKey::downloadAttributeEnabledKey()));
#endif
-
+
bool processSuppressionEnabled = store.getBoolValueForKey(WebPreferencesKey::pageVisibilityBasedProcessSuppressionEnabledKey());
if (m_processSuppressionEnabled != processSuppressionEnabled) {
m_processSuppressionEnabled = processSuppressionEnabled;
Modified: trunk/Tools/ChangeLog (199699 => 199700)
--- trunk/Tools/ChangeLog 2016-04-19 01:38:30 UTC (rev 199699)
+++ trunk/Tools/ChangeLog 2016-04-19 01:46:48 UTC (rev 199700)
@@ -1,3 +1,15 @@
+2016-04-18 Dean Jackson <[email protected]>
+
+ New SPI to export a dictionary of runtime features
+ https://bugs.webkit.org/show_bug.cgi?id=156645
+ <rdar://problem/23621666>
+
+ Reviewed by Darin Adler.
+
+ Test the experimental features SPI on WKPreferences.
+
+ * TestWebKitAPI/Tests/WebKit2Cocoa/Preferences.mm:
+
2016-04-18 Yusuke Suzuki <[email protected]>
[JSCOnly] Implement RunLoop and remove glib dependency
Modified: trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/Preferences.mm (199699 => 199700)
--- trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/Preferences.mm 2016-04-19 01:38:30 UTC (rev 199699)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/Preferences.mm 2016-04-19 01:46:48 UTC (rev 199700)
@@ -30,6 +30,7 @@
#import "Test.h"
#import <WebKit/WKFoundation.h>
#import <WebKit/WKPreferencesPrivate.h>
+#import <WebKit/_WKExperimentalFeature.h>
#import <wtf/RetainPtr.h>
TEST(WebKit2, DefaultWKPreferences)
@@ -41,4 +42,17 @@
EXPECT_TRUE([preferences _isStandalone]);
}
+TEST(WebKit2, ExperimentalFeatures)
+{
+ NSArray<_WKExperimentalFeature *> *features = [WKPreferences _experimentalFeatures];
+ EXPECT_NOT_NULL(features);
+
+ RetainPtr<WKPreferences> preferences = adoptNS([[WKPreferences alloc] init]);
+
+ for (_WKExperimentalFeature *feature in features) {
+ BOOL value = [preferences _isEnabledForFeature:feature];
+ [preferences _setEnabled:value forFeature:feature];
+ }
+}
+
#endif
_______________________________________________ webkit-changes mailing list [email protected] https://lists.webkit.org/mailman/listinfo/webkit-changes
