Changeset 224077 in webkit


Ignore:
Timestamp:
Oct 26, 2017 6:45:28 PM (6 years ago)
Author:
commit-queue@webkit.org
Message:

[Settings] Generate the bulk of WebPage::updatePreferences(...)
https://bugs.webkit.org/show_bug.cgi?id=178823

Patch by Sam Weinig <sam@webkit.org> on 2017-10-26
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.

Location:
trunk/Source/WebKit
Files:
14 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/CMakeLists.txt

    r224041 r224077  
    908908
    909909set(WebKit_WEB_PREFERENCES_TEMPLATES
     910    ${WEBKIT_DIR}/Scripts/PreferencesTemplates/WebPageUpdatePreferences.cpp.erb
    910911    ${WEBKIT_DIR}/Scripts/PreferencesTemplates/WebPreferencesDefinitions.h.erb
    911912)
    912913
    913914add_custom_command(
    914     OUTPUT ${DERIVED_SOURCES_WEBKIT_DIR}/WebPreferencesDefinitions.h
     915    OUTPUT ${DERIVED_SOURCES_WEBKIT_DIR}/WebPageUpdatePreferences.cpp ${DERIVED_SOURCES_WEBKIT_DIR}/WebPreferencesDefinitions.h
    915916    MAIN_DEPENDENCY ${WEBKIT_DIR}/Shared/WebPreferences.yaml
    916917    DEPENDS ${WebKit_WEB_PREFERENCES_TEMPLATES}
     
    921922    ${DERIVED_SOURCES_WEBKIT_DIR}/WebPreferencesDefinitions.h
    922923)
     924
     925list(APPEND WebKit_SOURCES
     926    ${DERIVED_SOURCES_WEBKIT_DIR}/WebPageUpdatePreferences.cpp
     927)
     928
    923929
    924930list(APPEND WebKit_SOURCES ${WebKit_DERIVED_SOURCES})
  • trunk/Source/WebKit/ChangeLog

    r224071 r224077  
     12017-10-26  Sam Weinig  <sam@webkit.org>
     2
     3        [Settings] Generate the bulk of WebPage::updatePreferences(...)
     4        https://bugs.webkit.org/show_bug.cgi?id=178823
     5
     6        Reviewed by Tim Horton.
     7
     8        * CMakeLists.txt:
     9        * DerivedSources.make:
     10        * WebKit.xcodeproj/project.pbxproj:
     11
     12            Add new file generation.
     13
     14        * Scripts/GeneratePreferences.rb:
     15       
     16            Replace 'webkitOnly' boolean option with a new 'webcoreBinding' option.
     17            'webcoreBinding' supports the following values:
     18                - none (same as webkit only)
     19                - custom (means that you do bind to a webcore concept, but currently it must
     20                  be done in a custom manner)
     21                - DeprecatedGlobalSettings (binds to a DeprecatedGlobalSettings setting)
     22                - RuntimeEnabledFeatures (binds to a RuntimeEnabledFeatures setting)
     23            If 'webcoreBinding' is not provided, the preference binds to WebCore Setting
     24            of either the same name or the override name provided by the new 'webcoreName'
     25            option (we should try to remove the need for 'webcoreName' by unifying with
     26            WebCore on preference/setting naming).
     27           
     28            A 'condition' option was also added to indicate that the preference is only available
     29            when that macro condition is true.
     30           
     31            Since we are generating most of WebPage::updatePreferences, we can simplify the
     32            macros in WebPreferencesDefinitions.h to only have normal/debug/experimental variants
     33            and remove the need for per-type macros, which were only used in WebPage::updatePreferences.
     34       
     35        * Scripts/PreferencesTemplates/WebPageUpdatePreferences.cpp.erb: Added.
     36       
     37            Generates bindings from WebPreferences to WebCore::Settings/DeprecatedGlobalSettings/RuntimeEnabledFeatures.
     38            Does not generate a binding if the 'webcoreBinding' option is set to either 'none' or 'custom'.
     39       
     40        * Scripts/PreferencesTemplates/WebPreferencesDefinitions.h.erb:
     41   
     42            Simplify down to just normal/debug/experimental macros.
     43       
     44        * Shared/WebPreferences.yaml:
     45       
     46            Annotate perferences with new optional 'webcoreBinding', 'webcoreName', and 'condition'
     47            options.
     48       
     49        * WebProcess/WebPage/WebPage.cpp:
     50        (WebKit::WebPage::updatePreferences):
     51       
     52            Replace a ton of hand written preference to settings bindings with a call to updatePreferencesGenerated().
     53       
     54        * WebProcess/WebPage/WebPage.h:
     55       
     56            Add declaration of updatePreferencesGenerated, remove platformPreferencesDidChange.
     57
     58        * WebProcess/WebPage/gtk/WebPageGtk.cpp:
     59        (WebKit::WebPage::platformPreferencesDidChange): Deleted.
     60        * WebProcess/WebPage/ios/WebPageIOS.mm:
     61        (WebKit::WebPage::platformPreferencesDidChange): Deleted.
     62        * WebProcess/WebPage/mac/WebPageMac.mm:
     63        (WebKit::WebPage::platformPreferencesDidChange): Deleted.
     64        * WebProcess/WebPage/win/WebPageWin.cpp:
     65        (WebKit::WebPage::platformPreferencesDidChange): Deleted.
     66        * WebProcess/WebPage/wpe/WebPageWPE.cpp:
     67        (WebKit::WebPage::platformPreferencesDidChange): Deleted.
     68       
     69            Remove all the empty platformPreferencesDidChange functions.
     70
    1712017-10-26  Alex Christensen  <achristensen@webkit.org>
    272
  • trunk/Source/WebKit/DerivedSources.make

    r224041 r224077  
    289289
    290290WEB_PREFERENCES_TEMPLATES = \
     291    $(WebKit2)/Scripts/PreferencesTemplates/WebPageUpdatePreferences.cpp.erb \
    291292    $(WebKit2)/Scripts/PreferencesTemplates/WebPreferencesDefinitions.h.erb \
    292293#
    293294
    294 all : WebPreferencesDefinitions.h
    295 
    296 WebPreferencesDefinitions%h : $(WebKit2)/Scripts/GeneratePreferences.rb $(WEB_PREFERENCES_TEMPLATES) $(WebKit2)/Shared/WebPreferences.yaml
     295all : WebPreferencesDefinitions.h WebPageUpdatePreferences.cpp
     296
     297WebPreferencesDefinitions%h WebPageUpdatePreferences%cpp: $(WebKit2)/Scripts/GeneratePreferences.rb $(WEB_PREFERENCES_TEMPLATES) $(WebKit2)/Shared/WebPreferences.yaml
    297298        $(RUBY) $< --input $(WebKit2)/Shared/WebPreferences.yaml
    298299
  • trunk/Source/WebKit/Scripts/GeneratePreferences.rb

    r223903 r224077  
    6868  attr_accessor :humanReadableName
    6969  attr_accessor :humanReadableDescription
    70   attr_accessor :webkitOnly
    7170  attr_accessor :category
     71  attr_accessor :webcoreBinding
     72  attr_accessor :condition
    7273
    7374  def initialize(name, opts)
     
    7778    @humanReadableName = '"' + (opts["humanReadableName"] || "") + '"'
    7879    @humanReadableDescription = '"' + (opts["humanReadableDescription"] || "") + '"'
    79     @webkitOnly = opts["webkitOnly"]
    8080    @category = opts["category"]
    8181    @getter = opts["getter"]
     82    @webcoreBinding = opts["webcoreBinding"]
     83    @webcoreName = opts["webcoreName"]
     84    @condition = opts["condition"]
    8285  end
    8386
     
    9396    end
    9497  end
     98
     99  def webcoreNameUpper
     100    if @webcoreName
     101      @webcoreName[0].upcase + @webcoreName[1..@webcoreName.length]
     102    else
     103      @name
     104    end
     105  end
     106
     107  def typeUpper
     108    if @type == "uint32_t"
     109      "UInt32"
     110    else
     111      @type.capitalize
     112    end
     113  end
     114
    95115end
    96116
     
    115135    @preferences.sort! { |x, y| x.name <=> y.name }
    116136   
    117     @boolPreferencesNotDebug = @preferences.select { |p| !p.category && !p.webkitOnly && p.type == "bool" }
    118     @doublePreferencesNotDebug = @preferences.select { |p| !p.category && !p.webkitOnly && p.type == "double" }
    119     @intPreferencesNotDebug = @preferences.select { |p| !p.category && !p.webkitOnly && p.type == "uint32_t" }
    120     @stringPreferencesNotDebug = @preferences.select { |p| !p.category && !p.webkitOnly && p.type == "String" }
    121     @stringPreferencesNotDebugNotInWebKit = @preferences.select { |p| !p.category && p.webkitOnly && p.type == "String" }
     137    @preferencesNotDebug = @preferences.select { |p| !p.category }
     138    @preferencesDebug = @preferences.select { |p| p.category == "debug" }
     139    @experimentalFeatures = @preferences.select { |p| p.category == "experimental" }
    122140
    123     @boolPreferencesDebug = @preferences.select { |p| p.category == "debug" && !p.webkitOnly && p.type == "bool" }
    124     @intPreferencesDebug = @preferences.select { |p| p.category == "debug" && !p.webkitOnly && p.type == "uint32_t" }
    125 
    126     @experimentalFeature = @preferences.select { |p| p.category == "experimental" && !p.webkitOnly }
     141    @preferencesBoundToSetting = @preferences.select { |p| !p.webcoreBinding }
     142    @preferencesBoundToDeprecatedGlobalSettings = @preferences.select { |p| p.webcoreBinding == "DeprecatedGlobalSettings" }
     143    @preferencesBoundToRuntimeEnabledFeatures = @preferences.select { |p| p.webcoreBinding == "RuntimeEnabledFeatures" }
    127144  end
    128145
     
    139156preferences = Preferences.new(parsedPreferences)
    140157preferences.renderToFile("PreferencesTemplates/WebPreferencesDefinitions.h.erb", File.join(options[:outputDirectory], "WebPreferencesDefinitions.h"))
     158preferences.renderToFile("PreferencesTemplates/WebPageUpdatePreferences.cpp.erb", File.join(options[:outputDirectory], "WebPageUpdatePreferences.cpp"))
  • trunk/Source/WebKit/Scripts/PreferencesTemplates/WebPageUpdatePreferences.cpp.erb

    r224076 r224077  
    11/*
    2  * Copyright (C) 2014 Igalia S.L.
     2 * THIS FILE WAS AUTOMATICALLY GENERATED, DO NOT EDIT.
     3 *
     4 * Copyright (C) 2017 Apple Inc. All rights reserved.
    35 *
    46 * Redistribution and use in source and binary forms, with or without
     
    2729#include "WebPage.h"
    2830
    29 #include "NotImplemented.h"
    3031#include "WebPreferencesKeys.h"
    3132#include "WebPreferencesStore.h"
     33#include <WebCore/DeprecatedGlobalSettings.h>
     34#include <WebCore/Page.h>
     35#include <WebCore/RuntimeEnabledFeatures.h>
    3236#include <WebCore/Settings.h>
    33 #include <WebCore/SharedBuffer.h>
    34 
    35 using namespace WebCore;
    3637
    3738namespace WebKit {
    3839
    39 void WebPage::platformInitialize()
     40void WebPage::updatePreferencesGenerated(const WebPreferencesStore& store)
    4041{
     42    WebCore::Settings& settings = m_page->settings();
     43
     44<%- for @pref in @preferencesBoundToSetting do -%>
     45<%- if @pref.condition -%>
     46#if <%= @pref.condition %>
     47<%- end -%>
     48    settings.set<%= @pref.webcoreNameUpper %>(store.get<%= @pref.typeUpper %>ValueForKey(WebPreferencesKey::<%= @pref.nameLower %>Key()));
     49<%- if @pref.condition -%>
     50#endif
     51<%- end -%>
     52<%- end -%>
     53
     54<%- for @pref in @preferencesBoundToDeprecatedGlobalSettings do -%>
     55<%- if @pref.condition -%>
     56#if <%= @pref.condition %>
     57<%- end -%>
     58    WebCore::DeprecatedGlobalSettings::set<%= @pref.webcoreNameUpper %>(store.get<%= @pref.typeUpper %>ValueForKey(WebPreferencesKey::<%= @pref.nameLower %>Key()));
     59<%- if @pref.condition -%>
     60#endif
     61<%- end -%>
     62<%- end -%>
     63
     64<%- for @pref in @preferencesBoundToRuntimeEnabledFeatures do -%>
     65<%- if @pref.condition -%>
     66#if <%= @pref.condition %>
     67<%- end -%>
     68    WebCore::RuntimeEnabledFeatures::sharedFeatures().set<%= @pref.webcoreNameUpper %>(store.get<%= @pref.typeUpper %>ValueForKey(WebPreferencesKey::<%= @pref.nameLower %>Key()));
     69<%- if @pref.condition -%>
     70#endif
     71<%- end -%>
     72<%- end -%>
    4173}
    4274
    43 void WebPage::platformDetach()
    44 {
    4575}
    46 
    47 void WebPage::platformEditorState(Frame&, EditorState&, IncludePostLayoutDataHint) const
    48 {
    49     notImplemented();
    50 }
    51 
    52 void WebPage::platformPreferencesDidChange(const WebPreferencesStore& store)
    53 {
    54     notImplemented();
    55 }
    56 
    57 bool WebPage::performDefaultBehaviorForKeyEvent(const WebKeyboardEvent&)
    58 {
    59     notImplemented();
    60     return false;
    61 }
    62 
    63 bool WebPage::platformHasLocalDataForURL(const URL&)
    64 {
    65     notImplemented();
    66     return false;
    67 }
    68 
    69 String WebPage::cachedResponseMIMETypeForURL(const URL&)
    70 {
    71     notImplemented();
    72     return String();
    73 }
    74 
    75 bool WebPage::platformCanHandleRequest(const ResourceRequest&)
    76 {
    77     notImplemented();
    78     return false;
    79 }
    80 
    81 String WebPage::cachedSuggestedFilenameForURL(const URL&)
    82 {
    83     notImplemented();
    84     return String();
    85 }
    86 
    87 RefPtr<SharedBuffer> WebPage::cachedResponseDataForURL(const URL&)
    88 {
    89     notImplemented();
    90     return nullptr;
    91 }
    92 
    93 String WebPage::platformUserAgent(const URL&) const
    94 {
    95     notImplemented();
    96     return String();
    97 }
    98 
    99 } // namespace WebKit
  • trunk/Source/WebKit/Scripts/PreferencesTemplates/WebPreferencesDefinitions.h.erb

    r223903 r224077  
    3232// macro(KeyUpper, KeyLower, TypeNameUpper, TypeName, DefaultValue, HumanReadableName, HumanReadableDescription)
    3333
    34 #define FOR_EACH_WEBKIT_BOOL_PREFERENCE(macro) \
    35 <%- for @pref in @boolPreferencesNotDebug do -%>
    36     macro(<%= @pref.name %>, <%= @pref.nameLower %>, Bool, bool, <%= @pref.defaultValue %>, <%= @pref.humanReadableName %>, <%= @pref.humanReadableDescription %>) \
    37 <%- end -%>
    38     \
    39 
    40 #define FOR_EACH_WEBKIT_DOUBLE_PREFERENCE(macro) \
    41 <%- for @pref in @doublePreferencesNotDebug do -%>
    42     macro(<%= @pref.name %>, <%= @pref.nameLower %>, Double, double, <%= @pref.defaultValue %>, <%= @pref.humanReadableName %>, <%= @pref.humanReadableDescription %>) \
    43 <%- end -%>
    44     \
    45 
    46 #define FOR_EACH_WEBKIT_UINT32_PREFERENCE(macro) \
    47 <%- for @pref in @intPreferencesNotDebug do -%>
    48     macro(<%= @pref.name %>, <%= @pref.nameLower %>, UInt32, uint32_t, <%= @pref.defaultValue %>, <%= @pref.humanReadableName %>, <%= @pref.humanReadableDescription %>) \
    49 <%- end -%>
    50     \
    51 
    52 #define FOR_EACH_WEBKIT_STRING_PREFERENCE(macro) \
    53 <%- for @pref in @stringPreferencesNotDebug do -%>
    54     macro(<%= @pref.name %>, <%= @pref.nameLower %>, String, String, <%= @pref.defaultValue %>, <%= @pref.humanReadableName %>, <%= @pref.humanReadableDescription %>) \
    55 <%- end -%>
    56     \
    57 
    58 #define FOR_EACH_WEBKIT_STRING_PREFERENCE_NOT_IN_WEBCORE(macro) \
    59 <%- for @pref in @stringPreferencesNotDebugNotInWebKit do -%>
    60     macro(<%= @pref.name %>, <%= @pref.nameLower %>, String, String, <%= @pref.defaultValue %>, <%= @pref.humanReadableName %>, <%= @pref.humanReadableDescription %>) \
     34#define FOR_EACH_WEBKIT_PREFERENCE(macro) \
     35<%- for @pref in @preferencesNotDebug do -%>
     36    macro(<%= @pref.name %>, <%= @pref.nameLower %>, <%= @pref.typeUpper %>, <%= @pref.type %>, <%= @pref.defaultValue %>, <%= @pref.humanReadableName %>, <%= @pref.humanReadableDescription %>) \
    6137<%- end -%>
    6238    \
     
    6541// Debug Preferences
    6642
    67 #define FOR_EACH_WEBKIT_DEBUG_BOOL_PREFERENCE(macro) \
    68 <%- for @pref in @boolPreferencesDebug do -%>
    69     macro(<%= @pref.name %>, <%= @pref.nameLower %>, Bool, bool, <%= @pref.defaultValue %>, <%= @pref.humanReadableName %>, <%= @pref.humanReadableDescription %>) \
    70 <%- end -%>
    71     \
    72 
    73 #define FOR_EACH_WEBKIT_DEBUG_UINT32_PREFERENCE(macro) \
    74 <%- for @pref in @intPreferencesDebug do -%>
    75     macro(<%= @pref.name %>, <%= @pref.nameLower %>, UInt32, uint32_t, <%= @pref.defaultValue %>, <%= @pref.humanReadableName %>, <%= @pref.humanReadableDescription %>) \
     43#define FOR_EACH_WEBKIT_DEBUG_PREFERENCE(macro) \
     44<%- for @pref in @preferencesDebug do -%>
     45    macro(<%= @pref.name %>, <%= @pref.nameLower %>, <%= @pref.typeUpper %>, <%= @pref.type %>, <%= @pref.defaultValue %>, <%= @pref.humanReadableName %>, <%= @pref.humanReadableDescription %>) \
    7646<%- end -%>
    7747    \
     
    8151
    8252#define FOR_EACH_WEBKIT_EXPERIMENTAL_FEATURE_PREFERENCE(macro) \
    83 <%- for @pref in @experimentalFeature do -%>
     53<%- for @pref in @experimentalFeatures do -%>
    8454    macro(<%= @pref.name %>, <%= @pref.nameLower %>, Bool, bool, <%= @pref.defaultValue %>, <%= @pref.humanReadableName %>, <%= @pref.humanReadableDescription %>) \
    8555<%- end -%>
    8656    \
    87 
    88 
    89 
    90 #define FOR_EACH_WEBKIT_DEBUG_PREFERENCE(macro) \
    91     FOR_EACH_WEBKIT_DEBUG_BOOL_PREFERENCE(macro) \
    92     FOR_EACH_WEBKIT_DEBUG_UINT32_PREFERENCE(macro) \
    93     \
    94 
    95 #define FOR_EACH_WEBKIT_PREFERENCE(macro) \
    96     FOR_EACH_WEBKIT_BOOL_PREFERENCE(macro) \
    97     FOR_EACH_WEBKIT_DOUBLE_PREFERENCE(macro) \
    98     FOR_EACH_WEBKIT_UINT32_PREFERENCE(macro) \
    99     FOR_EACH_WEBKIT_STRING_PREFERENCE(macro) \
    100     FOR_EACH_WEBKIT_STRING_PREFERENCE_NOT_IN_WEBCORE(macro) \
    101     \
    102 
  • trunk/Source/WebKit/Shared/WebPreferences.yaml

    r224043 r224077  
    33  type: bool
    44  defaultValue: true
     5  webcoreName: scriptEnabled
    56
    67JavaScriptMarkupEnabled:
    78  type: bool
    89  defaultValue: true
     10  webcoreName: scriptMarkupEnabled
    911
    1012LoadsImagesAutomatically:
     
    1517  type: bool
    1618  defaultValue: false
     19  webcoreName: loadsSiteIconsIgnoringImageLoadingSetting
    1720
    1821PluginsEnabled:
     
    3942  type: bool
    4043  defaultValue: true
     44  webcoreBinding: custom
    4145
    4246XSSAuditorEnabled:
     
    4751  type: bool
    4852  defaultValue: false
     53  webcoreBinding: none
    4954
    5055TextAreasAreResizable:
     
    7176  type: bool
    7277  defaultValue: false
     78  webcoreBinding: none
    7379
    7480CanvasUsesAcceleratedDrawing:
     
    9197  type: bool
    9298  defaultValue: true
     99  webcoreBinding: RuntimeEnabledFeatures
     100  webcoreName: animationTriggersEnabled
     101  condition: ENABLE(CSS_ANIMATIONS_LEVEL_2)
    93102
    94103ForceFTPDirectoryListings:
     
    99108  type: bool
    100109  defaultValue: DEFAULT_WEBKIT_TABSTOLINKS_ENABLED
     110  webcoreBinding: none
    101111
    102112DNSPrefetchingEnabled:
     
    111121  type: bool
    112122  defaultValue: false
     123  condition: ENABLE(WEB_ARCHIVE)
    113124
    114125LocalFileContentSniffingEnabled:
     
    147158  type: bool
    148159  defaultValue: DEFAULT_LINK_PRECONNECT_ENABLED
     160  webcoreName: linkPreconnectEnabled
    149161
    150162FullScreenEnabled:
    151163  type: bool
    152164  defaultValue: false
     165  condition: ENABLE(FULLSCREEN_API)
    153166
    154167AsynchronousSpellCheckingEnabled:
     
    172185  defaultValue: true
    173186  getter: isAVFoundationEnabled
     187  webcoreBinding: DeprecatedGlobalSettings
     188  condition: USE(AVFOUNDATION)
    174189
    175190AVFoundationNSURLSessionEnabled:
     
    177192  defaultValue: true
    178193  getter: isAVFoundationNSURLSessionEnabled
     194  webcoreBinding: DeprecatedGlobalSettings
     195  condition: USE(AVFOUNDATION)
    179196
    180197GStreamerEnabled:
     
    182199  defaultValue: true
    183200  getter: isGStreamerEnabled
     201  webcoreBinding: DeprecatedGlobalSettings
     202  condition: USE(GSTREAMER)
    184203
    185204RequiresUserGestureForMediaPlayback:
    186205  type: bool
    187206  defaultValue: false
     207  webcoreBinding: custom
    188208
    189209RequiresUserGestureForVideoPlayback:
    190210  type: bool
    191211  defaultValue: false
     212  webcoreBinding: custom
    192213
    193214RequiresUserGestureForAudioPlayback:
    194215  type: bool
    195216  defaultValue: DEFAULT_REQUIRES_USER_GESTURE_FOR_AUDIO_PLAYBACK
     217  webcoreBinding: custom
    196218
    197219RequiresUserGestureToLoadVideo:
     
    234256  type: bool
    235257  defaultValue: true
     258  condition: ENABLE(WIRELESS_PLAYBACK_TARGET)
    236259
    237260MediaControlsScaleWithPageZoom:
     
    242265  type: bool
    243266  defaultValue: true
     267  webcoreBinding: none
    244268
    245269ShowsToolTipOverTruncatedText:
     
    250274  type: bool
    251275  defaultValue: false
     276  webcoreBinding: DeprecatedGlobalSettings
    252277
    253278WebAudioEnabled:
    254279  type: bool
    255280  defaultValue: true
     281  condition: ENABLE(WEB_AUDIO)
    256282
    257283AttachmentElementEnabled:
    258284  type: bool
    259285  defaultValue: false
     286  webcoreBinding: RuntimeEnabledFeatures
     287  condition: ENABLE(ATTACHMENT_ELEMENT)
    260288
    261289SuppressesIncrementalRendering:
     
    274302  type: bool
    275303  defaultValue: false
     304  condition: ENABLE(VIDEO_TRACK)
    276305
    277306ShouldDisplayCaptions:
    278307  type: bool
    279308  defaultValue: false
     309  condition: ENABLE(VIDEO_TRACK)
    280310
    281311ShouldDisplayTextDescriptions:
    282312  type: bool
    283313  defaultValue: false
     314  condition: ENABLE(VIDEO_TRACK)
    284315
    285316NotificationsEnabled:
    286317  type: bool
    287318  defaultValue: true
     319  condition: ENABLE(NOTIFICATIONS)
    288320
    289321ShouldRespectImageOrientation:
     
    306338  type: bool
    307339  defaultValue: false
     340  webcoreBinding: none
    308341
    309342AsynchronousPluginInitializationEnabledForAllPlugins:
    310343  type: bool
    311344  defaultValue: false
     345  webcoreBinding: none
    312346
    313347ArtificialPluginInitializationDelayEnabled:
    314348  type: bool
    315349  defaultValue: false
    316 
     350  webcoreBinding: none
     351
     352# FIXME: What is this?
    317353TabToLinksEnabled:
    318354  type: bool
    319355  defaultValue: false
     356  webcoreBinding: none
    320357
    321358ScrollingPerformanceLoggingEnabled:
    322359  type: bool
    323360  defaultValue: false
     361  webcoreBinding: custom
    324362
    325363ScrollAnimatorEnabled:
    326364  type: bool
    327365  defaultValue: DEFAULT_WEBKIT_SCROLL_ANIMATOR_ENABLED
     366  condition: ENABLE(SMOOTH_SCROLLING)
    328367
    329368ForceUpdateScrollbarsOnMainThreadForPerformanceTesting:
     
    354393  type: bool
    355394  defaultValue: DEFAULT_PDFPLUGIN_ENABLED
     395  webcoreBinding: none
     396  condition: PLATFORM(COCOA)
    356397
    357398UsesEncodingDetector:
     
    362403  type: bool
    363404  defaultValue: WebCore::Settings::defaultTextAutosizingEnabled()
     405  condition: ENABLE(TEXT_AUTOSIZING)
    364406
    365407AggressiveTileRetentionEnabled:
     
    375417  defaultValue: WebCore::DeprecatedGlobalSettings::isQTKitEnabled()
    376418  getter: isQTKitEnabled
     419  webcoreBinding: DeprecatedGlobalSettings
     420  condition: PLATFORM(COCOA)
    377421
    378422PageVisibilityBasedProcessSuppressionEnabled:
    379423  type: bool
    380424  defaultValue: true
     425  webcoreBinding: none
    381426
    382427SmartInsertDeleteEnabled:
     
    391436  type: bool
    392437  defaultValue: false
     438  webcoreName: showsURLsInToolTips
    393439
    394440AcceleratedCompositingForOverflowScrollEnabled:
     
    411457  type: bool
    412458  defaultValue: false
     459  webcoreBinding: DeprecatedGlobalSettings
    413460
    414461ThreadedScrollingEnabled:
    415462  type: bool
    416463  defaultValue: true
     464  webcoreBinding: none
    417465
    418466SimpleLineLayoutEnabled:
     
    431479  type: bool
    432480  defaultValue: false
     481  webcoreBinding: RuntimeEnabledFeatures
     482  condition: ENABLE(MEDIA_STREAM)
    433483
    434484MediaStreamEnabled:
    435485  type: bool
    436486  defaultValue: true
     487  webcoreBinding: RuntimeEnabledFeatures
     488  condition: ENABLE(MEDIA_STREAM)
    437489
    438490PeerConnectionEnabled:
    439491  type: bool
    440492  defaultValue: WebCore::LibWebRTCProvider::webRTCAvailable()
     493  webcoreBinding: RuntimeEnabledFeatures
     494  condition: ENABLE(WEB_RTC)
    441495
    442496UseLegacyTextAlignPositionedElementBehavior:
     
    451505  type: bool
    452506  defaultValue: true
     507  condition: ENABLE(MEDIA_SOURCE)
    453508
    454509ViewGestureDebuggingEnabled:
    455510  type: bool
    456511  defaultValue: false
     512  webcoreBinding: none
    457513
    458514ShouldConvertPositionStyleOnCopy:
     
    483539  type: bool
    484540  defaultValue: false
     541  condition: ENABLE(SERVICE_CONTROLS)
    485542
    486543EnableInheritURIQueryComponent:
     
    491548  type: bool
    492549  defaultValue: false
     550  condition: ENABLE(SERVICE_CONTROLS)
    493551
    494552DeferredCSSParserEnabled:
     
    499557  type: bool
    500558  defaultValue: true
     559  webcoreName: httpEquivEnabled
    501560
    502561MockCaptureDevicesEnabled:
    503562  type: bool
    504563  defaultValue: false
     564  webcoreBinding: DeprecatedGlobalSettings
     565  condition: ENABLE(MEDIA_STREAM)
    505566
    506567MockCaptureDevicesPromptEnabled:
    507568  type: bool
    508569  defaultValue: true
     570  webcoreBinding: none
    509571
    510572MediaCaptureRequiresSecureConnection:
    511573  type: bool
    512574  defaultValue: true
    513 
     575  webcoreBinding: DeprecatedGlobalSettings
     576  condition: ENABLE(MEDIA_STREAM)
     577
     578# FIXME: What is this for?
    514579EnumeratingAllNetworkInterfacesEnabled:
    515580  type: bool
    516581  defaultValue: false
    517 
     582  webcoreBinding: none
     583
     584# FIXME: What is this for?
    518585ICECandidateFilteringEnabled:
    519586  type: bool
    520587  defaultValue: true
     588  webcoreBinding: none
    521589
    522590ShadowDOMEnabled:
     
    525593  humanReadableName: "Shadow DOM"
    526594  humanReadableDescription: "HTML Shadow DOM prototype"
     595  webcoreBinding: RuntimeEnabledFeatures
    527596
    528597FetchAPIEnabled:
    529598  type: bool
    530599  defaultValue: true
     600  webcoreBinding: RuntimeEnabledFeatures
    531601
    532602DownloadAttributeEnabled:
    533603  type: bool
    534604  defaultValue: true
     605  webcoreBinding: RuntimeEnabledFeatures
     606  condition: ENABLE(DOWNLOAD_ATTRIBUTE)
    535607
    536608SelectionPaintingWithoutSelectionGapsEnabled:
     
    541613  type: bool
    542614  defaultValue: false
     615  condition: ENABLE(APPLE_PAY)
    543616
    544617ApplePayCapabilityDisclosureAllowed:
    545618  type: bool
    546619  defaultValue: true
     620  condition: ENABLE(APPLE_PAY)
    547621
    548622VisualViewportEnabled:
     
    565639  type: bool
    566640  defaultValue: true
     641  webcoreBinding: RuntimeEnabledFeatures
    567642
    568643EncryptedMediaAPIEnabled:
    569644  type: bool
    570645  defaultValue: false
     646  webcoreBinding: RuntimeEnabledFeatures
     647  condition: ENABLE(ENCRYPTED_MEDIA)
    571648
    572649MediaPreloadingEnabled:
    573650  type: bool
    574651  defaultValue: false
     652  webcoreBinding: RuntimeEnabledFeatures
    575653
    576654IntersectionObserverEnabled:
     
    579657  humanReadableName: "Intersection Observer"
    580658  humanReadableDescription: "Enable Intersection Observer support"
     659  webcoreBinding: RuntimeEnabledFeatures
     660  condition: ENABLE(INTERSECTION_OBSERVER)
    581661
    582662InteractiveFormValidationEnabled:
     
    585665  humanReadableName: "HTML Interactive Form Validation"
    586666  humanReadableDescription: "HTML interactive form validation"
     667  webcoreBinding: RuntimeEnabledFeatures
    587668
    588669ShouldSuppressTextInputFromEditingDuringProvisionalNavigation:
     
    595676  humanReadableName: "CSS Grid"
    596677  humanReadableDescription: "CSS Grid Layout Module support"
     678  binding: RuntimeEnabledFeatures
     679  webcoreBinding: RuntimeEnabledFeatures
    597680
    598681GamepadsEnabled:
     
    601684  humanReadableName: "Gamepads"
    602685  humanReadableDescription: "Web Gamepad API support"
     686  webcoreBinding: RuntimeEnabledFeatures
     687  condition: ENABLE(GAMEPAD)
    603688
    604689InputEventsEnabled:
     
    607692  humanReadableName: "Input Events"
    608693  humanReadableDescription: "Enable InputEvents support"
     694  webcoreBinding: RuntimeEnabledFeatures
    609695
    610696CredentialManagementEnabled:
     
    613699  humanReadableName: "Credential Management"
    614700  humanReadableDescription: "Enable Credential Management support"
     701  webcoreBinding: RuntimeEnabledFeatures
    615702
    616703ModernMediaControlsEnabled:
     
    619706  humanReadableName: "Modern Media Controls"
    620707  humanReadableDescription: "Use modern media controls look"
     708  webcoreBinding: RuntimeEnabledFeatures
    621709
    622710ResourceTimingEnabled:
     
    625713  humanReadableName: "Resource Timing"
    626714  humanReadableDescription: "Enable ResourceTiming API"
     715  webcoreBinding: RuntimeEnabledFeatures
    627716
    628717UserTimingEnabled:
     
    631720  humanReadableName: "User Timing"
    632721  humanReadableDescription: "Enable UserTiming API"
     722  webcoreBinding: RuntimeEnabledFeatures
    633723
    634724BeaconAPIEnabled:
     
    637727  humanReadableName: "Beacon API"
    638728  humanReadableDescription: "Beacon API"
     729  condition: ENABLE(BEACON_API)
    639730
    640731LegacyEncryptedMediaAPIEnabled:
     
    643734  humanReadableName: "Enable Legacy EME API"
    644735  humanReadableDescription: "Enable legacy EME API"
     736  webcoreBinding: RuntimeEnabledFeatures
     737  condition: ENABLE(LEGACY_ENCRYPTED_MEDIA)
    645738
    646739AllowMediaContentTypesRequiringHardwareSupportAsFallback:
     
    655748  humanReadableName: "Web Inspector Additions"
    656749  humanReadableDescription: "Enable additional page APIs used by the Web Inspector frontend page"
     750  webcoreBinding: RuntimeEnabledFeatures
    657751
    658752DirectoryUploadEnabled:
     
    661755  humanReadableName: "Directory Upload"
    662756  humanReadableDescription: "input.webkitdirectory / dataTransferItem.webkitGetAsEntry()"
     757  webcoreBinding: RuntimeEnabledFeatures
    663758
    664759DataTransferItemsEnabled:
     
    667762  humanReadableName: "Data Transfer Items"
    668763  humanReadableDescription: "Enables DataTransferItem in the clipboard API"
     764  webcoreBinding: RuntimeEnabledFeatures
    669765
    670766CustomPasteboardDataEnabled:
     
    673769  humanReadableName: "Custom pateboard data"
    674770  humanReadableDescription: "Enable custom clipboard types and better security model for clipboard API."
     771  webcoreBinding: DeprecatedGlobalSettings
    675772
    676773WebVREnabled:
     
    679776  humanReadableName: "WebVR"
    680777  humanReadableDescription: "WebVR Module support"
     778  webcoreBinding: RuntimeEnabledFeatures
    681779
    682780ViewportFitEnabled:
     
    689787  type: double
    690788  defaultValue: 5
     789  webcoreName: incrementalRenderingSuppressionTimeoutInSeconds
    691790
    692791MinimumFontSize:
     
    701800  type: double
    702801  defaultValue: WebCore::Settings::defaultMinimumZoomFontSize()
     802  condition: ENABLE(TEXT_AUTOSIZING)
    703803
    704804DefaultFontSize:
     
    713813  type: double
    714814  defaultValue: -1
     815  webcoreBinding: custom
    715816
    716817MaxParseDuration:
     
    721822  type: double
    722823  defaultValue: 2
    723 
     824  webcoreName: passwordEchoDurationInSeconds
     825
     826# FIXME:
    724827FontSmoothingLevel:
    725828  type: uint32_t
    726829  defaultValue: FontSmoothingLevelMedium
     830  webcoreBinding: none
    727831
    728832LayoutFallbackWidth:
     
    741845  type: uint32_t
    742846  defaultValue: WebCore::EditableLinkNeverLive
     847  webcoreBinding: custom
    743848
    744849InspectorAttachedHeight:
    745850  type: uint32_t
    746851  defaultValue: 300
     852  webcoreBinding: none
    747853
    748854InspectorAttachedWidth:
    749855  type: uint32_t
    750856  defaultValue: 750
     857  webcoreBinding: none
    751858
    752859InspectorAttachmentSide:
    753860  type: uint32_t
    754861  defaultValue: 0
     862  webcoreBinding: none
    755863
    756864StorageBlockingPolicy:
    757865  type: uint32_t
    758866  defaultValue: WebCore::SecurityOrigin::BlockThirdPartyStorage
     867  webcoreBinding: custom
    759868
    760869JavaScriptRuntimeFlags:
    761870  type: uint32_t
    762871  defaultValue: 0
     872  webcoreBinding: custom
    763873
    764874DataDetectorTypes:
    765875  type: uint32_t
    766876  defaultValue: 0
     877  webcoreBinding: custom
     878  condition: ENABLE(DATA_DETECTION)
    767879
    768880UserInterfaceDirectionPolicy:
    769881  type: uint32_t
    770882  defaultValue: 0
     883  webcoreBinding: custom
    771884
    772885SystemLayoutDirection:
    773886  type: uint32_t
    774887  defaultValue: 0
     888  webcoreBinding: custom
    775889
    776890FrameFlattening:
    777891  type: uint32_t
    778892  defaultValue: DEFAULT_FRAME_FLATTENING
     893  webcoreBinding: custom
    779894
    780895StandardFontFamily:
     
    821936  type: String
    822937  defaultValue: '""'
    823   webkitOnly: true
     938  webcoreBinding: none
    824939
    825940InactiveMediaCaptureSteamRepromptIntervalInMinutes:
    826     type: double
    827     defaultValue: DEFAULT_INTERACTIVE_MNEDIA_CAPTURE_STREAM_REPROMPT_INTERVAL_IN_MINUTES
     941  type: double
     942  defaultValue: DEFAULT_INTERACTIVE_MNEDIA_CAPTURE_STREAM_REPROMPT_INTERVAL_IN_MINUTES
     943  webcoreBinding: none
    828944
    829945LongRunningMediaCaptureStreamRepromptIntervalInHours:
    830     type: double
    831     defaultValue: 24
     946  type: double
     947  defaultValue: 24
     948  webcoreBinding: none
     949
    832950
    833951# Debug Preferences
    834952
    835 
    836953AcceleratedDrawingEnabled:
    837954  type: bool
     
    853970  defaultValue: false
    854971  category: debug
     972  webcoreName: showDebugBorders
    855973
    856974CompositingRepaintCountersVisible:
     
    858976  defaultValue: false
    859977  category: debug
     978  webcoreName: showRepaintCounter
    860979
    861980TiledScrollingIndicatorVisible:
     
    863982  defaultValue: false
    864983  category: debug
     984  webcoreName: showTiledScrollingIndicator
    865985
    866986SimpleLineLayoutDebugBordersEnabled:
     
    8831003  defaultValue: true
    8841004  category: debug
     1005  webcoreBinding: none
     1006  condition: PLATFORM(IOS)
    8851007
    8861008ForceAlwaysUserScalable:
     
    8881010  defaultValue: false
    8891011  category: debug
     1012  webcoreBinding: none
     1013  condition: PLATFORM(IOS)
    8901014
    8911015ResourceUsageOverlayVisible:
     
    8931017  defaultValue: false
    8941018  category: debug
     1019  condition: ENABLE(RESOURCE_USAGE)
    8951020
    8961021VisibleDebugOverlayRegions:
     
    9221047  humanReadableDescription: "Enable Cache API"
    9231048  category: experimental
     1049  webcoreBinding: RuntimeEnabledFeatures
    9241050
    9251051ConstantPropertiesEnabled:
     
    9361062  humanReadableDescription: "Enable CSS display: contents support"
    9371063  category: experimental
     1064  webcoreBinding: RuntimeEnabledFeatures
    9381065
    9391066SpringTimingFunctionEnabled:
     
    9501077  humanReadableDescription: "Link preload support"
    9511078  category: experimental
     1079  webcoreBinding: RuntimeEnabledFeatures
    9521080
    9531081WebRTCLegacyAPIDisabled:
     
    9571085  humanReadableDescription: "Remove Legacy WebRTC API"
    9581086  category: experimental
     1087  webcoreBinding: custom
     1088  condition: ENABLE(WEB_RTC)
    9591089
    9601090IsSecureContextAttributeEnabled:
     
    9641094  humanReadableDescription: "Enable Secure Contexts API"
    9651095  category: experimental
     1096  webcoreBinding: RuntimeEnabledFeatures
    9661097
    9671098ServiceWorkersEnabled:
     
    9711102  humanReadableDescription: "Enable ServiceWorkers"
    9721103  category: experimental
     1104  webcoreBinding: RuntimeEnabledFeatures
     1105  webcoreName: serviceWorkerEnabled
     1106  condition: ENABLE(SERVICE_WORKER)
    9731107
    9741108StorageAccessAPIEnabled:
     
    9921126  humanReadableDescription: "Web Animations prototype"
    9931127  category: experimental
     1128  webcoreBinding: RuntimeEnabledFeatures
    9941129
    9951130WebGL2Enabled:
     
    9991134  humanReadableDescription: "WebGL 2 prototype"
    10001135  category: experimental
     1136  webcoreBinding: RuntimeEnabledFeatures
     1137  condition: ENABLE(WEBGL2)
    10011138
    10021139WebGPUEnabled:
     
    10061143  humanReadableDescription: "WebGPU prototype"
    10071144  category: experimental
     1145  webcoreBinding: RuntimeEnabledFeatures
     1146  condition: ENABLE(WEBGPU)
  • trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj

    r224041 r224077  
    13541354                7CE4D2271A4916C200C7F152 /* WebProcessPoolMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CE4D2251A4916C200C7F152 /* WebProcessPoolMessageReceiver.cpp */; };
    13551355                7CE4D2281A4916C200C7F152 /* WebProcessPoolMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 7CE4D2261A4916C200C7F152 /* WebProcessPoolMessages.h */; };
     1356                7CE9CE101FA0767A000177DE /* WebPageUpdatePreferences.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CE9CE0F1FA0764D000177DE /* WebPageUpdatePreferences.cpp */; };
    13561357                7CEFA9621AC0999300B910FD /* APIContentRuleListStoreCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7CEFA9601AC0999300B910FD /* APIContentRuleListStoreCocoa.mm */; };
    13571358                7CF47FF617275B71008ACB91 /* WKBundlePageBanner.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CF47FF417275B71008ACB91 /* WKBundlePageBanner.cpp */; };
     
    37403741                7CE4D2251A4916C200C7F152 /* WebProcessPoolMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebProcessPoolMessageReceiver.cpp; sourceTree = "<group>"; };
    37413742                7CE4D2261A4916C200C7F152 /* WebProcessPoolMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebProcessPoolMessages.h; sourceTree = "<group>"; };
     3743                7CE9CE0F1FA0764D000177DE /* WebPageUpdatePreferences.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WebPageUpdatePreferences.cpp; sourceTree = "<group>"; };
    37423744                7CEFA9601AC0999300B910FD /* APIContentRuleListStoreCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = APIContentRuleListStoreCocoa.mm; sourceTree = "<group>"; };
    37433745                7CF47FF417275B71008ACB91 /* WKBundlePageBanner.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKBundlePageBanner.cpp; sourceTree = "<group>"; };
     
    81368138                                BCBD3912125BB1A800D2C29F /* WebPageProxyMessageReceiver.cpp */,
    81378139                                BCBD3913125BB1A800D2C29F /* WebPageProxyMessages.h */,
     8140                                7CE9CE0F1FA0764D000177DE /* WebPageUpdatePreferences.cpp */,
    81388141                                7C4694C71A4B4EA000AD5845 /* WebPasteboardProxyMessageReceiver.cpp */,
    81398142                                7C4694C81A4B4EA100AD5845 /* WebPasteboardProxyMessages.h */,
     
    1066310666                                BC857E8712B71EBB00EDEB2E /* WebPageProxyMac.mm in Sources */,
    1066410667                                BCBD3914125BB1A800D2C29F /* WebPageProxyMessageReceiver.cpp in Sources */,
     10668                                7CE9CE101FA0767A000177DE /* WebPageUpdatePreferences.cpp in Sources */,
    1066510669                                512127C31908239A00DAF35C /* WebPasteboardOverrides.cpp in Sources */,
    1066610670                                7C4694D01A51E36800AD5845 /* WebPasteboardProxy.cpp in Sources */,
  • trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp

    r224043 r224077  
    30353035void WebPage::updatePreferences(const WebPreferencesStore& store)
    30363036{
     3037    updatePreferencesGenerated(store);
     3038
    30373039    Settings& settings = m_page->settings();
     3040
     3041    bool requiresUserGestureForMedia = store.getBoolValueForKey(WebPreferencesKey::requiresUserGestureForMediaPlaybackKey());
     3042    settings.setVideoPlaybackRequiresUserGesture(requiresUserGestureForMedia || store.getBoolValueForKey(WebPreferencesKey::requiresUserGestureForVideoPlaybackKey()));
     3043    settings.setAudioPlaybackRequiresUserGesture(requiresUserGestureForMedia || store.getBoolValueForKey(WebPreferencesKey::requiresUserGestureForAudioPlaybackKey()));
     3044    settings.setLayoutInterval(Seconds(store.getDoubleValueForKey(WebPreferencesKey::layoutIntervalKey())));
     3045    settings.setUserInterfaceDirectionPolicy(static_cast<WebCore::UserInterfaceDirectionPolicy>(store.getUInt32ValueForKey(WebPreferencesKey::userInterfaceDirectionPolicyKey())));
     3046    settings.setSystemLayoutDirection(static_cast<TextDirection>(store.getUInt32ValueForKey(WebPreferencesKey::systemLayoutDirectionKey())));
     3047    settings.setJavaScriptRuntimeFlags(static_cast<RuntimeFlags>(store.getUInt32ValueForKey(WebPreferencesKey::javaScriptRuntimeFlagsKey())));
     3048    settings.setStorageBlockingPolicy(static_cast<SecurityOrigin::StorageBlockingPolicy>(store.getUInt32ValueForKey(WebPreferencesKey::storageBlockingPolicyKey())));
     3049    settings.setFrameFlattening(static_cast<WebCore::FrameFlattening>(store.getUInt32ValueForKey(WebPreferencesKey::frameFlatteningKey())));
     3050    settings.setEditableLinkBehavior(static_cast<WebCore::EditableLinkBehavior>(store.getUInt32ValueForKey(WebPreferencesKey::editableLinkBehaviorKey())));
     3051#if ENABLE(DATA_DETECTION)
     3052    settings.setDataDetectorTypes(static_cast<DataDetectorTypes>(store.getUInt32ValueForKey(WebPreferencesKey::dataDetectorTypesKey())));
     3053#endif
     3054
     3055#if ENABLE(WEB_RTC)
     3056    RuntimeEnabledFeatures::sharedFeatures().setWebRTCLegacyAPIEnabled(!store.getBoolValueForKey(WebPreferencesKey::webRTCLegacyAPIDisabledKey()));
     3057#endif
     3058
     3059    DatabaseManager::singleton().setIsAvailable(store.getBoolValueForKey(WebPreferencesKey::databasesEnabledKey()));
    30383060
    30393061    m_tabToLinks = store.getBoolValueForKey(WebPreferencesKey::tabsToLinksKey());
     
    30433065
    30443066    m_scrollingPerformanceLoggingEnabled = store.getBoolValueForKey(WebPreferencesKey::scrollingPerformanceLoggingEnabledKey());
    3045 
    3046 #if PLATFORM(COCOA)
    3047     m_pdfPluginEnabled = store.getBoolValueForKey(WebPreferencesKey::pdfPluginEnabledKey());
    3048 #endif
    3049 
    3050     // FIXME: This should be generated from macro expansion for all preferences,
    3051     // but we currently don't match the naming of WebCore exactly so we are
    3052     // handrolling the boolean and integer preferences until that is fixed.
    3053 
    3054 #define INITIALIZE_SETTINGS(KeyUpper, KeyLower, TypeName, Type, DefaultValue, HumanReadableName, HumanReadableDescription) settings.set##KeyUpper(store.get##TypeName##ValueForKey(WebPreferencesKey::KeyLower##Key()));
    3055 
    3056     FOR_EACH_WEBKIT_STRING_PREFERENCE(INITIALIZE_SETTINGS)
    3057 
    3058 #undef INITIALIZE_SETTINGS
    3059 
    3060     settings.setScriptEnabled(store.getBoolValueForKey(WebPreferencesKey::javaScriptEnabledKey()));
    3061     settings.setScriptMarkupEnabled(store.getBoolValueForKey(WebPreferencesKey::javaScriptMarkupEnabledKey()));
    3062     settings.setLoadsImagesAutomatically(store.getBoolValueForKey(WebPreferencesKey::loadsImagesAutomaticallyKey()));
    3063     settings.setLoadsSiteIconsIgnoringImageLoadingSetting(store.getBoolValueForKey(WebPreferencesKey::loadsSiteIconsIgnoringImageLoadingPreferenceKey()));
    3064     settings.setPluginsEnabled(store.getBoolValueForKey(WebPreferencesKey::pluginsEnabledKey()));
    3065     settings.setJavaEnabled(store.getBoolValueForKey(WebPreferencesKey::javaEnabledKey()));
    3066     settings.setJavaEnabledForLocalFiles(store.getBoolValueForKey(WebPreferencesKey::javaEnabledForLocalFilesKey()));   
    3067     settings.setOfflineWebApplicationCacheEnabled(store.getBoolValueForKey(WebPreferencesKey::offlineWebApplicationCacheEnabledKey()));
    3068     settings.setLocalStorageEnabled(store.getBoolValueForKey(WebPreferencesKey::localStorageEnabledKey()));
    3069     settings.setXSSAuditorEnabled(store.getBoolValueForKey(WebPreferencesKey::xssAuditorEnabledKey()));
    3070     settings.setFrameFlattening(static_cast<WebCore::FrameFlattening>(store.getUInt32ValueForKey(WebPreferencesKey::frameFlatteningKey())));
    3071     settings.setAsyncFrameScrollingEnabled(store.getBoolValueForKey(WebPreferencesKey::asyncFrameScrollingEnabledKey()));
     3067    settings.setScrollingPerformanceLoggingEnabled(m_scrollingPerformanceLoggingEnabled);
     3068
    30723069    if (store.getBoolValueForKey(WebPreferencesKey::privateBrowsingEnabledKey()) && !usesEphemeralSession())
    30733070        setSessionID(PAL::SessionID::legacyPrivateSessionID());
    30743071    else if (!store.getBoolValueForKey(WebPreferencesKey::privateBrowsingEnabledKey()) && sessionID() == PAL::SessionID::legacyPrivateSessionID())
    30753072        setSessionID(PAL::SessionID::defaultSessionID());
    3076     settings.setDeveloperExtrasEnabled(store.getBoolValueForKey(WebPreferencesKey::developerExtrasEnabledKey()));
    3077     settings.setJavaScriptRuntimeFlags(RuntimeFlags(store.getUInt32ValueForKey(WebPreferencesKey::javaScriptRuntimeFlagsKey())));
    3078     settings.setTextAreasAreResizable(store.getBoolValueForKey(WebPreferencesKey::textAreasAreResizableKey()));
    3079     settings.setNeedsSiteSpecificQuirks(store.getBoolValueForKey(WebPreferencesKey::needsSiteSpecificQuirksKey()));
    3080     settings.setJavaScriptCanOpenWindowsAutomatically(store.getBoolValueForKey(WebPreferencesKey::javaScriptCanOpenWindowsAutomaticallyKey()));
    3081     settings.setForceFTPDirectoryListings(store.getBoolValueForKey(WebPreferencesKey::forceFTPDirectoryListingsKey()));
    3082     settings.setDNSPrefetchingEnabled(store.getBoolValueForKey(WebPreferencesKey::dnsPrefetchingEnabledKey()));
    3083     settings.setDOMTimersThrottlingEnabled(store.getBoolValueForKey(WebPreferencesKey::domTimersThrottlingEnabledKey()));
    3084 #if ENABLE(WEB_ARCHIVE)
    3085     settings.setWebArchiveDebugModeEnabled(store.getBoolValueForKey(WebPreferencesKey::webArchiveDebugModeEnabledKey()));
    3086 #endif
    3087     settings.setLocalFileContentSniffingEnabled(store.getBoolValueForKey(WebPreferencesKey::localFileContentSniffingEnabledKey()));
    3088     settings.setUsesPageCache(store.getBoolValueForKey(WebPreferencesKey::usesPageCacheKey()));
    3089     settings.setPageCacheSupportsPlugins(store.getBoolValueForKey(WebPreferencesKey::pageCacheSupportsPluginsKey()));
    3090     settings.setAuthorAndUserStylesEnabled(store.getBoolValueForKey(WebPreferencesKey::authorAndUserStylesEnabledKey()));
    3091     settings.setPaginateDuringLayoutEnabled(store.getBoolValueForKey(WebPreferencesKey::paginateDuringLayoutEnabledKey()));
    3092     settings.setDOMPasteAllowed(store.getBoolValueForKey(WebPreferencesKey::domPasteAllowedKey()));
    3093     settings.setJavaScriptCanAccessClipboard(store.getBoolValueForKey(WebPreferencesKey::javaScriptCanAccessClipboardKey()));
    3094     settings.setLinkPreconnectEnabled(store.getBoolValueForKey(WebPreferencesKey::linkPreconnectKey()));
    3095     settings.setShouldPrintBackgrounds(store.getBoolValueForKey(WebPreferencesKey::shouldPrintBackgroundsKey()));
    3096     settings.setWebSecurityEnabled(store.getBoolValueForKey(WebPreferencesKey::webSecurityEnabledKey()));
    3097     settings.setAllowUniversalAccessFromFileURLs(store.getBoolValueForKey(WebPreferencesKey::allowUniversalAccessFromFileURLsKey()));
    3098     settings.setAllowFileAccessFromFileURLs(store.getBoolValueForKey(WebPreferencesKey::allowFileAccessFromFileURLsKey()));
    3099     settings.setNeedsStorageAccessFromFileURLsQuirk(store.getBoolValueForKey(WebPreferencesKey::needsStorageAccessFromFileURLsQuirkKey()));
    3100 
    3101     settings.setMinimumFontSize(store.getDoubleValueForKey(WebPreferencesKey::minimumFontSizeKey()));
    3102     settings.setMinimumLogicalFontSize(store.getDoubleValueForKey(WebPreferencesKey::minimumLogicalFontSizeKey()));
    3103     settings.setDefaultFontSize(store.getDoubleValueForKey(WebPreferencesKey::defaultFontSizeKey()));
    3104     settings.setDefaultFixedFontSize(store.getDoubleValueForKey(WebPreferencesKey::defaultFixedFontSizeKey()));
    3105     settings.setLayoutFallbackWidth(store.getUInt32ValueForKey(WebPreferencesKey::layoutFallbackWidthKey()));
    3106     settings.setDeviceWidth(store.getUInt32ValueForKey(WebPreferencesKey::deviceWidthKey()));
    3107     settings.setDeviceHeight(store.getUInt32ValueForKey(WebPreferencesKey::deviceHeightKey()));
    3108     settings.setEditableLinkBehavior(static_cast<WebCore::EditableLinkBehavior>(store.getUInt32ValueForKey(WebPreferencesKey::editableLinkBehaviorKey())));
    3109     settings.setShowsToolTipOverTruncatedText(store.getBoolValueForKey(WebPreferencesKey::showsToolTipOverTruncatedTextKey()));
    3110 
    3111     settings.setAcceleratedCompositingForOverflowScrollEnabled(store.getBoolValueForKey(WebPreferencesKey::acceleratedCompositingForOverflowScrollEnabledKey()));
    3112     settings.setAcceleratedCompositingEnabled(store.getBoolValueForKey(WebPreferencesKey::acceleratedCompositingEnabledKey()));
    3113     settings.setAcceleratedDrawingEnabled(store.getBoolValueForKey(WebPreferencesKey::acceleratedDrawingEnabledKey()));
    3114     settings.setDisplayListDrawingEnabled(store.getBoolValueForKey(WebPreferencesKey::displayListDrawingEnabledKey()));
    3115     settings.setCanvasUsesAcceleratedDrawing(store.getBoolValueForKey(WebPreferencesKey::canvasUsesAcceleratedDrawingKey()));
    3116     settings.setShowDebugBorders(store.getBoolValueForKey(WebPreferencesKey::compositingBordersVisibleKey()));
    3117     settings.setShowRepaintCounter(store.getBoolValueForKey(WebPreferencesKey::compositingRepaintCountersVisibleKey()));
    3118     settings.setShowTiledScrollingIndicator(store.getBoolValueForKey(WebPreferencesKey::tiledScrollingIndicatorVisibleKey()));
    3119     settings.setVisibleDebugOverlayRegions(store.getUInt32ValueForKey(WebPreferencesKey::visibleDebugOverlayRegionsKey()));
    3120     settings.setUseGiantTiles(store.getBoolValueForKey(WebPreferencesKey::useGiantTilesKey()));
    3121     settings.setSubpixelAntialiasedLayerTextEnabled(store.getBoolValueForKey(WebPreferencesKey::subpixelAntialiasedLayerTextEnabledKey()));
    3122 
    3123     settings.setAggressiveTileRetentionEnabled(store.getBoolValueForKey(WebPreferencesKey::aggressiveTileRetentionEnabledKey()));
    3124     settings.setTemporaryTileCohortRetentionEnabled(store.getBoolValueForKey(WebPreferencesKey::temporaryTileCohortRetentionEnabledKey()));
    3125 #if ENABLE(CSS_ANIMATIONS_LEVEL_2)
    3126     RuntimeEnabledFeatures::sharedFeatures().setAnimationTriggersEnabled(store.getBoolValueForKey(WebPreferencesKey::cssAnimationTriggersEnabledKey()));
    3127 #endif
    3128     RuntimeEnabledFeatures::sharedFeatures().setWebAnimationsEnabled(store.getBoolValueForKey(WebPreferencesKey::webAnimationsEnabledKey()));
    3129     settings.setWebGLEnabled(store.getBoolValueForKey(WebPreferencesKey::webGLEnabledKey()));
    3130     settings.setForceSoftwareWebGLRendering(store.getBoolValueForKey(WebPreferencesKey::forceSoftwareWebGLRenderingKey()));
    3131     settings.setAccelerated2dCanvasEnabled(store.getBoolValueForKey(WebPreferencesKey::accelerated2dCanvasEnabledKey()));
    3132     bool requiresUserGestureForMedia = store.getBoolValueForKey(WebPreferencesKey::requiresUserGestureForMediaPlaybackKey());
    3133     settings.setVideoPlaybackRequiresUserGesture(requiresUserGestureForMedia || store.getBoolValueForKey(WebPreferencesKey::requiresUserGestureForVideoPlaybackKey()));
    3134     settings.setAudioPlaybackRequiresUserGesture(requiresUserGestureForMedia || store.getBoolValueForKey(WebPreferencesKey::requiresUserGestureForAudioPlaybackKey()));
    3135     settings.setRequiresUserGestureToLoadVideo(store.getBoolValueForKey(WebPreferencesKey::requiresUserGestureToLoadVideoKey()));
    3136     settings.setMainContentUserGestureOverrideEnabled(store.getBoolValueForKey(WebPreferencesKey::mainContentUserGestureOverrideEnabledKey()));
    3137     settings.setMediaUserGestureInheritsFromDocument(store.getBoolValueForKey(WebPreferencesKey::mediaUserGestureInheritsFromDocumentKey()));
    3138     settings.setAllowsInlineMediaPlayback(store.getBoolValueForKey(WebPreferencesKey::allowsInlineMediaPlaybackKey()));
    3139     settings.setAllowsInlineMediaPlaybackAfterFullscreen(store.getBoolValueForKey(WebPreferencesKey::allowsInlineMediaPlaybackAfterFullscreenKey()));
    3140     settings.setInlineMediaPlaybackRequiresPlaysInlineAttribute(store.getBoolValueForKey(WebPreferencesKey::inlineMediaPlaybackRequiresPlaysInlineAttributeKey()));
    3141     settings.setInvisibleAutoplayNotPermitted(store.getBoolValueForKey(WebPreferencesKey::invisibleAutoplayNotPermittedKey()));
    3142     settings.setMediaDataLoadsAutomatically(store.getBoolValueForKey(WebPreferencesKey::mediaDataLoadsAutomaticallyKey()));
    3143     settings.setAllowsPictureInPictureMediaPlayback(store.getBoolValueForKey(WebPreferencesKey::allowsPictureInPictureMediaPlaybackKey()));
    3144     settings.setMediaControlsScaleWithPageZoom(store.getBoolValueForKey(WebPreferencesKey::mediaControlsScaleWithPageZoomKey()));
    3145     DeprecatedGlobalSettings::setMockScrollbarsEnabled(store.getBoolValueForKey(WebPreferencesKey::mockScrollbarsEnabledKey()));
    3146     settings.setHyperlinkAuditingEnabled(store.getBoolValueForKey(WebPreferencesKey::hyperlinkAuditingEnabledKey()));
    3147     settings.setRequestAnimationFrameEnabled(store.getBoolValueForKey(WebPreferencesKey::requestAnimationFrameEnabledKey()));
    3148 #if ENABLE(SMOOTH_SCROLLING)
    3149     settings.setScrollAnimatorEnabled(store.getBoolValueForKey(WebPreferencesKey::scrollAnimatorEnabledKey()));
    3150 #endif
    3151     settings.setForceUpdateScrollbarsOnMainThreadForPerformanceTesting(store.getBoolValueForKey(WebPreferencesKey::forceUpdateScrollbarsOnMainThreadForPerformanceTestingKey()));
    3152     settings.setInteractiveFormValidationEnabled(store.getBoolValueForKey(WebPreferencesKey::interactiveFormValidationEnabledKey()));
    3153     settings.setSpatialNavigationEnabled(store.getBoolValueForKey(WebPreferencesKey::spatialNavigationEnabledKey()));
    3154 
    3155     settings.setHttpEquivEnabled(store.getBoolValueForKey(WebPreferencesKey::httpEquivEnabledKey()));
    3156 
    3157     settings.setSelectionPaintingWithoutSelectionGapsEnabled(store.getBoolValueForKey(WebPreferencesKey::selectionPaintingWithoutSelectionGapsEnabledKey()));
    3158 
    3159     DatabaseManager::singleton().setIsAvailable(store.getBoolValueForKey(WebPreferencesKey::databasesEnabledKey()));
    3160 
    3161 #if ENABLE(FULLSCREEN_API)
    3162     settings.setFullScreenEnabled(store.getBoolValueForKey(WebPreferencesKey::fullScreenEnabledKey()));
    3163 #endif
    3164 
    3165 #if USE(AVFOUNDATION)
    3166     DeprecatedGlobalSettings::setAVFoundationEnabled(store.getBoolValueForKey(WebPreferencesKey::isAVFoundationEnabledKey()));
    3167     DeprecatedGlobalSettings::setAVFoundationNSURLSessionEnabled(store.getBoolValueForKey(WebPreferencesKey::isAVFoundationNSURLSessionEnabledKey()));
    3168 #endif
    3169 
    3170 #if USE(GSTREAMER)
    3171     DeprecatedGlobalSettings::setGStreamerEnabled(store.getBoolValueForKey(WebPreferencesKey::isGStreamerEnabledKey()));
    3172 #endif
    3173 
    3174 #if PLATFORM(COCOA)
    3175     DeprecatedGlobalSettings::setQTKitEnabled(store.getBoolValueForKey(WebPreferencesKey::isQTKitEnabledKey()));
    3176 #endif
    3177 
    3178 #if PLATFORM(IOS) && HAVE(AVKIT)
    3179     DeprecatedGlobalSettings::setAVKitEnabled(true);
    3180 #endif
    3181 
    3182 #if ENABLE(WEB_AUDIO)
    3183     settings.setWebAudioEnabled(store.getBoolValueForKey(WebPreferencesKey::webAudioEnabledKey()));
    3184 #endif
    3185 
    3186 #if ENABLE(MEDIA_STREAM)
    3187     RuntimeEnabledFeatures::sharedFeatures().setMediaDevicesEnabled(store.getBoolValueForKey(WebPreferencesKey::mediaDevicesEnabledKey()));
    3188     RuntimeEnabledFeatures::sharedFeatures().setMediaStreamEnabled(store.getBoolValueForKey(WebPreferencesKey::mediaStreamEnabledKey()));
    3189 #endif
    3190 
    3191 #if ENABLE(WEB_RTC)
    3192     RuntimeEnabledFeatures::sharedFeatures().setPeerConnectionEnabled(store.getBoolValueForKey(WebPreferencesKey::peerConnectionEnabledKey()));
    3193     RuntimeEnabledFeatures::sharedFeatures().setWebRTCLegacyAPIEnabled(!store.getBoolValueForKey(WebPreferencesKey::webRTCLegacyAPIDisabledKey()));
    3194 #endif
    3195 
    3196 #if ENABLE(SERVICE_CONTROLS)
    3197     settings.setImageControlsEnabled(store.getBoolValueForKey(WebPreferencesKey::imageControlsEnabledKey()));
    3198 #endif
    3199 
    3200 #if ENABLE(SERVICE_WORKER)
    3201     RuntimeEnabledFeatures::sharedFeatures().setServiceWorkerEnabled(store.getBoolValueForKey(WebPreferencesKey::serviceWorkersEnabledKey()));
    3202 #endif
    3203 
    3204 #if ENABLE(WIRELESS_PLAYBACK_TARGET)
    3205     settings.setAllowsAirPlayForMediaPlayback(store.getBoolValueForKey(WebPreferencesKey::allowsAirPlayForMediaPlaybackKey()));
    3206 #endif
    3207 
    3208 #if ENABLE(RESOURCE_USAGE)
    3209     settings.setResourceUsageOverlayVisible(store.getBoolValueForKey(WebPreferencesKey::resourceUsageOverlayVisibleKey()));
    3210 #endif
    3211 
    3212     settings.setSuppressesIncrementalRendering(store.getBoolValueForKey(WebPreferencesKey::suppressesIncrementalRenderingKey()));
    3213     settings.setIncrementalRenderingSuppressionTimeoutInSeconds(store.getDoubleValueForKey(WebPreferencesKey::incrementalRenderingSuppressionTimeoutKey()));
    3214     settings.setBackspaceKeyNavigationEnabled(store.getBoolValueForKey(WebPreferencesKey::backspaceKeyNavigationEnabledKey()));
    3215     settings.setWantsBalancedSetDefersLoadingBehavior(store.getBoolValueForKey(WebPreferencesKey::wantsBalancedSetDefersLoadingBehaviorKey()));
    3216     settings.setCaretBrowsingEnabled(store.getBoolValueForKey(WebPreferencesKey::caretBrowsingEnabledKey()));
    3217 
    3218 #if ENABLE(VIDEO_TRACK)
    3219     settings.setShouldDisplaySubtitles(store.getBoolValueForKey(WebPreferencesKey::shouldDisplaySubtitlesKey()));
    3220     settings.setShouldDisplayCaptions(store.getBoolValueForKey(WebPreferencesKey::shouldDisplayCaptionsKey()));
    3221     settings.setShouldDisplayTextDescriptions(store.getBoolValueForKey(WebPreferencesKey::shouldDisplayTextDescriptionsKey()));
    3222 #endif
    3223 
    3224 #if ENABLE(NOTIFICATIONS)
    3225     settings.setNotificationsEnabled(store.getBoolValueForKey(WebPreferencesKey::notificationsEnabledKey()));
    3226 #endif
    3227 
    3228     settings.setShouldRespectImageOrientation(store.getBoolValueForKey(WebPreferencesKey::shouldRespectImageOrientationKey()));
    3229     settings.setStorageBlockingPolicy(static_cast<SecurityOrigin::StorageBlockingPolicy>(store.getUInt32ValueForKey(WebPreferencesKey::storageBlockingPolicyKey())));
    3230     settings.setCookieEnabled(store.getBoolValueForKey(WebPreferencesKey::cookieEnabledKey()));
    3231 
    3232     settings.setDiagnosticLoggingEnabled(store.getBoolValueForKey(WebPreferencesKey::diagnosticLoggingEnabledKey()));
    3233 
    3234     settings.setScrollingPerformanceLoggingEnabled(m_scrollingPerformanceLoggingEnabled);
    3235 
    3236     settings.setPlugInSnapshottingEnabled(store.getBoolValueForKey(WebPreferencesKey::plugInSnapshottingEnabledKey()));
    3237     settings.setSnapshotAllPlugIns(store.getBoolValueForKey(WebPreferencesKey::snapshotAllPlugInsKey()));
    3238     settings.setAutostartOriginPlugInSnapshottingEnabled(store.getBoolValueForKey(WebPreferencesKey::autostartOriginPlugInSnapshottingEnabledKey()));
    3239     settings.setPrimaryPlugInSnapshotDetectionEnabled(store.getBoolValueForKey(WebPreferencesKey::primaryPlugInSnapshotDetectionEnabledKey()));
    3240     settings.setUsesEncodingDetector(store.getBoolValueForKey(WebPreferencesKey::usesEncodingDetectorKey()));
    3241 
    3242 #if ENABLE(TEXT_AUTOSIZING)
    3243     settings.setTextAutosizingEnabled(store.getBoolValueForKey(WebPreferencesKey::textAutosizingEnabledKey()));
    3244     settings.setMinimumZoomFontSize(store.getDoubleValueForKey(WebPreferencesKey::minimumZoomFontSizeKey()));
    3245 #endif
    3246 
    3247     settings.setLogsPageMessagesToSystemConsoleEnabled(store.getBoolValueForKey(WebPreferencesKey::logsPageMessagesToSystemConsoleEnabledKey()));
    3248     settings.setAsynchronousSpellCheckingEnabled(store.getBoolValueForKey(WebPreferencesKey::asynchronousSpellCheckingEnabledKey()));
    3249 
    3250     settings.setSmartInsertDeleteEnabled(store.getBoolValueForKey(WebPreferencesKey::smartInsertDeleteEnabledKey()));
    3251     settings.setSelectTrailingWhitespaceEnabled(store.getBoolValueForKey(WebPreferencesKey::selectTrailingWhitespaceEnabledKey()));
    3252     settings.setShowsURLsInToolTips(store.getBoolValueForKey(WebPreferencesKey::showsURLsInToolTipsEnabledKey()));
    3253 
    3254     settings.setHiddenPageDOMTimerThrottlingEnabled(store.getBoolValueForKey(WebPreferencesKey::hiddenPageDOMTimerThrottlingEnabledKey()));
    3255     settings.setHiddenPageDOMTimerThrottlingAutoIncreases(store.getBoolValueForKey(WebPreferencesKey::hiddenPageDOMTimerThrottlingAutoIncreasesKey()));
    3256 
    3257     settings.setHiddenPageCSSAnimationSuspensionEnabled(store.getBoolValueForKey(WebPreferencesKey::hiddenPageCSSAnimationSuspensionEnabledKey()));
    3258     DeprecatedGlobalSettings::setLowPowerVideoAudioBufferSizeEnabled(store.getBoolValueForKey(WebPreferencesKey::lowPowerVideoAudioBufferSizeEnabledKey()));
    3259     settings.setSimpleLineLayoutEnabled(store.getBoolValueForKey(WebPreferencesKey::simpleLineLayoutEnabledKey()));
    3260     settings.setSimpleLineLayoutDebugBordersEnabled(store.getBoolValueForKey(WebPreferencesKey::simpleLineLayoutDebugBordersEnabledKey()));
    3261    
    3262     settings.setDeferredCSSParserEnabled(store.getBoolValueForKey(WebPreferencesKey::deferredCSSParserEnabledKey()));
    3263 
    3264     settings.setSubpixelCSSOMElementMetricsEnabled(store.getBoolValueForKey(WebPreferencesKey::subpixelCSSOMElementMetricsEnabledKey()));
    3265 
    3266     settings.setUseLegacyTextAlignPositionedElementBehavior(store.getBoolValueForKey(WebPreferencesKey::useLegacyTextAlignPositionedElementBehaviorKey()));
    3267 
    3268 #if ENABLE(MEDIA_SOURCE)
    3269     settings.setMediaSourceEnabled(store.getBoolValueForKey(WebPreferencesKey::mediaSourceEnabledKey()));
    3270 #endif
    3271 
    3272 #if ENABLE(MEDIA_STREAM)
    3273     DeprecatedGlobalSettings::setMockCaptureDevicesEnabled(store.getBoolValueForKey(WebPreferencesKey::mockCaptureDevicesEnabledKey()));
    3274     DeprecatedGlobalSettings::setMediaCaptureRequiresSecureConnection(store.getBoolValueForKey(WebPreferencesKey::mediaCaptureRequiresSecureConnectionKey()));
    3275 #endif
    3276 
    3277     settings.setShouldConvertPositionStyleOnCopy(store.getBoolValueForKey(WebPreferencesKey::shouldConvertPositionStyleOnCopyKey()));
    3278 
    3279     settings.setStandalone(store.getBoolValueForKey(WebPreferencesKey::standaloneKey()));
    3280     settings.setTelephoneNumberParsingEnabled(store.getBoolValueForKey(WebPreferencesKey::telephoneNumberParsingEnabledKey()));
    3281     settings.setAllowMultiElementImplicitSubmission(store.getBoolValueForKey(WebPreferencesKey::allowMultiElementImplicitSubmissionKey()));
    3282     settings.setAlwaysUseAcceleratedOverflowScroll(store.getBoolValueForKey(WebPreferencesKey::alwaysUseAcceleratedOverflowScrollKey()));
    3283 
    3284     settings.setPasswordEchoEnabled(store.getBoolValueForKey(WebPreferencesKey::passwordEchoEnabledKey()));
    3285     settings.setPasswordEchoDurationInSeconds(store.getDoubleValueForKey(WebPreferencesKey::passwordEchoDurationKey()));
    3286    
    3287     settings.setLayoutInterval(Seconds(store.getDoubleValueForKey(WebPreferencesKey::layoutIntervalKey())));
    3288     settings.setMaxParseDuration(store.getDoubleValueForKey(WebPreferencesKey::maxParseDurationKey()));
    3289 
    3290     settings.setEnableInheritURIQueryComponent(store.getBoolValueForKey(WebPreferencesKey::enableInheritURIQueryComponentKey()));
    3291 
    3292     auto userInterfaceDirectionPolicyCandidate = static_cast<WebCore::UserInterfaceDirectionPolicy>(store.getUInt32ValueForKey(WebPreferencesKey::userInterfaceDirectionPolicyKey()));
    3293     if (userInterfaceDirectionPolicyCandidate == WebCore::UserInterfaceDirectionPolicy::Content || userInterfaceDirectionPolicyCandidate == WebCore::UserInterfaceDirectionPolicy::System)
    3294         settings.setUserInterfaceDirectionPolicy(userInterfaceDirectionPolicyCandidate);
    3295     TextDirection systemLayoutDirectionCandidate = static_cast<TextDirection>(store.getUInt32ValueForKey(WebPreferencesKey::systemLayoutDirectionKey()));
    3296     if (systemLayoutDirectionCandidate == WebCore::LTR || systemLayoutDirectionCandidate == WebCore::RTL)
    3297         settings.setSystemLayoutDirection(systemLayoutDirectionCandidate);
    3298 
    3299 #if ENABLE(APPLE_PAY)
    3300     settings.setApplePayEnabled(store.getBoolValueForKey(WebPreferencesKey::applePayEnabledKey()));
    3301     settings.setApplePayCapabilityDisclosureAllowed(store.getBoolValueForKey(WebPreferencesKey::applePayCapabilityDisclosureAllowedKey()));
    3302 #endif
    3303 
    3304 #if PLATFORM(IOS)
    3305     settings.setUseImageDocumentForSubframePDF(true);
    3306 #endif
    3307 
    3308 #if ENABLE(DATA_DETECTION)
    3309     settings.setDataDetectorTypes(static_cast<DataDetectorTypes>(store.getUInt32ValueForKey(WebPreferencesKey::dataDetectorTypesKey())));
    3310 #endif
    3311 #if ENABLE(GAMEPAD)
    3312     RuntimeEnabledFeatures::sharedFeatures().setGamepadsEnabled(store.getBoolValueForKey(WebPreferencesKey::gamepadsEnabledKey()));
    3313 #endif
    3314 
    3315 #if ENABLE(SERVICE_CONTROLS)
    3316     settings.setServiceControlsEnabled(store.getBoolValueForKey(WebPreferencesKey::serviceControlsEnabledKey()));
    3317 #endif
    3318 
    3319     RuntimeEnabledFeatures::sharedFeatures().setCacheAPIEnabled(store.getBoolValueForKey(WebPreferencesKey::cacheAPIEnabledKey()));
    3320     RuntimeEnabledFeatures::sharedFeatures().setFetchAPIEnabled(store.getBoolValueForKey(WebPreferencesKey::fetchAPIEnabledKey()));
    3321 
    3322 #if ENABLE(DOWNLOAD_ATTRIBUTE)
    3323     RuntimeEnabledFeatures::sharedFeatures().setDownloadAttributeEnabled(store.getBoolValueForKey(WebPreferencesKey::downloadAttributeEnabledKey()));
    3324 #endif
    3325 
    3326     RuntimeEnabledFeatures::sharedFeatures().setShadowDOMEnabled(store.getBoolValueForKey(WebPreferencesKey::shadowDOMEnabledKey()));
    3327 
    3328     RuntimeEnabledFeatures::sharedFeatures().setInteractiveFormValidationEnabled(store.getBoolValueForKey(WebPreferencesKey::interactiveFormValidationEnabledKey()));
    3329 
    3330     // Experimental Features.
    3331 
    3332     RuntimeEnabledFeatures::sharedFeatures().setCSSGridLayoutEnabled(store.getBoolValueForKey(WebPreferencesKey::cssGridLayoutEnabledKey()));
    3333    
    3334     RuntimeEnabledFeatures::sharedFeatures().setCustomElementsEnabled(store.getBoolValueForKey(WebPreferencesKey::customElementsEnabledKey()));
    3335 
    3336     RuntimeEnabledFeatures::sharedFeatures().setDataTransferItemsEnabled(store.getBoolValueForKey(WebPreferencesKey::dataTransferItemsEnabledKey()));
    3337 
    3338     DeprecatedGlobalSettings::setCustomPasteboardDataEnabled(store.getBoolValueForKey(WebPreferencesKey::customPasteboardDataEnabledKey()));
    3339 
    3340 #if ENABLE(ATTACHMENT_ELEMENT)
    3341     RuntimeEnabledFeatures::sharedFeatures().setAttachmentElementEnabled(store.getBoolValueForKey(WebPreferencesKey::attachmentElementEnabledKey()));
    3342 #endif
    3343 
    3344 #if ENABLE(WEBGL2)
    3345     RuntimeEnabledFeatures::sharedFeatures().setWebGL2Enabled(store.getBoolValueForKey(WebPreferencesKey::webGL2EnabledKey()));
    3346 #endif
    3347 
    3348 #if ENABLE(WEBGPU)
    3349     RuntimeEnabledFeatures::sharedFeatures().setWebGPUEnabled(store.getBoolValueForKey(WebPreferencesKey::webGPUEnabledKey()));
    3350 #endif
    3351 
    3352     settings.setSpringTimingFunctionEnabled(store.getBoolValueForKey(WebPreferencesKey::springTimingFunctionEnabledKey()));
    3353 
    3354     settings.setConstantPropertiesEnabled(store.getBoolValueForKey(WebPreferencesKey::constantPropertiesEnabledKey()));
    3355 
    3356     settings.setViewportFitEnabled(store.getBoolValueForKey(WebPreferencesKey::viewportFitEnabledKey()));
    3357 
    3358     settings.setVisualViewportEnabled(store.getBoolValueForKey(WebPreferencesKey::visualViewportEnabledKey()));
    3359 
    3360     settings.setInputEventsEnabled(store.getBoolValueForKey(WebPreferencesKey::inputEventsEnabledKey()));
    3361     RuntimeEnabledFeatures::sharedFeatures().setInputEventsEnabled(store.getBoolValueForKey(WebPreferencesKey::inputEventsEnabledKey()));
    3362 
    3363     RuntimeEnabledFeatures::sharedFeatures().setModernMediaControlsEnabled(store.getBoolValueForKey(WebPreferencesKey::modernMediaControlsEnabledKey()));
    3364 
    3365 #if ENABLE(ENCRYPTED_MEDIA)
    3366     RuntimeEnabledFeatures::sharedFeatures().setEncryptedMediaAPIEnabled(store.getBoolValueForKey(WebPreferencesKey::encryptedMediaAPIEnabledKey()));
    3367 #endif
    3368 
    3369 #if ENABLE(INTERSECTION_OBSERVER)
    3370     RuntimeEnabledFeatures::sharedFeatures().setIntersectionObserverEnabled(store.getBoolValueForKey(WebPreferencesKey::intersectionObserverEnabledKey()));
    3371 #endif
    3372 
    3373     RuntimeEnabledFeatures::sharedFeatures().setDisplayContentsEnabled(store.getBoolValueForKey(WebPreferencesKey::displayContentsEnabledKey()));
    3374     RuntimeEnabledFeatures::sharedFeatures().setUserTimingEnabled(store.getBoolValueForKey(WebPreferencesKey::userTimingEnabledKey()));
    3375     RuntimeEnabledFeatures::sharedFeatures().setResourceTimingEnabled(store.getBoolValueForKey(WebPreferencesKey::resourceTimingEnabledKey()));
    3376     RuntimeEnabledFeatures::sharedFeatures().setLinkPreloadEnabled(store.getBoolValueForKey(WebPreferencesKey::linkPreloadEnabledKey()));
    3377     RuntimeEnabledFeatures::sharedFeatures().setMediaPreloadingEnabled(store.getBoolValueForKey(WebPreferencesKey::mediaPreloadingEnabledKey()));
    3378     RuntimeEnabledFeatures::sharedFeatures().setCredentialManagementEnabled(store.getBoolValueForKey(WebPreferencesKey::credentialManagementEnabledKey()));
    3379     RuntimeEnabledFeatures::sharedFeatures().setIsSecureContextAttributeEnabled(store.getBoolValueForKey(WebPreferencesKey::isSecureContextAttributeEnabledKey()));
    3380     RuntimeEnabledFeatures::sharedFeatures().setDirectoryUploadEnabled(store.getBoolValueForKey(WebPreferencesKey::directoryUploadEnabledKey()));
    3381     RuntimeEnabledFeatures::sharedFeatures().setWebVREnabled(store.getBoolValueForKey(WebPreferencesKey::webVREnabledKey()));
    33823073
    33833074    bool processSuppressionEnabled = store.getBoolValueForKey(WebPreferencesKey::pageVisibilityBasedProcessSuppressionEnabledKey());
     
    33873078    }
    33883079
    3389     settings.setSubresourceIntegrityEnabled(store.getBoolValueForKey(WebPreferencesKey::subresourceIntegrityEnabledKey()));
    3390 
    3391 #if ENABLE(BEACON_API)
    3392     settings.setBeaconAPIEnabled(store.getBoolValueForKey(WebPreferencesKey::beaconAPIEnabledKey()));
    3393 #endif
    3394 
     3080#if PLATFORM(COCOA)
     3081    m_pdfPluginEnabled = store.getBoolValueForKey(WebPreferencesKey::pdfPluginEnabledKey());
     3082#endif
    33953083#if ENABLE(PAYMENT_REQUEST)
    33963084    settings.setPaymentRequestEnabled(store.getBoolValueForKey(WebPreferencesKey::applePayEnabledKey()));
    33973085#endif
    33983086
    3399     settings.setStorageAccessAPIEnabled(store.getBoolValueForKey(WebPreferencesKey::storageAccessAPIEnabledKey()));
    3400    
    3401     platformPreferencesDidChange(store);
    3402 
    3403     if (m_drawingArea)
    3404         m_drawingArea->updatePreferences(store);
     3087    // FIXME: This is both a RuntimeEnabledFeatures (generated) and a setting. It should pick one.
     3088    settings.setInteractiveFormValidationEnabled(store.getBoolValueForKey(WebPreferencesKey::interactiveFormValidationEnabledKey()));
    34053089
    34063090#if PLATFORM(IOS)
     
    34083092    m_viewportConfiguration.setCanIgnoreScalingConstraints(m_ignoreViewportScalingConstraints);
    34093093    setForceAlwaysUserScalable(m_forceAlwaysUserScalable || store.getBoolValueForKey(WebPreferencesKey::forceAlwaysUserScalableKey()));
    3410 #endif
    3411     settings.setLargeImageAsyncDecodingEnabled(store.getBoolValueForKey(WebPreferencesKey::largeImageAsyncDecodingEnabledKey()));
    3412     settings.setAnimatedImageAsyncDecodingEnabled(store.getBoolValueForKey(WebPreferencesKey::animatedImageAsyncDecodingEnabledKey()));
    3413     settings.setShouldSuppressTextInputFromEditingDuringProvisionalNavigation(store.getBoolValueForKey(WebPreferencesKey::shouldSuppressTextInputFromEditingDuringProvisionalNavigationKey()));
    3414     settings.setMediaContentTypesRequiringHardwareSupport(store.getStringValueForKey(WebPreferencesKey::mediaContentTypesRequiringHardwareSupportKey()));
    3415     settings.setAllowMediaContentTypesRequiringHardwareSupportAsFallback(store.getBoolValueForKey(WebPreferencesKey::allowMediaContentTypesRequiringHardwareSupportAsFallbackKey()));
    3416 
    3417 #if ENABLE(LEGACY_ENCRYPTED_MEDIA)
    3418     RuntimeEnabledFeatures::sharedFeatures().setLegacyEncryptedMediaAPIEnabled(store.getBoolValueForKey(WebPreferencesKey::legacyEncryptedMediaAPIEnabledKey()));
    3419 #endif
    3420 
    3421     RuntimeEnabledFeatures::sharedFeatures().setInspectorAdditionsEnabled(store.getBoolValueForKey(WebPreferencesKey::inspectorAdditionsEnabledKey()));
     3094
     3095    settings.setUseImageDocumentForSubframePDF(true);
     3096    DeprecatedGlobalSettings::setAVKitEnabled(true);
     3097#endif
     3098
     3099    if (m_drawingArea)
     3100        m_drawingArea->updatePreferences(store);
    34223101}
    34233102
  • trunk/Source/WebKit/WebProcess/WebPage/WebPage.h

    r224068 r224077  
    11331133
    11341134    void preferencesDidChange(const WebPreferencesStore&);
    1135     void platformPreferencesDidChange(const WebPreferencesStore&);
    11361135    void updatePreferences(const WebPreferencesStore&);
     1136    void updatePreferencesGenerated(const WebPreferencesStore&);
    11371137
    11381138    void didReceivePolicyDecision(uint64_t frameID, uint64_t listenerID, WebCore::PolicyAction, uint64_t navigationID, const DownloadID&, WebsitePolicies&&);
  • trunk/Source/WebKit/WebProcess/WebPage/gtk/WebPageGtk.cpp

    r221349 r224077  
    119119#endif
    120120
    121 void WebPage::platformPreferencesDidChange(const WebPreferencesStore&)
    122 {
    123     notImplemented();
    124 }
    125 
    126121bool WebPage::performDefaultBehaviorForKeyEvent(const WebKeyboardEvent& keyboardEvent)
    127122{
  • trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm

    r224068 r224077  
    148148    send(Messages::WebPageProxy::RegisterWebProcessAccessibilityToken(dataToken));
    149149}
    150    
    151 void WebPage::platformPreferencesDidChange(const WebPreferencesStore&)
    152 {
    153     notImplemented();
    154 }
    155150
    156151static void computeEditableRootHasContentAndPlainText(const VisibleSelection& selection, EditorState::PostLayoutData& data)
  • trunk/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm

    r223644 r224077  
    183183}
    184184
    185 void WebPage::platformPreferencesDidChange(const WebPreferencesStore& store)
    186 {
    187 }
    188 
    189185bool WebPage::shouldUsePDFPlugin() const
    190186{
  • trunk/Source/WebKit/WebProcess/WebPage/win/WebPageWin.cpp

    r223262 r224077  
    6464}
    6565
    66 void WebPage::platformPreferencesDidChange(const WebPreferencesStore&)
    67 {
    68     notImplemented();
    69 }
    70 
    7166bool WebPage::performDefaultBehaviorForKeyEvent(const WebKeyboardEvent& keyboardEvent)
    7267{
  • trunk/Source/WebKit/WebProcess/WebPage/wpe/WebPageWPE.cpp

    r216497 r224077  
    5050}
    5151
    52 void WebPage::platformPreferencesDidChange(const WebPreferencesStore& store)
    53 {
    54     notImplemented();
    55 }
    56 
    5752bool WebPage::performDefaultBehaviorForKeyEvent(const WebKeyboardEvent&)
    5853{
Note: See TracChangeset for help on using the changeset viewer.