Diff
Modified: trunk/Source/WebKit/CMakeLists.txt (224076 => 224077)
--- trunk/Source/WebKit/CMakeLists.txt 2017-10-27 01:14:25 UTC (rev 224076)
+++ trunk/Source/WebKit/CMakeLists.txt 2017-10-27 01:45:28 UTC (rev 224077)
@@ -907,11 +907,12 @@
)
set(WebKit_WEB_PREFERENCES_TEMPLATES
+ ${WEBKIT_DIR}/Scripts/PreferencesTemplates/WebPageUpdatePreferences.cpp.erb
${WEBKIT_DIR}/Scripts/PreferencesTemplates/WebPreferencesDefinitions.h.erb
)
add_custom_command(
- OUTPUT ${DERIVED_SOURCES_WEBKIT_DIR}/WebPreferencesDefinitions.h
+ OUTPUT ${DERIVED_SOURCES_WEBKIT_DIR}/WebPageUpdatePreferences.cpp ${DERIVED_SOURCES_WEBKIT_DIR}/WebPreferencesDefinitions.h
MAIN_DEPENDENCY ${WEBKIT_DIR}/Shared/WebPreferences.yaml
DEPENDS ${WebKit_WEB_PREFERENCES_TEMPLATES}
COMMAND ${RUBY_EXECUTABLE} ${WEBKIT_DIR}/Scripts/GeneratePreferences.rb --input ${WEBKIT_DIR}/Shared/WebPreferences.yaml --outputDir "${DERIVED_SOURCES_WEBKIT_DIR}"
@@ -921,6 +922,11 @@
${DERIVED_SOURCES_WEBKIT_DIR}/WebPreferencesDefinitions.h
)
+list(APPEND WebKit_SOURCES
+ ${DERIVED_SOURCES_WEBKIT_DIR}/WebPageUpdatePreferences.cpp
+)
+
+
list(APPEND WebKit_SOURCES ${WebKit_DERIVED_SOURCES})
WEBKIT_FRAMEWORK(WebKit)
Modified: trunk/Source/WebKit/ChangeLog (224076 => 224077)
--- trunk/Source/WebKit/ChangeLog 2017-10-27 01:14:25 UTC (rev 224076)
+++ trunk/Source/WebKit/ChangeLog 2017-10-27 01:45:28 UTC (rev 224077)
@@ -1,3 +1,73 @@
+2017-10-26 Sam Weinig <[email protected]>
+
+ [Settings] Generate the bulk of WebPage::updatePreferences(...)
+ https://bugs.webkit.org/show_bug.cgi?id=178823
+
+ Reviewed by Tim Horton.
+
+ * CMakeLists.txt:
+ * DerivedSources.make:
+ * WebKit.xcodeproj/project.pbxproj:
+
+ Add new file generation.
+
+ * Scripts/GeneratePreferences.rb:
+
+ Replace 'webkitOnly' boolean option with a new 'webcoreBinding' option.
+ 'webcoreBinding' supports the following values:
+ - none (same as webkit only)
+ - custom (means that you do bind to a webcore concept, but currently it must
+ be done in a custom manner)
+ - DeprecatedGlobalSettings (binds to a DeprecatedGlobalSettings setting)
+ - RuntimeEnabledFeatures (binds to a RuntimeEnabledFeatures setting)
+ If 'webcoreBinding' is not provided, the preference binds to WebCore Setting
+ of either the same name or the override name provided by the new 'webcoreName'
+ option (we should try to remove the need for 'webcoreName' by unifying with
+ WebCore on preference/setting naming).
+
+ A 'condition' option was also added to indicate that the preference is only available
+ when that macro condition is true.
+
+ Since we are generating most of WebPage::updatePreferences, we can simplify the
+ macros in WebPreferencesDefinitions.h to only have normal/debug/experimental variants
+ and remove the need for per-type macros, which were only used in WebPage::updatePreferences.
+
+ * Scripts/PreferencesTemplates/WebPageUpdatePreferences.cpp.erb: Added.
+
+ Generates bindings from WebPreferences to WebCore::Settings/DeprecatedGlobalSettings/RuntimeEnabledFeatures.
+ Does not generate a binding if the 'webcoreBinding' option is set to either 'none' or 'custom'.
+
+ * Scripts/PreferencesTemplates/WebPreferencesDefinitions.h.erb:
+
+ Simplify down to just normal/debug/experimental macros.
+
+ * Shared/WebPreferences.yaml:
+
+ Annotate perferences with new optional 'webcoreBinding', 'webcoreName', and 'condition'
+ options.
+
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::updatePreferences):
+
+ Replace a ton of hand written preference to settings bindings with a call to updatePreferencesGenerated().
+
+ * WebProcess/WebPage/WebPage.h:
+
+ Add declaration of updatePreferencesGenerated, remove platformPreferencesDidChange.
+
+ * WebProcess/WebPage/gtk/WebPageGtk.cpp:
+ (WebKit::WebPage::platformPreferencesDidChange): Deleted.
+ * WebProcess/WebPage/ios/WebPageIOS.mm:
+ (WebKit::WebPage::platformPreferencesDidChange): Deleted.
+ * WebProcess/WebPage/mac/WebPageMac.mm:
+ (WebKit::WebPage::platformPreferencesDidChange): Deleted.
+ * WebProcess/WebPage/win/WebPageWin.cpp:
+ (WebKit::WebPage::platformPreferencesDidChange): Deleted.
+ * WebProcess/WebPage/wpe/WebPageWPE.cpp:
+ (WebKit::WebPage::platformPreferencesDidChange): Deleted.
+
+ Remove all the empty platformPreferencesDidChange functions.
+
2017-10-26 Alex Christensen <[email protected]>
Move WKWebViewConfiguration validation to WKWebView construction
Modified: trunk/Source/WebKit/DerivedSources.make (224076 => 224077)
--- trunk/Source/WebKit/DerivedSources.make 2017-10-27 01:14:25 UTC (rev 224076)
+++ trunk/Source/WebKit/DerivedSources.make 2017-10-27 01:45:28 UTC (rev 224077)
@@ -288,11 +288,12 @@
# WebPreferences generation
WEB_PREFERENCES_TEMPLATES = \
+ $(WebKit2)/Scripts/PreferencesTemplates/WebPageUpdatePreferences.cpp.erb \
$(WebKit2)/Scripts/PreferencesTemplates/WebPreferencesDefinitions.h.erb \
#
-all : WebPreferencesDefinitions.h
+all : WebPreferencesDefinitions.h WebPageUpdatePreferences.cpp
-WebPreferencesDefinitions%h : $(WebKit2)/Scripts/GeneratePreferences.rb $(WEB_PREFERENCES_TEMPLATES) $(WebKit2)/Shared/WebPreferences.yaml
+WebPreferencesDefinitions%h WebPageUpdatePreferences%cpp: $(WebKit2)/Scripts/GeneratePreferences.rb $(WEB_PREFERENCES_TEMPLATES) $(WebKit2)/Shared/WebPreferences.yaml
$(RUBY) $< --input $(WebKit2)/Shared/WebPreferences.yaml
Modified: trunk/Source/WebKit/Scripts/GeneratePreferences.rb (224076 => 224077)
--- trunk/Source/WebKit/Scripts/GeneratePreferences.rb 2017-10-27 01:14:25 UTC (rev 224076)
+++ trunk/Source/WebKit/Scripts/GeneratePreferences.rb 2017-10-27 01:45:28 UTC (rev 224077)
@@ -67,8 +67,9 @@
attr_accessor :defaultValue
attr_accessor :humanReadableName
attr_accessor :humanReadableDescription
- attr_accessor :webkitOnly
attr_accessor :category
+ attr_accessor :webcoreBinding
+ attr_accessor :condition
def initialize(name, opts)
@name = name
@@ -76,9 +77,11 @@
@defaultValue = opts["defaultValue"]
@humanReadableName = '"' + (opts["humanReadableName"] || "") + '"'
@humanReadableDescription = '"' + (opts["humanReadableDescription"] || "") + '"'
- @webkitOnly = opts["webkitOnly"]
@category = opts["category"]
@getter = opts["getter"]
+ @webcoreBinding = opts["webcoreBinding"]
+ @webcoreName = opts["webcoreName"]
+ @condition = opts["condition"]
end
def nameLower
@@ -92,6 +95,23 @@
@name[0].downcase + @name[[email protected]]
end
end
+
+ def webcoreNameUpper
+ if @webcoreName
+ @webcoreName[0].upcase + @webcoreName[[email protected]]
+ else
+ @name
+ end
+ end
+
+ def typeUpper
+ if @type == "uint32_t"
+ "UInt32"
+ else
+ @type.capitalize
+ end
+ end
+
end
class Conditional
@@ -114,16 +134,13 @@
end
@preferences.sort! { |x, y| x.name <=> y.name }
- @boolPreferencesNotDebug = @preferences.select { |p| !p.category && !p.webkitOnly && p.type == "bool" }
- @doublePreferencesNotDebug = @preferences.select { |p| !p.category && !p.webkitOnly && p.type == "double" }
- @intPreferencesNotDebug = @preferences.select { |p| !p.category && !p.webkitOnly && p.type == "uint32_t" }
- @stringPreferencesNotDebug = @preferences.select { |p| !p.category && !p.webkitOnly && p.type == "String" }
- @stringPreferencesNotDebugNotInWebKit = @preferences.select { |p| !p.category && p.webkitOnly && p.type == "String" }
+ @preferencesNotDebug = @preferences.select { |p| !p.category }
+ @preferencesDebug = @preferences.select { |p| p.category == "debug" }
+ @experimentalFeatures = @preferences.select { |p| p.category == "experimental" }
- @boolPreferencesDebug = @preferences.select { |p| p.category == "debug" && !p.webkitOnly && p.type == "bool" }
- @intPreferencesDebug = @preferences.select { |p| p.category == "debug" && !p.webkitOnly && p.type == "uint32_t" }
-
- @experimentalFeature = @preferences.select { |p| p.category == "experimental" && !p.webkitOnly }
+ @preferencesBoundToSetting = @preferences.select { |p| !p.webcoreBinding }
+ @preferencesBoundToDeprecatedGlobalSettings = @preferences.select { |p| p.webcoreBinding == "DeprecatedGlobalSettings" }
+ @preferencesBoundToRuntimeEnabledFeatures = @preferences.select { |p| p.webcoreBinding == "RuntimeEnabledFeatures" }
end
def renderToFile(template, file)
@@ -138,3 +155,4 @@
preferences = Preferences.new(parsedPreferences)
preferences.renderToFile("PreferencesTemplates/WebPreferencesDefinitions.h.erb", File.join(options[:outputDirectory], "WebPreferencesDefinitions.h"))
+preferences.renderToFile("PreferencesTemplates/WebPageUpdatePreferences.cpp.erb", File.join(options[:outputDirectory], "WebPageUpdatePreferences.cpp"))
Copied: trunk/Source/WebKit/Scripts/PreferencesTemplates/WebPageUpdatePreferences.cpp.erb (from rev 224076, trunk/Source/WebKit/WebProcess/WebPage/wpe/WebPageWPE.cpp) (0 => 224077)
--- trunk/Source/WebKit/Scripts/PreferencesTemplates/WebPageUpdatePreferences.cpp.erb (rev 0)
+++ trunk/Source/WebKit/Scripts/PreferencesTemplates/WebPageUpdatePreferences.cpp.erb 2017-10-27 01:45:28 UTC (rev 224077)
@@ -0,0 +1,75 @@
+/*
+ * THIS FILE WAS AUTOMATICALLY GENERATED, DO NOT EDIT.
+ *
+ * Copyright (C) 2017 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 "WebPage.h"
+
+#include "WebPreferencesKeys.h"
+#include "WebPreferencesStore.h"
+#include <WebCore/DeprecatedGlobalSettings.h>
+#include <WebCore/Page.h>
+#include <WebCore/RuntimeEnabledFeatures.h>
+#include <WebCore/Settings.h>
+
+namespace WebKit {
+
+void WebPage::updatePreferencesGenerated(const WebPreferencesStore& store)
+{
+ WebCore::Settings& settings = m_page->settings();
+
+<%- for @pref in @preferencesBoundToSetting do -%>
+<%- if @pref.condition -%>
+#if <%= @pref.condition %>
+<%- end -%>
+ settings.set<%= @pref.webcoreNameUpper %>(store.get<%= @pref.typeUpper %>ValueForKey(WebPreferencesKey::<%= @pref.nameLower %>Key()));
+<%- if @pref.condition -%>
+#endif
+<%- end -%>
+<%- end -%>
+
+<%- for @pref in @preferencesBoundToDeprecatedGlobalSettings do -%>
+<%- if @pref.condition -%>
+#if <%= @pref.condition %>
+<%- end -%>
+ WebCore::DeprecatedGlobalSettings::set<%= @pref.webcoreNameUpper %>(store.get<%= @pref.typeUpper %>ValueForKey(WebPreferencesKey::<%= @pref.nameLower %>Key()));
+<%- if @pref.condition -%>
+#endif
+<%- end -%>
+<%- end -%>
+
+<%- for @pref in @preferencesBoundToRuntimeEnabledFeatures do -%>
+<%- if @pref.condition -%>
+#if <%= @pref.condition %>
+<%- end -%>
+ WebCore::RuntimeEnabledFeatures::sharedFeatures().set<%= @pref.webcoreNameUpper %>(store.get<%= @pref.typeUpper %>ValueForKey(WebPreferencesKey::<%= @pref.nameLower %>Key()));
+<%- if @pref.condition -%>
+#endif
+<%- end -%>
+<%- end -%>
+}
+
+}
Modified: trunk/Source/WebKit/Scripts/PreferencesTemplates/WebPreferencesDefinitions.h.erb (224076 => 224077)
--- trunk/Source/WebKit/Scripts/PreferencesTemplates/WebPreferencesDefinitions.h.erb 2017-10-27 01:14:25 UTC (rev 224076)
+++ trunk/Source/WebKit/Scripts/PreferencesTemplates/WebPreferencesDefinitions.h.erb 2017-10-27 01:45:28 UTC (rev 224077)
@@ -31,72 +31,26 @@
// macro(KeyUpper, KeyLower, TypeNameUpper, TypeName, DefaultValue, HumanReadableName, HumanReadableDescription)
-#define FOR_EACH_WEBKIT_BOOL_PREFERENCE(macro) \
-<%- for @pref in @boolPreferencesNotDebug do -%>
- macro(<%= @pref.name %>, <%= @pref.nameLower %>, Bool, bool, <%= @pref.defaultValue %>, <%= @pref.humanReadableName %>, <%= @pref.humanReadableDescription %>) \
+#define FOR_EACH_WEBKIT_PREFERENCE(macro) \
+<%- for @pref in @preferencesNotDebug do -%>
+ macro(<%= @pref.name %>, <%= @pref.nameLower %>, <%= @pref.typeUpper %>, <%= @pref.type %>, <%= @pref.defaultValue %>, <%= @pref.humanReadableName %>, <%= @pref.humanReadableDescription %>) \
<%- end -%>
\
-#define FOR_EACH_WEBKIT_DOUBLE_PREFERENCE(macro) \
-<%- for @pref in @doublePreferencesNotDebug do -%>
- macro(<%= @pref.name %>, <%= @pref.nameLower %>, Double, double, <%= @pref.defaultValue %>, <%= @pref.humanReadableName %>, <%= @pref.humanReadableDescription %>) \
-<%- end -%>
- \
-#define FOR_EACH_WEBKIT_UINT32_PREFERENCE(macro) \
-<%- for @pref in @intPreferencesNotDebug do -%>
- macro(<%= @pref.name %>, <%= @pref.nameLower %>, UInt32, uint32_t, <%= @pref.defaultValue %>, <%= @pref.humanReadableName %>, <%= @pref.humanReadableDescription %>) \
-<%- end -%>
- \
-
-#define FOR_EACH_WEBKIT_STRING_PREFERENCE(macro) \
-<%- for @pref in @stringPreferencesNotDebug do -%>
- macro(<%= @pref.name %>, <%= @pref.nameLower %>, String, String, <%= @pref.defaultValue %>, <%= @pref.humanReadableName %>, <%= @pref.humanReadableDescription %>) \
-<%- end -%>
- \
-
-#define FOR_EACH_WEBKIT_STRING_PREFERENCE_NOT_IN_WEBCORE(macro) \
-<%- for @pref in @stringPreferencesNotDebugNotInWebKit do -%>
- macro(<%= @pref.name %>, <%= @pref.nameLower %>, String, String, <%= @pref.defaultValue %>, <%= @pref.humanReadableName %>, <%= @pref.humanReadableDescription %>) \
-<%- end -%>
- \
-
-
// Debug Preferences
-#define FOR_EACH_WEBKIT_DEBUG_BOOL_PREFERENCE(macro) \
-<%- for @pref in @boolPreferencesDebug do -%>
- macro(<%= @pref.name %>, <%= @pref.nameLower %>, Bool, bool, <%= @pref.defaultValue %>, <%= @pref.humanReadableName %>, <%= @pref.humanReadableDescription %>) \
+#define FOR_EACH_WEBKIT_DEBUG_PREFERENCE(macro) \
+<%- for @pref in @preferencesDebug do -%>
+ macro(<%= @pref.name %>, <%= @pref.nameLower %>, <%= @pref.typeUpper %>, <%= @pref.type %>, <%= @pref.defaultValue %>, <%= @pref.humanReadableName %>, <%= @pref.humanReadableDescription %>) \
<%- end -%>
\
-#define FOR_EACH_WEBKIT_DEBUG_UINT32_PREFERENCE(macro) \
-<%- for @pref in @intPreferencesDebug do -%>
- macro(<%= @pref.name %>, <%= @pref.nameLower %>, UInt32, uint32_t, <%= @pref.defaultValue %>, <%= @pref.humanReadableName %>, <%= @pref.humanReadableDescription %>) \
-<%- end -%>
- \
-
// Experimental Features
#define FOR_EACH_WEBKIT_EXPERIMENTAL_FEATURE_PREFERENCE(macro) \
-<%- for @pref in @experimentalFeature do -%>
+<%- for @pref in @experimentalFeatures do -%>
macro(<%= @pref.name %>, <%= @pref.nameLower %>, Bool, bool, <%= @pref.defaultValue %>, <%= @pref.humanReadableName %>, <%= @pref.humanReadableDescription %>) \
<%- end -%>
\
-
-
-
-#define FOR_EACH_WEBKIT_DEBUG_PREFERENCE(macro) \
- FOR_EACH_WEBKIT_DEBUG_BOOL_PREFERENCE(macro) \
- FOR_EACH_WEBKIT_DEBUG_UINT32_PREFERENCE(macro) \
- \
-
-#define FOR_EACH_WEBKIT_PREFERENCE(macro) \
- FOR_EACH_WEBKIT_BOOL_PREFERENCE(macro) \
- FOR_EACH_WEBKIT_DOUBLE_PREFERENCE(macro) \
- FOR_EACH_WEBKIT_UINT32_PREFERENCE(macro) \
- FOR_EACH_WEBKIT_STRING_PREFERENCE(macro) \
- FOR_EACH_WEBKIT_STRING_PREFERENCE_NOT_IN_WEBCORE(macro) \
- \
-
Modified: trunk/Source/WebKit/Shared/WebPreferences.yaml (224076 => 224077)
--- trunk/Source/WebKit/Shared/WebPreferences.yaml 2017-10-27 01:14:25 UTC (rev 224076)
+++ trunk/Source/WebKit/Shared/WebPreferences.yaml 2017-10-27 01:45:28 UTC (rev 224077)
@@ -2,10 +2,12 @@
_javascript_Enabled:
type: bool
defaultValue: true
+ webcoreName: scriptEnabled
_javascript_MarkupEnabled:
type: bool
defaultValue: true
+ webcoreName: scriptMarkupEnabled
LoadsImagesAutomatically:
type: bool
@@ -14,6 +16,7 @@
LoadsSiteIconsIgnoringImageLoadingPreference:
type: bool
defaultValue: false
+ webcoreName: loadsSiteIconsIgnoringImageLoadingSetting
PluginsEnabled:
type: bool
@@ -38,6 +41,7 @@
DatabasesEnabled:
type: bool
defaultValue: true
+ webcoreBinding: custom
XSSAuditorEnabled:
type: bool
@@ -46,6 +50,7 @@
PrivateBrowsingEnabled:
type: bool
defaultValue: false
+ webcoreBinding: none
TextAreasAreResizable:
type: bool
@@ -70,6 +75,7 @@
ForceCompositingMode:
type: bool
defaultValue: false
+ webcoreBinding: none
CanvasUsesAcceleratedDrawing:
type: bool
@@ -90,6 +96,9 @@
CSSAnimationTriggersEnabled:
type: bool
defaultValue: true
+ webcoreBinding: RuntimeEnabledFeatures
+ webcoreName: animationTriggersEnabled
+ condition: ENABLE(CSS_ANIMATIONS_LEVEL_2)
ForceFTPDirectoryListings:
type: bool
@@ -98,6 +107,7 @@
TabsToLinks:
type: bool
defaultValue: DEFAULT_WEBKIT_TABSTOLINKS_ENABLED
+ webcoreBinding: none
DNSPrefetchingEnabled:
type: bool
@@ -110,6 +120,7 @@
WebArchiveDebugModeEnabled:
type: bool
defaultValue: false
+ condition: ENABLE(WEB_ARCHIVE)
LocalFileContentSniffingEnabled:
type: bool
@@ -146,10 +157,12 @@
LinkPreconnect:
type: bool
defaultValue: DEFAULT_LINK_PRECONNECT_ENABLED
+ webcoreName: linkPreconnectEnabled
FullScreenEnabled:
type: bool
defaultValue: false
+ condition: ENABLE(FULLSCREEN_API)
AsynchronousSpellCheckingEnabled:
type: bool
@@ -171,28 +184,37 @@
type: bool
defaultValue: true
getter: isAVFoundationEnabled
+ webcoreBinding: DeprecatedGlobalSettings
+ condition: USE(AVFOUNDATION)
AVFoundationNSURLSessionEnabled:
type: bool
defaultValue: true
getter: isAVFoundationNSURLSessionEnabled
+ webcoreBinding: DeprecatedGlobalSettings
+ condition: USE(AVFOUNDATION)
GStreamerEnabled:
type: bool
defaultValue: true
getter: isGStreamerEnabled
+ webcoreBinding: DeprecatedGlobalSettings
+ condition: USE(GSTREAMER)
RequiresUserGestureForMediaPlayback:
type: bool
defaultValue: false
+ webcoreBinding: custom
RequiresUserGestureForVideoPlayback:
type: bool
defaultValue: false
+ webcoreBinding: custom
RequiresUserGestureForAudioPlayback:
type: bool
defaultValue: DEFAULT_REQUIRES_USER_GESTURE_FOR_AUDIO_PLAYBACK
+ webcoreBinding: custom
RequiresUserGestureToLoadVideo:
type: bool
@@ -233,6 +255,7 @@
AllowsAirPlayForMediaPlayback:
type: bool
defaultValue: true
+ condition: ENABLE(WIRELESS_PLAYBACK_TARGET)
MediaControlsScaleWithPageZoom:
type: bool
@@ -241,6 +264,7 @@
InspectorStartsAttached:
type: bool
defaultValue: true
+ webcoreBinding: none
ShowsToolTipOverTruncatedText:
type: bool
@@ -249,14 +273,18 @@
MockScrollbarsEnabled:
type: bool
defaultValue: false
+ webcoreBinding: DeprecatedGlobalSettings
WebAudioEnabled:
type: bool
defaultValue: true
+ condition: ENABLE(WEB_AUDIO)
AttachmentElementEnabled:
type: bool
defaultValue: false
+ webcoreBinding: RuntimeEnabledFeatures
+ condition: ENABLE(ATTACHMENT_ELEMENT)
SuppressesIncrementalRendering:
type: bool
@@ -273,18 +301,22 @@
ShouldDisplaySubtitles:
type: bool
defaultValue: false
+ condition: ENABLE(VIDEO_TRACK)
ShouldDisplayCaptions:
type: bool
defaultValue: false
+ condition: ENABLE(VIDEO_TRACK)
ShouldDisplayTextDescriptions:
type: bool
defaultValue: false
+ condition: ENABLE(VIDEO_TRACK)
NotificationsEnabled:
type: bool
defaultValue: true
+ condition: ENABLE(NOTIFICATIONS)
ShouldRespectImageOrientation:
type: bool
@@ -305,26 +337,33 @@
AsynchronousPluginInitializationEnabled:
type: bool
defaultValue: false
+ webcoreBinding: none
AsynchronousPluginInitializationEnabledForAllPlugins:
type: bool
defaultValue: false
+ webcoreBinding: none
ArtificialPluginInitializationDelayEnabled:
type: bool
defaultValue: false
+ webcoreBinding: none
+# FIXME: What is this?
TabToLinksEnabled:
type: bool
defaultValue: false
+ webcoreBinding: none
ScrollingPerformanceLoggingEnabled:
type: bool
defaultValue: false
+ webcoreBinding: custom
ScrollAnimatorEnabled:
type: bool
defaultValue: DEFAULT_WEBKIT_SCROLL_ANIMATOR_ENABLED
+ condition: ENABLE(SMOOTH_SCROLLING)
ForceUpdateScrollbarsOnMainThreadForPerformanceTesting:
type: bool
@@ -353,6 +392,8 @@
PDFPluginEnabled:
type: bool
defaultValue: DEFAULT_PDFPLUGIN_ENABLED
+ webcoreBinding: none
+ condition: PLATFORM(COCOA)
UsesEncodingDetector:
type: bool
@@ -361,6 +402,7 @@
TextAutosizingEnabled:
type: bool
defaultValue: WebCore::Settings::defaultTextAutosizingEnabled()
+ condition: ENABLE(TEXT_AUTOSIZING)
AggressiveTileRetentionEnabled:
type: bool
@@ -374,10 +416,13 @@
type: bool
defaultValue: WebCore::DeprecatedGlobalSettings::isQTKitEnabled()
getter: isQTKitEnabled
+ webcoreBinding: DeprecatedGlobalSettings
+ condition: PLATFORM(COCOA)
PageVisibilityBasedProcessSuppressionEnabled:
type: bool
defaultValue: true
+ webcoreBinding: none
SmartInsertDeleteEnabled:
type: bool
@@ -390,6 +435,7 @@
ShowsURLsInToolTipsEnabled:
type: bool
defaultValue: false
+ webcoreName: showsURLsInToolTips
AcceleratedCompositingForOverflowScrollEnabled:
type: bool
@@ -410,10 +456,12 @@
LowPowerVideoAudioBufferSizeEnabled:
type: bool
defaultValue: false
+ webcoreBinding: DeprecatedGlobalSettings
ThreadedScrollingEnabled:
type: bool
defaultValue: true
+ webcoreBinding: none
SimpleLineLayoutEnabled:
type: bool
@@ -430,14 +478,20 @@
MediaDevicesEnabled:
type: bool
defaultValue: false
+ webcoreBinding: RuntimeEnabledFeatures
+ condition: ENABLE(MEDIA_STREAM)
MediaStreamEnabled:
type: bool
defaultValue: true
+ webcoreBinding: RuntimeEnabledFeatures
+ condition: ENABLE(MEDIA_STREAM)
PeerConnectionEnabled:
type: bool
defaultValue: WebCore::LibWebRTCProvider::webRTCAvailable()
+ webcoreBinding: RuntimeEnabledFeatures
+ condition: ENABLE(WEB_RTC)
UseLegacyTextAlignPositionedElementBehavior:
type: bool
@@ -450,10 +504,12 @@
MediaSourceEnabled:
type: bool
defaultValue: true
+ condition: ENABLE(MEDIA_SOURCE)
ViewGestureDebuggingEnabled:
type: bool
defaultValue: false
+ webcoreBinding: none
ShouldConvertPositionStyleOnCopy:
type: bool
@@ -482,6 +538,7 @@
ImageControlsEnabled:
type: bool
defaultValue: false
+ condition: ENABLE(SERVICE_CONTROLS)
EnableInheritURIQueryComponent:
type: bool
@@ -490,6 +547,7 @@
ServiceControlsEnabled:
type: bool
defaultValue: false
+ condition: ENABLE(SERVICE_CONTROLS)
DeferredCSSParserEnabled:
type: bool
@@ -498,26 +556,36 @@
HTTPEquivEnabled:
type: bool
defaultValue: true
+ webcoreName: httpEquivEnabled
MockCaptureDevicesEnabled:
type: bool
defaultValue: false
+ webcoreBinding: DeprecatedGlobalSettings
+ condition: ENABLE(MEDIA_STREAM)
MockCaptureDevicesPromptEnabled:
type: bool
defaultValue: true
+ webcoreBinding: none
MediaCaptureRequiresSecureConnection:
type: bool
defaultValue: true
+ webcoreBinding: DeprecatedGlobalSettings
+ condition: ENABLE(MEDIA_STREAM)
+# FIXME: What is this for?
EnumeratingAllNetworkInterfacesEnabled:
type: bool
defaultValue: false
+ webcoreBinding: none
+# FIXME: What is this for?
ICECandidateFilteringEnabled:
type: bool
defaultValue: true
+ webcoreBinding: none
ShadowDOMEnabled:
type: bool
@@ -524,14 +592,18 @@
defaultValue: true
humanReadableName: "Shadow DOM"
humanReadableDescription: "HTML Shadow DOM prototype"
+ webcoreBinding: RuntimeEnabledFeatures
FetchAPIEnabled:
type: bool
defaultValue: true
+ webcoreBinding: RuntimeEnabledFeatures
DownloadAttributeEnabled:
type: bool
defaultValue: true
+ webcoreBinding: RuntimeEnabledFeatures
+ condition: ENABLE(DOWNLOAD_ATTRIBUTE)
SelectionPaintingWithoutSelectionGapsEnabled:
type: bool
@@ -540,10 +612,12 @@
ApplePayEnabled:
type: bool
defaultValue: false
+ condition: ENABLE(APPLE_PAY)
ApplePayCapabilityDisclosureAllowed:
type: bool
defaultValue: true
+ condition: ENABLE(APPLE_PAY)
VisualViewportEnabled:
type: bool
@@ -564,14 +638,18 @@
CustomElementsEnabled:
type: bool
defaultValue: true
+ webcoreBinding: RuntimeEnabledFeatures
EncryptedMediaAPIEnabled:
type: bool
defaultValue: false
+ webcoreBinding: RuntimeEnabledFeatures
+ condition: ENABLE(ENCRYPTED_MEDIA)
MediaPreloadingEnabled:
type: bool
defaultValue: false
+ webcoreBinding: RuntimeEnabledFeatures
IntersectionObserverEnabled:
type: bool
@@ -578,6 +656,8 @@
defaultValue: false
humanReadableName: "Intersection Observer"
humanReadableDescription: "Enable Intersection Observer support"
+ webcoreBinding: RuntimeEnabledFeatures
+ condition: ENABLE(INTERSECTION_OBSERVER)
InteractiveFormValidationEnabled:
type: bool
@@ -584,6 +664,7 @@
defaultValue: true
humanReadableName: "HTML Interactive Form Validation"
humanReadableDescription: "HTML interactive form validation"
+ webcoreBinding: RuntimeEnabledFeatures
ShouldSuppressTextInputFromEditingDuringProvisionalNavigation:
type: bool
@@ -594,6 +675,8 @@
defaultValue: true
humanReadableName: "CSS Grid"
humanReadableDescription: "CSS Grid Layout Module support"
+ binding: RuntimeEnabledFeatures
+ webcoreBinding: RuntimeEnabledFeatures
GamepadsEnabled:
type: bool
@@ -600,6 +683,8 @@
defaultValue: true
humanReadableName: "Gamepads"
humanReadableDescription: "Web Gamepad API support"
+ webcoreBinding: RuntimeEnabledFeatures
+ condition: ENABLE(GAMEPAD)
InputEventsEnabled:
type: bool
@@ -606,6 +691,7 @@
defaultValue: true
humanReadableName: "Input Events"
humanReadableDescription: "Enable InputEvents support"
+ webcoreBinding: RuntimeEnabledFeatures
CredentialManagementEnabled:
type: bool
@@ -612,6 +698,7 @@
defaultValue: false
humanReadableName: "Credential Management"
humanReadableDescription: "Enable Credential Management support"
+ webcoreBinding: RuntimeEnabledFeatures
ModernMediaControlsEnabled:
type: bool
@@ -618,6 +705,7 @@
defaultValue: DEFAULT_MODERN_MEDIA_CONTROLS_ENABLED
humanReadableName: "Modern Media Controls"
humanReadableDescription: "Use modern media controls look"
+ webcoreBinding: RuntimeEnabledFeatures
ResourceTimingEnabled:
type: bool
@@ -624,6 +712,7 @@
defaultValue: DEFAULT_RESOURCE_TIMING_ENABLED
humanReadableName: "Resource Timing"
humanReadableDescription: "Enable ResourceTiming API"
+ webcoreBinding: RuntimeEnabledFeatures
UserTimingEnabled:
type: bool
@@ -630,6 +719,7 @@
defaultValue: true
humanReadableName: "User Timing"
humanReadableDescription: "Enable UserTiming API"
+ webcoreBinding: RuntimeEnabledFeatures
BeaconAPIEnabled:
type: bool
@@ -636,6 +726,7 @@
defaultValue: true
humanReadableName: "Beacon API"
humanReadableDescription: "Beacon API"
+ condition: ENABLE(BEACON_API)
LegacyEncryptedMediaAPIEnabled:
type: bool
@@ -642,6 +733,8 @@
defaultValue: DEFAULT_LEGACY_ENCRYPTED_MEDIA_API_ENABLED
humanReadableName: "Enable Legacy EME API"
humanReadableDescription: "Enable legacy EME API"
+ webcoreBinding: RuntimeEnabledFeatures
+ condition: ENABLE(LEGACY_ENCRYPTED_MEDIA)
AllowMediaContentTypesRequiringHardwareSupportAsFallback:
type: bool
@@ -654,6 +747,7 @@
defaultValue: false
humanReadableName: "Web Inspector Additions"
humanReadableDescription: "Enable additional page APIs used by the Web Inspector frontend page"
+ webcoreBinding: RuntimeEnabledFeatures
DirectoryUploadEnabled:
type: bool
@@ -660,6 +754,7 @@
defaultValue: DEFAULT_DIRECTORY_UPLOAD_ENABLED
humanReadableName: "Directory Upload"
humanReadableDescription: "input.webkitdirectory / dataTransferItem.webkitGetAsEntry()"
+ webcoreBinding: RuntimeEnabledFeatures
DataTransferItemsEnabled:
type: bool
@@ -666,6 +761,7 @@
defaultValue: DEFAULT_DATA_TRANSFER_ITEMS_ENABLED
humanReadableName: "Data Transfer Items"
humanReadableDescription: "Enables DataTransferItem in the clipboard API"
+ webcoreBinding: RuntimeEnabledFeatures
CustomPasteboardDataEnabled:
type: bool
@@ -672,6 +768,7 @@
defaultValue: WebCore::DeprecatedGlobalSettings::defaultCustomPasteboardDataEnabled()
humanReadableName: "Custom pateboard data"
humanReadableDescription: "Enable custom clipboard types and better security model for clipboard API."
+ webcoreBinding: DeprecatedGlobalSettings
WebVREnabled:
type: bool
@@ -678,6 +775,7 @@
defaultValue: false
humanReadableName: "WebVR"
humanReadableDescription: "WebVR Module support"
+ webcoreBinding: RuntimeEnabledFeatures
ViewportFitEnabled:
type: bool
@@ -688,6 +786,7 @@
IncrementalRenderingSuppressionTimeout:
type: double
defaultValue: 5
+ webcoreName: incrementalRenderingSuppressionTimeoutInSeconds
MinimumFontSize:
type: double
@@ -700,6 +799,7 @@
MinimumZoomFontSize:
type: double
defaultValue: WebCore::Settings::defaultMinimumZoomFontSize()
+ condition: ENABLE(TEXT_AUTOSIZING)
DefaultFontSize:
type: double
@@ -712,6 +812,7 @@
LayoutInterval:
type: double
defaultValue: -1
+ webcoreBinding: custom
MaxParseDuration:
type: double
@@ -720,10 +821,13 @@
PasswordEchoDuration:
type: double
defaultValue: 2
+ webcoreName: passwordEchoDurationInSeconds
+# FIXME:
FontSmoothingLevel:
type: uint32_t
defaultValue: FontSmoothingLevelMedium
+ webcoreBinding: none
LayoutFallbackWidth:
type: uint32_t
@@ -740,42 +844,53 @@
EditableLinkBehavior:
type: uint32_t
defaultValue: WebCore::EditableLinkNeverLive
+ webcoreBinding: custom
InspectorAttachedHeight:
type: uint32_t
defaultValue: 300
+ webcoreBinding: none
InspectorAttachedWidth:
type: uint32_t
defaultValue: 750
+ webcoreBinding: none
InspectorAttachmentSide:
type: uint32_t
defaultValue: 0
+ webcoreBinding: none
StorageBlockingPolicy:
type: uint32_t
defaultValue: WebCore::SecurityOrigin::BlockThirdPartyStorage
+ webcoreBinding: custom
_javascript_RuntimeFlags:
type: uint32_t
defaultValue: 0
+ webcoreBinding: custom
DataDetectorTypes:
type: uint32_t
defaultValue: 0
+ webcoreBinding: custom
+ condition: ENABLE(DATA_DETECTION)
UserInterfaceDirectionPolicy:
type: uint32_t
defaultValue: 0
+ webcoreBinding: custom
SystemLayoutDirection:
type: uint32_t
defaultValue: 0
+ webcoreBinding: custom
FrameFlattening:
type: uint32_t
defaultValue: DEFAULT_FRAME_FLATTENING
+ webcoreBinding: custom
StandardFontFamily:
type: String
@@ -820,19 +935,21 @@
InspectorWindowFrame:
type: String
defaultValue: '""'
- webkitOnly: true
+ webcoreBinding: none
InactiveMediaCaptureSteamRepromptIntervalInMinutes:
- type: double
- defaultValue: DEFAULT_INTERACTIVE_MNEDIA_CAPTURE_STREAM_REPROMPT_INTERVAL_IN_MINUTES
+ type: double
+ defaultValue: DEFAULT_INTERACTIVE_MNEDIA_CAPTURE_STREAM_REPROMPT_INTERVAL_IN_MINUTES
+ webcoreBinding: none
LongRunningMediaCaptureStreamRepromptIntervalInHours:
- type: double
- defaultValue: 24
+ type: double
+ defaultValue: 24
+ webcoreBinding: none
+
# Debug Preferences
-
AcceleratedDrawingEnabled:
type: bool
defaultValue: DEFAULT_ACCELERATED_DRAWING_ENABLED
@@ -852,16 +969,19 @@
type: bool
defaultValue: false
category: debug
+ webcoreName: showDebugBorders
CompositingRepaintCountersVisible:
type: bool
defaultValue: false
category: debug
+ webcoreName: showRepaintCounter
TiledScrollingIndicatorVisible:
type: bool
defaultValue: false
category: debug
+ webcoreName: showTiledScrollingIndicator
SimpleLineLayoutDebugBordersEnabled:
type: bool
@@ -882,16 +1002,21 @@
type: bool
defaultValue: true
category: debug
+ webcoreBinding: none
+ condition: PLATFORM(IOS)
ForceAlwaysUserScalable:
type: bool
defaultValue: false
category: debug
+ webcoreBinding: none
+ condition: PLATFORM(IOS)
ResourceUsageOverlayVisible:
type: bool
defaultValue: false
category: debug
+ condition: ENABLE(RESOURCE_USAGE)
VisibleDebugOverlayRegions:
type: uint32_t
@@ -921,6 +1046,7 @@
humanReadableName: "Cache API"
humanReadableDescription: "Enable Cache API"
category: experimental
+ webcoreBinding: RuntimeEnabledFeatures
ConstantPropertiesEnabled:
type: bool
@@ -935,6 +1061,7 @@
humanReadableName: "CSS display: contents"
humanReadableDescription: "Enable CSS display: contents support"
category: experimental
+ webcoreBinding: RuntimeEnabledFeatures
SpringTimingFunctionEnabled:
type: bool
@@ -949,6 +1076,7 @@
humanReadableName: "Link Preload"
humanReadableDescription: "Link preload support"
category: experimental
+ webcoreBinding: RuntimeEnabledFeatures
WebRTCLegacyAPIDisabled:
type: bool
@@ -956,6 +1084,8 @@
humanReadableName: "Remove Legacy WebRTC API"
humanReadableDescription: "Remove Legacy WebRTC API"
category: experimental
+ webcoreBinding: custom
+ condition: ENABLE(WEB_RTC)
IsSecureContextAttributeEnabled:
type: bool
@@ -963,6 +1093,7 @@
humanReadableName: "Secure Contexts API"
humanReadableDescription: "Enable Secure Contexts API"
category: experimental
+ webcoreBinding: RuntimeEnabledFeatures
ServiceWorkersEnabled:
type: bool
@@ -970,6 +1101,9 @@
humanReadableName: "ServiceWorkers"
humanReadableDescription: "Enable ServiceWorkers"
category: experimental
+ webcoreBinding: RuntimeEnabledFeatures
+ webcoreName: serviceWorkerEnabled
+ condition: ENABLE(SERVICE_WORKER)
StorageAccessAPIEnabled:
type: bool
@@ -991,6 +1125,7 @@
humanReadableName: "Web Animations"
humanReadableDescription: "Web Animations prototype"
category: experimental
+ webcoreBinding: RuntimeEnabledFeatures
WebGL2Enabled:
type: bool
@@ -998,6 +1133,8 @@
humanReadableName: "WebGL 2.0"
humanReadableDescription: "WebGL 2 prototype"
category: experimental
+ webcoreBinding: RuntimeEnabledFeatures
+ condition: ENABLE(WEBGL2)
WebGPUEnabled:
type: bool
@@ -1005,3 +1142,5 @@
humanReadableName: "WebGPU"
humanReadableDescription: "WebGPU prototype"
category: experimental
+ webcoreBinding: RuntimeEnabledFeatures
+ condition: ENABLE(WEBGPU)
Modified: trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj (224076 => 224077)
--- trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj 2017-10-27 01:14:25 UTC (rev 224076)
+++ trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj 2017-10-27 01:45:28 UTC (rev 224077)
@@ -1353,6 +1353,7 @@
7CE4D2201A4914CA00C7F152 /* APIProcessPoolConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = 7CE4D21E1A4914CA00C7F152 /* APIProcessPoolConfiguration.h */; };
7CE4D2271A4916C200C7F152 /* WebProcessPoolMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CE4D2251A4916C200C7F152 /* WebProcessPoolMessageReceiver.cpp */; };
7CE4D2281A4916C200C7F152 /* WebProcessPoolMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 7CE4D2261A4916C200C7F152 /* WebProcessPoolMessages.h */; };
+ 7CE9CE101FA0767A000177DE /* WebPageUpdatePreferences.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CE9CE0F1FA0764D000177DE /* WebPageUpdatePreferences.cpp */; };
7CEFA9621AC0999300B910FD /* APIContentRuleListStoreCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7CEFA9601AC0999300B910FD /* APIContentRuleListStoreCocoa.mm */; };
7CF47FF617275B71008ACB91 /* WKBundlePageBanner.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CF47FF417275B71008ACB91 /* WKBundlePageBanner.cpp */; };
7CF47FF717275B71008ACB91 /* WKBundlePageBanner.h in Headers */ = {isa = PBXBuildFile; fileRef = 7CF47FF517275B71008ACB91 /* WKBundlePageBanner.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -3739,6 +3740,7 @@
7CE4D21E1A4914CA00C7F152 /* APIProcessPoolConfiguration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = APIProcessPoolConfiguration.h; path = UIProcess/API/APIProcessPoolConfiguration.h; sourceTree = SOURCE_ROOT; };
7CE4D2251A4916C200C7F152 /* WebProcessPoolMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebProcessPoolMessageReceiver.cpp; sourceTree = "<group>"; };
7CE4D2261A4916C200C7F152 /* WebProcessPoolMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebProcessPoolMessages.h; sourceTree = "<group>"; };
+ 7CE9CE0F1FA0764D000177DE /* WebPageUpdatePreferences.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WebPageUpdatePreferences.cpp; sourceTree = "<group>"; };
7CEFA9601AC0999300B910FD /* APIContentRuleListStoreCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = APIContentRuleListStoreCocoa.mm; sourceTree = "<group>"; };
7CF47FF417275B71008ACB91 /* WKBundlePageBanner.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKBundlePageBanner.cpp; sourceTree = "<group>"; };
7CF47FF517275B71008ACB91 /* WKBundlePageBanner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKBundlePageBanner.h; sourceTree = "<group>"; };
@@ -8135,6 +8137,7 @@
C0CE729F1247E71D00BC0EC4 /* WebPageMessages.h */,
BCBD3912125BB1A800D2C29F /* WebPageProxyMessageReceiver.cpp */,
BCBD3913125BB1A800D2C29F /* WebPageProxyMessages.h */,
+ 7CE9CE0F1FA0764D000177DE /* WebPageUpdatePreferences.cpp */,
7C4694C71A4B4EA000AD5845 /* WebPasteboardProxyMessageReceiver.cpp */,
7C4694C81A4B4EA100AD5845 /* WebPasteboardProxyMessages.h */,
1AB1F7921D1B3613007C9BD1 /* WebPaymentCoordinatorMessageReceiver.cpp */,
@@ -10662,6 +10665,7 @@
2DA944AF1884E9BA00ED86DB /* WebPageProxyIOS.mm in Sources */,
BC857E8712B71EBB00EDEB2E /* WebPageProxyMac.mm in Sources */,
BCBD3914125BB1A800D2C29F /* WebPageProxyMessageReceiver.cpp in Sources */,
+ 7CE9CE101FA0767A000177DE /* WebPageUpdatePreferences.cpp in Sources */,
512127C31908239A00DAF35C /* WebPasteboardOverrides.cpp in Sources */,
7C4694D01A51E36800AD5845 /* WebPasteboardProxy.cpp in Sources */,
7C4694CC1A4B510A00AD5845 /* WebPasteboardProxyCocoa.mm in Sources */,
Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp (224076 => 224077)
--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp 2017-10-27 01:14:25 UTC (rev 224076)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp 2017-10-27 01:45:28 UTC (rev 224077)
@@ -3034,352 +3034,43 @@
void WebPage::updatePreferences(const WebPreferencesStore& store)
{
+ updatePreferencesGenerated(store);
+
Settings& settings = m_page->settings();
- m_tabToLinks = store.getBoolValueForKey(WebPreferencesKey::tabsToLinksKey());
- m_asynchronousPluginInitializationEnabled = store.getBoolValueForKey(WebPreferencesKey::asynchronousPluginInitializationEnabledKey());
- m_asynchronousPluginInitializationEnabledForAllPlugins = store.getBoolValueForKey(WebPreferencesKey::asynchronousPluginInitializationEnabledForAllPluginsKey());
- m_artificialPluginInitializationDelayEnabled = store.getBoolValueForKey(WebPreferencesKey::artificialPluginInitializationDelayEnabledKey());
-
- m_scrollingPerformanceLoggingEnabled = store.getBoolValueForKey(WebPreferencesKey::scrollingPerformanceLoggingEnabledKey());
-
-#if PLATFORM(COCOA)
- m_pdfPluginEnabled = store.getBoolValueForKey(WebPreferencesKey::pdfPluginEnabledKey());
-#endif
-
- // FIXME: This should be generated from macro expansion for all preferences,
- // 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, HumanReadableName, HumanReadableDescription) settings.set##KeyUpper(store.get##TypeName##ValueForKey(WebPreferencesKey::KeyLower##Key()));
-
- FOR_EACH_WEBKIT_STRING_PREFERENCE(INITIALIZE_SETTINGS)
-
-#undef INITIALIZE_SETTINGS
-
- settings.setScriptEnabled(store.getBoolValueForKey(WebPreferencesKey::_javascript_EnabledKey()));
- settings.setScriptMarkupEnabled(store.getBoolValueForKey(WebPreferencesKey::_javascript_MarkupEnabledKey()));
- settings.setLoadsImagesAutomatically(store.getBoolValueForKey(WebPreferencesKey::loadsImagesAutomaticallyKey()));
- settings.setLoadsSiteIconsIgnoringImageLoadingSetting(store.getBoolValueForKey(WebPreferencesKey::loadsSiteIconsIgnoringImageLoadingPreferenceKey()));
- settings.setPluginsEnabled(store.getBoolValueForKey(WebPreferencesKey::pluginsEnabledKey()));
- settings.setJavaEnabled(store.getBoolValueForKey(WebPreferencesKey::javaEnabledKey()));
- settings.setJavaEnabledForLocalFiles(store.getBoolValueForKey(WebPreferencesKey::javaEnabledForLocalFilesKey()));
- settings.setOfflineWebApplicationCacheEnabled(store.getBoolValueForKey(WebPreferencesKey::offlineWebApplicationCacheEnabledKey()));
- settings.setLocalStorageEnabled(store.getBoolValueForKey(WebPreferencesKey::localStorageEnabledKey()));
- settings.setXSSAuditorEnabled(store.getBoolValueForKey(WebPreferencesKey::xssAuditorEnabledKey()));
- settings.setFrameFlattening(static_cast<WebCore::FrameFlattening>(store.getUInt32ValueForKey(WebPreferencesKey::frameFlatteningKey())));
- settings.setAsyncFrameScrollingEnabled(store.getBoolValueForKey(WebPreferencesKey::asyncFrameScrollingEnabledKey()));
- if (store.getBoolValueForKey(WebPreferencesKey::privateBrowsingEnabledKey()) && !usesEphemeralSession())
- setSessionID(PAL::SessionID::legacyPrivateSessionID());
- else if (!store.getBoolValueForKey(WebPreferencesKey::privateBrowsingEnabledKey()) && sessionID() == PAL::SessionID::legacyPrivateSessionID())
- setSessionID(PAL::SessionID::defaultSessionID());
- settings.setDeveloperExtrasEnabled(store.getBoolValueForKey(WebPreferencesKey::developerExtrasEnabledKey()));
- settings.setJavaScriptRuntimeFlags(RuntimeFlags(store.getUInt32ValueForKey(WebPreferencesKey::_javascript_RuntimeFlagsKey())));
- settings.setTextAreasAreResizable(store.getBoolValueForKey(WebPreferencesKey::textAreasAreResizableKey()));
- settings.setNeedsSiteSpecificQuirks(store.getBoolValueForKey(WebPreferencesKey::needsSiteSpecificQuirksKey()));
- settings.setJavaScriptCanOpenWindowsAutomatically(store.getBoolValueForKey(WebPreferencesKey::_javascript_CanOpenWindowsAutomaticallyKey()));
- settings.setForceFTPDirectoryListings(store.getBoolValueForKey(WebPreferencesKey::forceFTPDirectoryListingsKey()));
- settings.setDNSPrefetchingEnabled(store.getBoolValueForKey(WebPreferencesKey::dnsPrefetchingEnabledKey()));
- settings.setDOMTimersThrottlingEnabled(store.getBoolValueForKey(WebPreferencesKey::domTimersThrottlingEnabledKey()));
-#if ENABLE(WEB_ARCHIVE)
- settings.setWebArchiveDebugModeEnabled(store.getBoolValueForKey(WebPreferencesKey::webArchiveDebugModeEnabledKey()));
-#endif
- settings.setLocalFileContentSniffingEnabled(store.getBoolValueForKey(WebPreferencesKey::localFileContentSniffingEnabledKey()));
- settings.setUsesPageCache(store.getBoolValueForKey(WebPreferencesKey::usesPageCacheKey()));
- settings.setPageCacheSupportsPlugins(store.getBoolValueForKey(WebPreferencesKey::pageCacheSupportsPluginsKey()));
- settings.setAuthorAndUserStylesEnabled(store.getBoolValueForKey(WebPreferencesKey::authorAndUserStylesEnabledKey()));
- settings.setPaginateDuringLayoutEnabled(store.getBoolValueForKey(WebPreferencesKey::paginateDuringLayoutEnabledKey()));
- settings.setDOMPasteAllowed(store.getBoolValueForKey(WebPreferencesKey::domPasteAllowedKey()));
- settings.setJavaScriptCanAccessClipboard(store.getBoolValueForKey(WebPreferencesKey::_javascript_CanAccessClipboardKey()));
- settings.setLinkPreconnectEnabled(store.getBoolValueForKey(WebPreferencesKey::linkPreconnectKey()));
- settings.setShouldPrintBackgrounds(store.getBoolValueForKey(WebPreferencesKey::shouldPrintBackgroundsKey()));
- settings.setWebSecurityEnabled(store.getBoolValueForKey(WebPreferencesKey::webSecurityEnabledKey()));
- settings.setAllowUniversalAccessFromFileURLs(store.getBoolValueForKey(WebPreferencesKey::allowUniversalAccessFromFileURLsKey()));
- settings.setAllowFileAccessFromFileURLs(store.getBoolValueForKey(WebPreferencesKey::allowFileAccessFromFileURLsKey()));
- settings.setNeedsStorageAccessFromFileURLsQuirk(store.getBoolValueForKey(WebPreferencesKey::needsStorageAccessFromFileURLsQuirkKey()));
-
- settings.setMinimumFontSize(store.getDoubleValueForKey(WebPreferencesKey::minimumFontSizeKey()));
- settings.setMinimumLogicalFontSize(store.getDoubleValueForKey(WebPreferencesKey::minimumLogicalFontSizeKey()));
- settings.setDefaultFontSize(store.getDoubleValueForKey(WebPreferencesKey::defaultFontSizeKey()));
- settings.setDefaultFixedFontSize(store.getDoubleValueForKey(WebPreferencesKey::defaultFixedFontSizeKey()));
- settings.setLayoutFallbackWidth(store.getUInt32ValueForKey(WebPreferencesKey::layoutFallbackWidthKey()));
- settings.setDeviceWidth(store.getUInt32ValueForKey(WebPreferencesKey::deviceWidthKey()));
- settings.setDeviceHeight(store.getUInt32ValueForKey(WebPreferencesKey::deviceHeightKey()));
- settings.setEditableLinkBehavior(static_cast<WebCore::EditableLinkBehavior>(store.getUInt32ValueForKey(WebPreferencesKey::editableLinkBehaviorKey())));
- settings.setShowsToolTipOverTruncatedText(store.getBoolValueForKey(WebPreferencesKey::showsToolTipOverTruncatedTextKey()));
-
- settings.setAcceleratedCompositingForOverflowScrollEnabled(store.getBoolValueForKey(WebPreferencesKey::acceleratedCompositingForOverflowScrollEnabledKey()));
- settings.setAcceleratedCompositingEnabled(store.getBoolValueForKey(WebPreferencesKey::acceleratedCompositingEnabledKey()));
- settings.setAcceleratedDrawingEnabled(store.getBoolValueForKey(WebPreferencesKey::acceleratedDrawingEnabledKey()));
- settings.setDisplayListDrawingEnabled(store.getBoolValueForKey(WebPreferencesKey::displayListDrawingEnabledKey()));
- settings.setCanvasUsesAcceleratedDrawing(store.getBoolValueForKey(WebPreferencesKey::canvasUsesAcceleratedDrawingKey()));
- settings.setShowDebugBorders(store.getBoolValueForKey(WebPreferencesKey::compositingBordersVisibleKey()));
- settings.setShowRepaintCounter(store.getBoolValueForKey(WebPreferencesKey::compositingRepaintCountersVisibleKey()));
- settings.setShowTiledScrollingIndicator(store.getBoolValueForKey(WebPreferencesKey::tiledScrollingIndicatorVisibleKey()));
- settings.setVisibleDebugOverlayRegions(store.getUInt32ValueForKey(WebPreferencesKey::visibleDebugOverlayRegionsKey()));
- settings.setUseGiantTiles(store.getBoolValueForKey(WebPreferencesKey::useGiantTilesKey()));
- settings.setSubpixelAntialiasedLayerTextEnabled(store.getBoolValueForKey(WebPreferencesKey::subpixelAntialiasedLayerTextEnabledKey()));
-
- settings.setAggressiveTileRetentionEnabled(store.getBoolValueForKey(WebPreferencesKey::aggressiveTileRetentionEnabledKey()));
- settings.setTemporaryTileCohortRetentionEnabled(store.getBoolValueForKey(WebPreferencesKey::temporaryTileCohortRetentionEnabledKey()));
-#if ENABLE(CSS_ANIMATIONS_LEVEL_2)
- RuntimeEnabledFeatures::sharedFeatures().setAnimationTriggersEnabled(store.getBoolValueForKey(WebPreferencesKey::cssAnimationTriggersEnabledKey()));
-#endif
- RuntimeEnabledFeatures::sharedFeatures().setWebAnimationsEnabled(store.getBoolValueForKey(WebPreferencesKey::webAnimationsEnabledKey()));
- settings.setWebGLEnabled(store.getBoolValueForKey(WebPreferencesKey::webGLEnabledKey()));
- settings.setForceSoftwareWebGLRendering(store.getBoolValueForKey(WebPreferencesKey::forceSoftwareWebGLRenderingKey()));
- settings.setAccelerated2dCanvasEnabled(store.getBoolValueForKey(WebPreferencesKey::accelerated2dCanvasEnabledKey()));
bool requiresUserGestureForMedia = store.getBoolValueForKey(WebPreferencesKey::requiresUserGestureForMediaPlaybackKey());
settings.setVideoPlaybackRequiresUserGesture(requiresUserGestureForMedia || store.getBoolValueForKey(WebPreferencesKey::requiresUserGestureForVideoPlaybackKey()));
settings.setAudioPlaybackRequiresUserGesture(requiresUserGestureForMedia || store.getBoolValueForKey(WebPreferencesKey::requiresUserGestureForAudioPlaybackKey()));
- settings.setRequiresUserGestureToLoadVideo(store.getBoolValueForKey(WebPreferencesKey::requiresUserGestureToLoadVideoKey()));
- settings.setMainContentUserGestureOverrideEnabled(store.getBoolValueForKey(WebPreferencesKey::mainContentUserGestureOverrideEnabledKey()));
- settings.setMediaUserGestureInheritsFromDocument(store.getBoolValueForKey(WebPreferencesKey::mediaUserGestureInheritsFromDocumentKey()));
- settings.setAllowsInlineMediaPlayback(store.getBoolValueForKey(WebPreferencesKey::allowsInlineMediaPlaybackKey()));
- settings.setAllowsInlineMediaPlaybackAfterFullscreen(store.getBoolValueForKey(WebPreferencesKey::allowsInlineMediaPlaybackAfterFullscreenKey()));
- settings.setInlineMediaPlaybackRequiresPlaysInlineAttribute(store.getBoolValueForKey(WebPreferencesKey::inlineMediaPlaybackRequiresPlaysInlineAttributeKey()));
- settings.setInvisibleAutoplayNotPermitted(store.getBoolValueForKey(WebPreferencesKey::invisibleAutoplayNotPermittedKey()));
- settings.setMediaDataLoadsAutomatically(store.getBoolValueForKey(WebPreferencesKey::mediaDataLoadsAutomaticallyKey()));
- settings.setAllowsPictureInPictureMediaPlayback(store.getBoolValueForKey(WebPreferencesKey::allowsPictureInPictureMediaPlaybackKey()));
- settings.setMediaControlsScaleWithPageZoom(store.getBoolValueForKey(WebPreferencesKey::mediaControlsScaleWithPageZoomKey()));
- DeprecatedGlobalSettings::setMockScrollbarsEnabled(store.getBoolValueForKey(WebPreferencesKey::mockScrollbarsEnabledKey()));
- settings.setHyperlinkAuditingEnabled(store.getBoolValueForKey(WebPreferencesKey::hyperlinkAuditingEnabledKey()));
- settings.setRequestAnimationFrameEnabled(store.getBoolValueForKey(WebPreferencesKey::requestAnimationFrameEnabledKey()));
-#if ENABLE(SMOOTH_SCROLLING)
- settings.setScrollAnimatorEnabled(store.getBoolValueForKey(WebPreferencesKey::scrollAnimatorEnabledKey()));
+ settings.setLayoutInterval(Seconds(store.getDoubleValueForKey(WebPreferencesKey::layoutIntervalKey())));
+ settings.setUserInterfaceDirectionPolicy(static_cast<WebCore::UserInterfaceDirectionPolicy>(store.getUInt32ValueForKey(WebPreferencesKey::userInterfaceDirectionPolicyKey())));
+ settings.setSystemLayoutDirection(static_cast<TextDirection>(store.getUInt32ValueForKey(WebPreferencesKey::systemLayoutDirectionKey())));
+ settings.setJavaScriptRuntimeFlags(static_cast<RuntimeFlags>(store.getUInt32ValueForKey(WebPreferencesKey::_javascript_RuntimeFlagsKey())));
+ settings.setStorageBlockingPolicy(static_cast<SecurityOrigin::StorageBlockingPolicy>(store.getUInt32ValueForKey(WebPreferencesKey::storageBlockingPolicyKey())));
+ settings.setFrameFlattening(static_cast<WebCore::FrameFlattening>(store.getUInt32ValueForKey(WebPreferencesKey::frameFlatteningKey())));
+ settings.setEditableLinkBehavior(static_cast<WebCore::EditableLinkBehavior>(store.getUInt32ValueForKey(WebPreferencesKey::editableLinkBehaviorKey())));
+#if ENABLE(DATA_DETECTION)
+ settings.setDataDetectorTypes(static_cast<DataDetectorTypes>(store.getUInt32ValueForKey(WebPreferencesKey::dataDetectorTypesKey())));
#endif
- settings.setForceUpdateScrollbarsOnMainThreadForPerformanceTesting(store.getBoolValueForKey(WebPreferencesKey::forceUpdateScrollbarsOnMainThreadForPerformanceTestingKey()));
- settings.setInteractiveFormValidationEnabled(store.getBoolValueForKey(WebPreferencesKey::interactiveFormValidationEnabledKey()));
- settings.setSpatialNavigationEnabled(store.getBoolValueForKey(WebPreferencesKey::spatialNavigationEnabledKey()));
- settings.setHttpEquivEnabled(store.getBoolValueForKey(WebPreferencesKey::httpEquivEnabledKey()));
-
- settings.setSelectionPaintingWithoutSelectionGapsEnabled(store.getBoolValueForKey(WebPreferencesKey::selectionPaintingWithoutSelectionGapsEnabledKey()));
-
- DatabaseManager::singleton().setIsAvailable(store.getBoolValueForKey(WebPreferencesKey::databasesEnabledKey()));
-
-#if ENABLE(FULLSCREEN_API)
- settings.setFullScreenEnabled(store.getBoolValueForKey(WebPreferencesKey::fullScreenEnabledKey()));
-#endif
-
-#if USE(AVFOUNDATION)
- DeprecatedGlobalSettings::setAVFoundationEnabled(store.getBoolValueForKey(WebPreferencesKey::isAVFoundationEnabledKey()));
- DeprecatedGlobalSettings::setAVFoundationNSURLSessionEnabled(store.getBoolValueForKey(WebPreferencesKey::isAVFoundationNSURLSessionEnabledKey()));
-#endif
-
-#if USE(GSTREAMER)
- DeprecatedGlobalSettings::setGStreamerEnabled(store.getBoolValueForKey(WebPreferencesKey::isGStreamerEnabledKey()));
-#endif
-
-#if PLATFORM(COCOA)
- DeprecatedGlobalSettings::setQTKitEnabled(store.getBoolValueForKey(WebPreferencesKey::isQTKitEnabledKey()));
-#endif
-
-#if PLATFORM(IOS) && HAVE(AVKIT)
- DeprecatedGlobalSettings::setAVKitEnabled(true);
-#endif
-
-#if ENABLE(WEB_AUDIO)
- settings.setWebAudioEnabled(store.getBoolValueForKey(WebPreferencesKey::webAudioEnabledKey()));
-#endif
-
-#if ENABLE(MEDIA_STREAM)
- RuntimeEnabledFeatures::sharedFeatures().setMediaDevicesEnabled(store.getBoolValueForKey(WebPreferencesKey::mediaDevicesEnabledKey()));
- RuntimeEnabledFeatures::sharedFeatures().setMediaStreamEnabled(store.getBoolValueForKey(WebPreferencesKey::mediaStreamEnabledKey()));
-#endif
-
#if ENABLE(WEB_RTC)
- RuntimeEnabledFeatures::sharedFeatures().setPeerConnectionEnabled(store.getBoolValueForKey(WebPreferencesKey::peerConnectionEnabledKey()));
RuntimeEnabledFeatures::sharedFeatures().setWebRTCLegacyAPIEnabled(!store.getBoolValueForKey(WebPreferencesKey::webRTCLegacyAPIDisabledKey()));
#endif
-#if ENABLE(SERVICE_CONTROLS)
- settings.setImageControlsEnabled(store.getBoolValueForKey(WebPreferencesKey::imageControlsEnabledKey()));
-#endif
+ DatabaseManager::singleton().setIsAvailable(store.getBoolValueForKey(WebPreferencesKey::databasesEnabledKey()));
-#if ENABLE(SERVICE_WORKER)
- RuntimeEnabledFeatures::sharedFeatures().setServiceWorkerEnabled(store.getBoolValueForKey(WebPreferencesKey::serviceWorkersEnabledKey()));
-#endif
+ m_tabToLinks = store.getBoolValueForKey(WebPreferencesKey::tabsToLinksKey());
+ m_asynchronousPluginInitializationEnabled = store.getBoolValueForKey(WebPreferencesKey::asynchronousPluginInitializationEnabledKey());
+ m_asynchronousPluginInitializationEnabledForAllPlugins = store.getBoolValueForKey(WebPreferencesKey::asynchronousPluginInitializationEnabledForAllPluginsKey());
+ m_artificialPluginInitializationDelayEnabled = store.getBoolValueForKey(WebPreferencesKey::artificialPluginInitializationDelayEnabledKey());
-#if ENABLE(WIRELESS_PLAYBACK_TARGET)
- settings.setAllowsAirPlayForMediaPlayback(store.getBoolValueForKey(WebPreferencesKey::allowsAirPlayForMediaPlaybackKey()));
-#endif
-
-#if ENABLE(RESOURCE_USAGE)
- settings.setResourceUsageOverlayVisible(store.getBoolValueForKey(WebPreferencesKey::resourceUsageOverlayVisibleKey()));
-#endif
-
- settings.setSuppressesIncrementalRendering(store.getBoolValueForKey(WebPreferencesKey::suppressesIncrementalRenderingKey()));
- settings.setIncrementalRenderingSuppressionTimeoutInSeconds(store.getDoubleValueForKey(WebPreferencesKey::incrementalRenderingSuppressionTimeoutKey()));
- settings.setBackspaceKeyNavigationEnabled(store.getBoolValueForKey(WebPreferencesKey::backspaceKeyNavigationEnabledKey()));
- settings.setWantsBalancedSetDefersLoadingBehavior(store.getBoolValueForKey(WebPreferencesKey::wantsBalancedSetDefersLoadingBehaviorKey()));
- settings.setCaretBrowsingEnabled(store.getBoolValueForKey(WebPreferencesKey::caretBrowsingEnabledKey()));
-
-#if ENABLE(VIDEO_TRACK)
- settings.setShouldDisplaySubtitles(store.getBoolValueForKey(WebPreferencesKey::shouldDisplaySubtitlesKey()));
- settings.setShouldDisplayCaptions(store.getBoolValueForKey(WebPreferencesKey::shouldDisplayCaptionsKey()));
- settings.setShouldDisplayTextDescriptions(store.getBoolValueForKey(WebPreferencesKey::shouldDisplayTextDescriptionsKey()));
-#endif
-
-#if ENABLE(NOTIFICATIONS)
- settings.setNotificationsEnabled(store.getBoolValueForKey(WebPreferencesKey::notificationsEnabledKey()));
-#endif
-
- settings.setShouldRespectImageOrientation(store.getBoolValueForKey(WebPreferencesKey::shouldRespectImageOrientationKey()));
- settings.setStorageBlockingPolicy(static_cast<SecurityOrigin::StorageBlockingPolicy>(store.getUInt32ValueForKey(WebPreferencesKey::storageBlockingPolicyKey())));
- settings.setCookieEnabled(store.getBoolValueForKey(WebPreferencesKey::cookieEnabledKey()));
-
- settings.setDiagnosticLoggingEnabled(store.getBoolValueForKey(WebPreferencesKey::diagnosticLoggingEnabledKey()));
-
+ m_scrollingPerformanceLoggingEnabled = store.getBoolValueForKey(WebPreferencesKey::scrollingPerformanceLoggingEnabledKey());
settings.setScrollingPerformanceLoggingEnabled(m_scrollingPerformanceLoggingEnabled);
- settings.setPlugInSnapshottingEnabled(store.getBoolValueForKey(WebPreferencesKey::plugInSnapshottingEnabledKey()));
- settings.setSnapshotAllPlugIns(store.getBoolValueForKey(WebPreferencesKey::snapshotAllPlugInsKey()));
- settings.setAutostartOriginPlugInSnapshottingEnabled(store.getBoolValueForKey(WebPreferencesKey::autostartOriginPlugInSnapshottingEnabledKey()));
- settings.setPrimaryPlugInSnapshotDetectionEnabled(store.getBoolValueForKey(WebPreferencesKey::primaryPlugInSnapshotDetectionEnabledKey()));
- settings.setUsesEncodingDetector(store.getBoolValueForKey(WebPreferencesKey::usesEncodingDetectorKey()));
+ if (store.getBoolValueForKey(WebPreferencesKey::privateBrowsingEnabledKey()) && !usesEphemeralSession())
+ setSessionID(PAL::SessionID::legacyPrivateSessionID());
+ else if (!store.getBoolValueForKey(WebPreferencesKey::privateBrowsingEnabledKey()) && sessionID() == PAL::SessionID::legacyPrivateSessionID())
+ setSessionID(PAL::SessionID::defaultSessionID());
-#if ENABLE(TEXT_AUTOSIZING)
- settings.setTextAutosizingEnabled(store.getBoolValueForKey(WebPreferencesKey::textAutosizingEnabledKey()));
- settings.setMinimumZoomFontSize(store.getDoubleValueForKey(WebPreferencesKey::minimumZoomFontSizeKey()));
-#endif
-
- settings.setLogsPageMessagesToSystemConsoleEnabled(store.getBoolValueForKey(WebPreferencesKey::logsPageMessagesToSystemConsoleEnabledKey()));
- settings.setAsynchronousSpellCheckingEnabled(store.getBoolValueForKey(WebPreferencesKey::asynchronousSpellCheckingEnabledKey()));
-
- settings.setSmartInsertDeleteEnabled(store.getBoolValueForKey(WebPreferencesKey::smartInsertDeleteEnabledKey()));
- settings.setSelectTrailingWhitespaceEnabled(store.getBoolValueForKey(WebPreferencesKey::selectTrailingWhitespaceEnabledKey()));
- settings.setShowsURLsInToolTips(store.getBoolValueForKey(WebPreferencesKey::showsURLsInToolTipsEnabledKey()));
-
- settings.setHiddenPageDOMTimerThrottlingEnabled(store.getBoolValueForKey(WebPreferencesKey::hiddenPageDOMTimerThrottlingEnabledKey()));
- settings.setHiddenPageDOMTimerThrottlingAutoIncreases(store.getBoolValueForKey(WebPreferencesKey::hiddenPageDOMTimerThrottlingAutoIncreasesKey()));
-
- settings.setHiddenPageCSSAnimationSuspensionEnabled(store.getBoolValueForKey(WebPreferencesKey::hiddenPageCSSAnimationSuspensionEnabledKey()));
- DeprecatedGlobalSettings::setLowPowerVideoAudioBufferSizeEnabled(store.getBoolValueForKey(WebPreferencesKey::lowPowerVideoAudioBufferSizeEnabledKey()));
- settings.setSimpleLineLayoutEnabled(store.getBoolValueForKey(WebPreferencesKey::simpleLineLayoutEnabledKey()));
- settings.setSimpleLineLayoutDebugBordersEnabled(store.getBoolValueForKey(WebPreferencesKey::simpleLineLayoutDebugBordersEnabledKey()));
-
- settings.setDeferredCSSParserEnabled(store.getBoolValueForKey(WebPreferencesKey::deferredCSSParserEnabledKey()));
-
- settings.setSubpixelCSSOMElementMetricsEnabled(store.getBoolValueForKey(WebPreferencesKey::subpixelCSSOMElementMetricsEnabledKey()));
-
- settings.setUseLegacyTextAlignPositionedElementBehavior(store.getBoolValueForKey(WebPreferencesKey::useLegacyTextAlignPositionedElementBehaviorKey()));
-
-#if ENABLE(MEDIA_SOURCE)
- settings.setMediaSourceEnabled(store.getBoolValueForKey(WebPreferencesKey::mediaSourceEnabledKey()));
-#endif
-
-#if ENABLE(MEDIA_STREAM)
- DeprecatedGlobalSettings::setMockCaptureDevicesEnabled(store.getBoolValueForKey(WebPreferencesKey::mockCaptureDevicesEnabledKey()));
- DeprecatedGlobalSettings::setMediaCaptureRequiresSecureConnection(store.getBoolValueForKey(WebPreferencesKey::mediaCaptureRequiresSecureConnectionKey()));
-#endif
-
- settings.setShouldConvertPositionStyleOnCopy(store.getBoolValueForKey(WebPreferencesKey::shouldConvertPositionStyleOnCopyKey()));
-
- settings.setStandalone(store.getBoolValueForKey(WebPreferencesKey::standaloneKey()));
- settings.setTelephoneNumberParsingEnabled(store.getBoolValueForKey(WebPreferencesKey::telephoneNumberParsingEnabledKey()));
- settings.setAllowMultiElementImplicitSubmission(store.getBoolValueForKey(WebPreferencesKey::allowMultiElementImplicitSubmissionKey()));
- settings.setAlwaysUseAcceleratedOverflowScroll(store.getBoolValueForKey(WebPreferencesKey::alwaysUseAcceleratedOverflowScrollKey()));
-
- settings.setPasswordEchoEnabled(store.getBoolValueForKey(WebPreferencesKey::passwordEchoEnabledKey()));
- settings.setPasswordEchoDurationInSeconds(store.getDoubleValueForKey(WebPreferencesKey::passwordEchoDurationKey()));
-
- settings.setLayoutInterval(Seconds(store.getDoubleValueForKey(WebPreferencesKey::layoutIntervalKey())));
- settings.setMaxParseDuration(store.getDoubleValueForKey(WebPreferencesKey::maxParseDurationKey()));
-
- settings.setEnableInheritURIQueryComponent(store.getBoolValueForKey(WebPreferencesKey::enableInheritURIQueryComponentKey()));
-
- auto userInterfaceDirectionPolicyCandidate = static_cast<WebCore::UserInterfaceDirectionPolicy>(store.getUInt32ValueForKey(WebPreferencesKey::userInterfaceDirectionPolicyKey()));
- if (userInterfaceDirectionPolicyCandidate == WebCore::UserInterfaceDirectionPolicy::Content || userInterfaceDirectionPolicyCandidate == WebCore::UserInterfaceDirectionPolicy::System)
- settings.setUserInterfaceDirectionPolicy(userInterfaceDirectionPolicyCandidate);
- TextDirection systemLayoutDirectionCandidate = static_cast<TextDirection>(store.getUInt32ValueForKey(WebPreferencesKey::systemLayoutDirectionKey()));
- if (systemLayoutDirectionCandidate == WebCore::LTR || systemLayoutDirectionCandidate == WebCore::RTL)
- settings.setSystemLayoutDirection(systemLayoutDirectionCandidate);
-
-#if ENABLE(APPLE_PAY)
- settings.setApplePayEnabled(store.getBoolValueForKey(WebPreferencesKey::applePayEnabledKey()));
- settings.setApplePayCapabilityDisclosureAllowed(store.getBoolValueForKey(WebPreferencesKey::applePayCapabilityDisclosureAllowedKey()));
-#endif
-
-#if PLATFORM(IOS)
- settings.setUseImageDocumentForSubframePDF(true);
-#endif
-
-#if ENABLE(DATA_DETECTION)
- settings.setDataDetectorTypes(static_cast<DataDetectorTypes>(store.getUInt32ValueForKey(WebPreferencesKey::dataDetectorTypesKey())));
-#endif
-#if ENABLE(GAMEPAD)
- RuntimeEnabledFeatures::sharedFeatures().setGamepadsEnabled(store.getBoolValueForKey(WebPreferencesKey::gamepadsEnabledKey()));
-#endif
-
-#if ENABLE(SERVICE_CONTROLS)
- settings.setServiceControlsEnabled(store.getBoolValueForKey(WebPreferencesKey::serviceControlsEnabledKey()));
-#endif
-
- RuntimeEnabledFeatures::sharedFeatures().setCacheAPIEnabled(store.getBoolValueForKey(WebPreferencesKey::cacheAPIEnabledKey()));
- RuntimeEnabledFeatures::sharedFeatures().setFetchAPIEnabled(store.getBoolValueForKey(WebPreferencesKey::fetchAPIEnabledKey()));
-
-#if ENABLE(DOWNLOAD_ATTRIBUTE)
- RuntimeEnabledFeatures::sharedFeatures().setDownloadAttributeEnabled(store.getBoolValueForKey(WebPreferencesKey::downloadAttributeEnabledKey()));
-#endif
-
- RuntimeEnabledFeatures::sharedFeatures().setShadowDOMEnabled(store.getBoolValueForKey(WebPreferencesKey::shadowDOMEnabledKey()));
-
- RuntimeEnabledFeatures::sharedFeatures().setInteractiveFormValidationEnabled(store.getBoolValueForKey(WebPreferencesKey::interactiveFormValidationEnabledKey()));
-
- // Experimental Features.
-
- RuntimeEnabledFeatures::sharedFeatures().setCSSGridLayoutEnabled(store.getBoolValueForKey(WebPreferencesKey::cssGridLayoutEnabledKey()));
-
- RuntimeEnabledFeatures::sharedFeatures().setCustomElementsEnabled(store.getBoolValueForKey(WebPreferencesKey::customElementsEnabledKey()));
-
- RuntimeEnabledFeatures::sharedFeatures().setDataTransferItemsEnabled(store.getBoolValueForKey(WebPreferencesKey::dataTransferItemsEnabledKey()));
-
- DeprecatedGlobalSettings::setCustomPasteboardDataEnabled(store.getBoolValueForKey(WebPreferencesKey::customPasteboardDataEnabledKey()));
-
-#if ENABLE(ATTACHMENT_ELEMENT)
- RuntimeEnabledFeatures::sharedFeatures().setAttachmentElementEnabled(store.getBoolValueForKey(WebPreferencesKey::attachmentElementEnabledKey()));
-#endif
-
-#if ENABLE(WEBGL2)
- RuntimeEnabledFeatures::sharedFeatures().setWebGL2Enabled(store.getBoolValueForKey(WebPreferencesKey::webGL2EnabledKey()));
-#endif
-
-#if ENABLE(WEBGPU)
- RuntimeEnabledFeatures::sharedFeatures().setWebGPUEnabled(store.getBoolValueForKey(WebPreferencesKey::webGPUEnabledKey()));
-#endif
-
- settings.setSpringTimingFunctionEnabled(store.getBoolValueForKey(WebPreferencesKey::springTimingFunctionEnabledKey()));
-
- settings.setConstantPropertiesEnabled(store.getBoolValueForKey(WebPreferencesKey::constantPropertiesEnabledKey()));
-
- settings.setViewportFitEnabled(store.getBoolValueForKey(WebPreferencesKey::viewportFitEnabledKey()));
-
- settings.setVisualViewportEnabled(store.getBoolValueForKey(WebPreferencesKey::visualViewportEnabledKey()));
-
- settings.setInputEventsEnabled(store.getBoolValueForKey(WebPreferencesKey::inputEventsEnabledKey()));
- RuntimeEnabledFeatures::sharedFeatures().setInputEventsEnabled(store.getBoolValueForKey(WebPreferencesKey::inputEventsEnabledKey()));
-
- RuntimeEnabledFeatures::sharedFeatures().setModernMediaControlsEnabled(store.getBoolValueForKey(WebPreferencesKey::modernMediaControlsEnabledKey()));
-
-#if ENABLE(ENCRYPTED_MEDIA)
- RuntimeEnabledFeatures::sharedFeatures().setEncryptedMediaAPIEnabled(store.getBoolValueForKey(WebPreferencesKey::encryptedMediaAPIEnabledKey()));
-#endif
-
-#if ENABLE(INTERSECTION_OBSERVER)
- RuntimeEnabledFeatures::sharedFeatures().setIntersectionObserverEnabled(store.getBoolValueForKey(WebPreferencesKey::intersectionObserverEnabledKey()));
-#endif
-
- RuntimeEnabledFeatures::sharedFeatures().setDisplayContentsEnabled(store.getBoolValueForKey(WebPreferencesKey::displayContentsEnabledKey()));
- RuntimeEnabledFeatures::sharedFeatures().setUserTimingEnabled(store.getBoolValueForKey(WebPreferencesKey::userTimingEnabledKey()));
- RuntimeEnabledFeatures::sharedFeatures().setResourceTimingEnabled(store.getBoolValueForKey(WebPreferencesKey::resourceTimingEnabledKey()));
- RuntimeEnabledFeatures::sharedFeatures().setLinkPreloadEnabled(store.getBoolValueForKey(WebPreferencesKey::linkPreloadEnabledKey()));
- RuntimeEnabledFeatures::sharedFeatures().setMediaPreloadingEnabled(store.getBoolValueForKey(WebPreferencesKey::mediaPreloadingEnabledKey()));
- RuntimeEnabledFeatures::sharedFeatures().setCredentialManagementEnabled(store.getBoolValueForKey(WebPreferencesKey::credentialManagementEnabledKey()));
- RuntimeEnabledFeatures::sharedFeatures().setIsSecureContextAttributeEnabled(store.getBoolValueForKey(WebPreferencesKey::isSecureContextAttributeEnabledKey()));
- RuntimeEnabledFeatures::sharedFeatures().setDirectoryUploadEnabled(store.getBoolValueForKey(WebPreferencesKey::directoryUploadEnabledKey()));
- RuntimeEnabledFeatures::sharedFeatures().setWebVREnabled(store.getBoolValueForKey(WebPreferencesKey::webVREnabledKey()));
-
bool processSuppressionEnabled = store.getBoolValueForKey(WebPreferencesKey::pageVisibilityBasedProcessSuppressionEnabledKey());
if (m_processSuppressionEnabled != processSuppressionEnabled) {
m_processSuppressionEnabled = processSuppressionEnabled;
@@ -3386,39 +3077,27 @@
updateThrottleState();
}
- settings.setSubresourceIntegrityEnabled(store.getBoolValueForKey(WebPreferencesKey::subresourceIntegrityEnabledKey()));
-
-#if ENABLE(BEACON_API)
- settings.setBeaconAPIEnabled(store.getBoolValueForKey(WebPreferencesKey::beaconAPIEnabledKey()));
+#if PLATFORM(COCOA)
+ m_pdfPluginEnabled = store.getBoolValueForKey(WebPreferencesKey::pdfPluginEnabledKey());
#endif
-
#if ENABLE(PAYMENT_REQUEST)
settings.setPaymentRequestEnabled(store.getBoolValueForKey(WebPreferencesKey::applePayEnabledKey()));
#endif
- settings.setStorageAccessAPIEnabled(store.getBoolValueForKey(WebPreferencesKey::storageAccessAPIEnabledKey()));
-
- platformPreferencesDidChange(store);
+ // FIXME: This is both a RuntimeEnabledFeatures (generated) and a setting. It should pick one.
+ settings.setInteractiveFormValidationEnabled(store.getBoolValueForKey(WebPreferencesKey::interactiveFormValidationEnabledKey()));
- if (m_drawingArea)
- m_drawingArea->updatePreferences(store);
-
#if PLATFORM(IOS)
m_ignoreViewportScalingConstraints = store.getBoolValueForKey(WebPreferencesKey::ignoreViewportScalingConstraintsKey());
m_viewportConfiguration.setCanIgnoreScalingConstraints(m_ignoreViewportScalingConstraints);
setForceAlwaysUserScalable(m_forceAlwaysUserScalable || store.getBoolValueForKey(WebPreferencesKey::forceAlwaysUserScalableKey()));
-#endif
- settings.setLargeImageAsyncDecodingEnabled(store.getBoolValueForKey(WebPreferencesKey::largeImageAsyncDecodingEnabledKey()));
- settings.setAnimatedImageAsyncDecodingEnabled(store.getBoolValueForKey(WebPreferencesKey::animatedImageAsyncDecodingEnabledKey()));
- settings.setShouldSuppressTextInputFromEditingDuringProvisionalNavigation(store.getBoolValueForKey(WebPreferencesKey::shouldSuppressTextInputFromEditingDuringProvisionalNavigationKey()));
- settings.setMediaContentTypesRequiringHardwareSupport(store.getStringValueForKey(WebPreferencesKey::mediaContentTypesRequiringHardwareSupportKey()));
- settings.setAllowMediaContentTypesRequiringHardwareSupportAsFallback(store.getBoolValueForKey(WebPreferencesKey::allowMediaContentTypesRequiringHardwareSupportAsFallbackKey()));
-#if ENABLE(LEGACY_ENCRYPTED_MEDIA)
- RuntimeEnabledFeatures::sharedFeatures().setLegacyEncryptedMediaAPIEnabled(store.getBoolValueForKey(WebPreferencesKey::legacyEncryptedMediaAPIEnabledKey()));
+ settings.setUseImageDocumentForSubframePDF(true);
+ DeprecatedGlobalSettings::setAVKitEnabled(true);
#endif
- RuntimeEnabledFeatures::sharedFeatures().setInspectorAdditionsEnabled(store.getBoolValueForKey(WebPreferencesKey::inspectorAdditionsEnabledKey()));
+ if (m_drawingArea)
+ m_drawingArea->updatePreferences(store);
}
#if ENABLE(DATA_DETECTION)
Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.h (224076 => 224077)
--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.h 2017-10-27 01:14:25 UTC (rev 224076)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.h 2017-10-27 01:45:28 UTC (rev 224077)
@@ -1132,8 +1132,8 @@
void takeSnapshot(WebCore::IntRect snapshotRect, WebCore::IntSize bitmapSize, uint32_t options, CallbackID);
void preferencesDidChange(const WebPreferencesStore&);
- void platformPreferencesDidChange(const WebPreferencesStore&);
void updatePreferences(const WebPreferencesStore&);
+ void updatePreferencesGenerated(const WebPreferencesStore&);
void didReceivePolicyDecision(uint64_t frameID, uint64_t listenerID, WebCore::PolicyAction, uint64_t navigationID, const DownloadID&, WebsitePolicies&&);
void continueWillSubmitForm(uint64_t frameID, uint64_t listenerID);
Modified: trunk/Source/WebKit/WebProcess/WebPage/gtk/WebPageGtk.cpp (224076 => 224077)
--- trunk/Source/WebKit/WebProcess/WebPage/gtk/WebPageGtk.cpp 2017-10-27 01:14:25 UTC (rev 224076)
+++ trunk/Source/WebKit/WebProcess/WebPage/gtk/WebPageGtk.cpp 2017-10-27 01:45:28 UTC (rev 224077)
@@ -118,11 +118,6 @@
}
#endif
-void WebPage::platformPreferencesDidChange(const WebPreferencesStore&)
-{
- notImplemented();
-}
-
bool WebPage::performDefaultBehaviorForKeyEvent(const WebKeyboardEvent& keyboardEvent)
{
if (keyboardEvent.type() != WebEvent::KeyDown && keyboardEvent.type() != WebEvent::RawKeyDown)
Modified: trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm (224076 => 224077)
--- trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm 2017-10-27 01:14:25 UTC (rev 224076)
+++ trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm 2017-10-27 01:45:28 UTC (rev 224077)
@@ -147,11 +147,6 @@
IPC::DataReference dataToken = IPC::DataReference(reinterpret_cast<const uint8_t*>([remoteToken bytes]), [remoteToken length]);
send(Messages::WebPageProxy::RegisterWebProcessAccessibilityToken(dataToken));
}
-
-void WebPage::platformPreferencesDidChange(const WebPreferencesStore&)
-{
- notImplemented();
-}
static void computeEditableRootHasContentAndPlainText(const VisibleSelection& selection, EditorState::PostLayoutData& data)
{
Modified: trunk/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm (224076 => 224077)
--- trunk/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm 2017-10-27 01:14:25 UTC (rev 224076)
+++ trunk/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm 2017-10-27 01:45:28 UTC (rev 224077)
@@ -182,10 +182,6 @@
return 0;
}
-void WebPage::platformPreferencesDidChange(const WebPreferencesStore& store)
-{
-}
-
bool WebPage::shouldUsePDFPlugin() const
{
return pdfPluginEnabled() && classFromPDFKit(@"PDFLayerController");
Modified: trunk/Source/WebKit/WebProcess/WebPage/win/WebPageWin.cpp (224076 => 224077)
--- trunk/Source/WebKit/WebProcess/WebPage/win/WebPageWin.cpp 2017-10-27 01:14:25 UTC (rev 224076)
+++ trunk/Source/WebKit/WebProcess/WebPage/win/WebPageWin.cpp 2017-10-27 01:45:28 UTC (rev 224077)
@@ -63,11 +63,6 @@
{
}
-void WebPage::platformPreferencesDidChange(const WebPreferencesStore&)
-{
- notImplemented();
-}
-
bool WebPage::performDefaultBehaviorForKeyEvent(const WebKeyboardEvent& keyboardEvent)
{
if (keyboardEvent.type() != WebEvent::KeyDown && keyboardEvent.type() != WebEvent::RawKeyDown)
Modified: trunk/Source/WebKit/WebProcess/WebPage/wpe/WebPageWPE.cpp (224076 => 224077)
--- trunk/Source/WebKit/WebProcess/WebPage/wpe/WebPageWPE.cpp 2017-10-27 01:14:25 UTC (rev 224076)
+++ trunk/Source/WebKit/WebProcess/WebPage/wpe/WebPageWPE.cpp 2017-10-27 01:45:28 UTC (rev 224077)
@@ -49,11 +49,6 @@
notImplemented();
}
-void WebPage::platformPreferencesDidChange(const WebPreferencesStore& store)
-{
- notImplemented();
-}
-
bool WebPage::performDefaultBehaviorForKeyEvent(const WebKeyboardEvent&)
{
notImplemented();