[Preferences] Adopt shared preferences configuration and script in WebKit
authorweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 Sep 2020 01:29:42 +0000 (01:29 +0000)
committerweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 Sep 2020 01:29:42 +0000 (01:29 +0000)
commit728cfa69ab7c6ec8095c91d493a7fb7ee86e7312
treee35665e6f197bf15b8cbc6bd3dbe6c898e81a597
parent0c08e667646385ef784d706a615f1fa0b37439a7
[Preferences] Adopt shared preferences configuration and script in WebKit
https://bugs.webkit.org/show_bug.cgi?id=217075

Reviewed by Darin Adler.

Source/WebKit:

* Shared/WebPreferences.yaml: Removed.
* Shared/WebPreferencesDebug.yaml: Removed.
* Shared/WebPreferencesExperimental.yaml: Removed.
* Shared/WebPreferencesInternal.yaml: Removed.
* Scripts/GeneratePreferences.rb: Removed.
* WebKit.xcodeproj/project.pbxproj:
Remove yaml preferences and preference generator in favor of shared one
in WTF.

* CMakeLists.txt:
* DerivedSources.make:
Update preference generation to use the shared script and preference files.

* Configurations/BaseTarget.xcconfig:
Add new variable, WTF_BUILD_SCRIPTS_DIR, that points to directory where the
shared generator and preference files live for use as input to the generation.

* DerivedSources-input.xcfilelist:
Update for new location of script and preference files.

* Scripts/PreferencesTemplates/WebPreferencesDefinitions.h.erb:
* Scripts/PreferencesTemplates/WebPreferencesExperimentalFeatures.cpp.erb:
* Scripts/PreferencesTemplates/WebPreferencesInternalDebugFeatures.cpp.erb:
* Scripts/PreferencesTemplates/WebPreferencesStoreDefaultsMap.cpp.erb:
Port support for multiple conditionally-defined defaultValues from WebKitLegacy,
keeping the same DEFAULT_VALUE_FOR_* macro naming and using the macro definitions
in place of existing <%= @pref.defaultValue %> idiom. Also updates for rename
from @internalDebugFeatures to @internalFeatures.

* Shared/WebPreferencesDefaultValues.cpp:
* Shared/WebPreferencesDefaultValues.h:
Remove defaults that are now fully specified in the preference files.

* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration init]):
Replace removed DEFAULT_APPLE_PAY_ENABLED, with the now generated DEFAULT_VALUE_FOR_ApplePayEnabled.

Source/WebKitLegacy/mac:

* Scripts/generate-preferences.sh:
Update to account for new interface requiring the full path to each template.

Source/WTF:

* Scripts/GeneratePreferences.rb:
Simplify input by passing the templates as complete paths, rather than by name + template directory.

* Scripts/Preferences/WebPreferences.yaml:
* Scripts/Preferences/WebPreferencesDebug.yaml:
* Scripts/Preferences/WebPreferencesExperimental.yaml:
* Scripts/Preferences/WebPreferencesInternal.yaml:
Fix some mistakes / things left out to make WebKit defaults and names match current WebKit names and defaults.

* wtf/CMakeLists.txt:
Copy all the preferences and scripts into WTF_SCRIPTS_DIR so it can be accessed by WebKit.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267775 268f45cc-cd09-0410-ab3c-d52691b4dbfc
27 files changed:
Source/WTF/ChangeLog
Source/WTF/Scripts/GeneratePreferences.rb
Source/WTF/Scripts/Preferences/WebPreferences.yaml
Source/WTF/Scripts/Preferences/WebPreferencesDebug.yaml
Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml
Source/WTF/Scripts/Preferences/WebPreferencesInternal.yaml
Source/WTF/wtf/CMakeLists.txt
Source/WebKit/CMakeLists.txt
Source/WebKit/ChangeLog
Source/WebKit/Configurations/BaseTarget.xcconfig
Source/WebKit/DerivedSources-input.xcfilelist
Source/WebKit/DerivedSources.make
Source/WebKit/Scripts/GeneratePreferences.rb [deleted file]
Source/WebKit/Scripts/PreferencesTemplates/WebPreferencesDefinitions.h.erb
Source/WebKit/Scripts/PreferencesTemplates/WebPreferencesExperimentalFeatures.cpp.erb
Source/WebKit/Scripts/PreferencesTemplates/WebPreferencesInternalDebugFeatures.cpp.erb
Source/WebKit/Scripts/PreferencesTemplates/WebPreferencesStoreDefaultsMap.cpp.erb
Source/WebKit/Shared/WebPreferences.yaml [deleted file]
Source/WebKit/Shared/WebPreferencesDebug.yaml [deleted file]
Source/WebKit/Shared/WebPreferencesDefaultValues.cpp
Source/WebKit/Shared/WebPreferencesDefaultValues.h
Source/WebKit/Shared/WebPreferencesExperimental.yaml [deleted file]
Source/WebKit/Shared/WebPreferencesInternal.yaml [deleted file]
Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfiguration.mm
Source/WebKit/WebKit.xcodeproj/project.pbxproj
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/Scripts/generate-preferences.sh