Tweak WebPreferences*.yaml "exposed" key to only indicate that the key should not...
authorweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Oct 2020 09:27:37 +0000 (09:27 +0000)
committerweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Oct 2020 09:27:37 +0000 (09:27 +0000)
commit926582e40b2cf549a570308943ceb0d409af0b65
tree3bdbbdab1d4db35f4865abe2590d66f897312f0c
parentaf716cd8a94238708bf1df582a11bc96d42a37ad
Tweak WebPreferences*.yaml "exposed" key to only indicate that the key should not be changeable by the frontend
https://bugs.webkit.org/show_bug.cgi?id=217918

Reviewed by Darin Adler.

Source/WebKit:

Update to use new "exposed" prefix bindings and use default value explicitly
when updating settings for non-exposed preferences.

* Scripts/PreferencesTemplates/WebPageUpdatePreferences.cpp.erb:
* Scripts/PreferencesTemplates/WebPreferencesDefinitions.h.erb:
* Scripts/PreferencesTemplates/WebPreferencesExperimentalFeatures.cpp.erb:
* Scripts/PreferencesTemplates/WebPreferencesGetterSetters.cpp.erb:
* Scripts/PreferencesTemplates/WebPreferencesInternalDebugFeatures.cpp.erb:
* Scripts/PreferencesTemplates/WebPreferencesKeys.cpp.erb:
* Scripts/PreferencesTemplates/WebPreferencesKeys.h.erb:
* Scripts/PreferencesTemplates/WebPreferencesStoreDefaultsMap.cpp.erb:

Source/WebKitLegacy/mac:

Update to use new "exposed" prefix bindings and use default value explicitly
when updating settings for non-exposed preferences.

* Scripts/PreferencesTemplates/WebPreferencesDefinitions.h.erb:
* Scripts/PreferencesTemplates/WebPreferencesExperimentalFeatures.mm.erb:
* Scripts/PreferencesTemplates/WebPreferencesInternalFeatures.mm.erb:
* Scripts/PreferencesTemplates/WebViewPreferencesChangedGenerated.mm.erb:

Source/WTF:

* Scripts/GeneratePreferences.rb:
Tweak how the "exposed" key is interpreted to extend to keys with default values
for the current frontend (that should continue to be set on Settings for instance)
but that should not respect the key being passed in. For instance, the key
"AsyncFrameScrollingEnabled" has default values for all front ends, since we need
to set it to false in Settings when building WebKitLegacy, but is only exposed to
WebKit, so it won't be in WebKitLegacy's -[WebPreferences internalFeatures] array
and won't do anything if passed to -[WebPreferences _setBoolPreferenceForTestingWithValue:forKey:].

* Scripts/Preferences/WebPreferences.yaml:
Replace now incorrect uses of exposed with temporary key "webKitLegacyBinding" to indicate
that these keys should be valid, but currently use a custom binding in WebKitLegacy.

* Scripts/Preferences/WebPreferencesInternal.yaml:
Only expose AsyncFrameScrollingEnabled and AsyncOverflowScrollingEnabled to WebKit.
This maintains the behavior that these keys are not valid keys as test header commands
when run through DumpRenderTree.

Tools:

Update to use new "exposed" prefix bindings and use default value explicitly
when updating settings for non-exposed preferences.

* DumpRenderTree/Scripts/PreferencesTemplates/TestOptionsGeneratedKeys.h.erb:
* WebKitTestRunner/Scripts/PreferencesTemplates/TestOptionsGeneratedKeys.h.erb:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268719 268f45cc-cd09-0410-ab3c-d52691b4dbfc
21 files changed:
Source/WTF/ChangeLog
Source/WTF/Scripts/GeneratePreferences.rb
Source/WTF/Scripts/Preferences/WebPreferences.yaml
Source/WTF/Scripts/Preferences/WebPreferencesInternal.yaml
Source/WebKit/ChangeLog
Source/WebKit/Scripts/PreferencesTemplates/WebPageUpdatePreferences.cpp.erb
Source/WebKit/Scripts/PreferencesTemplates/WebPreferencesDefinitions.h.erb
Source/WebKit/Scripts/PreferencesTemplates/WebPreferencesExperimentalFeatures.cpp.erb
Source/WebKit/Scripts/PreferencesTemplates/WebPreferencesGetterSetters.cpp.erb
Source/WebKit/Scripts/PreferencesTemplates/WebPreferencesInternalDebugFeatures.cpp.erb
Source/WebKit/Scripts/PreferencesTemplates/WebPreferencesKeys.cpp.erb
Source/WebKit/Scripts/PreferencesTemplates/WebPreferencesKeys.h.erb
Source/WebKit/Scripts/PreferencesTemplates/WebPreferencesStoreDefaultsMap.cpp.erb
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/Scripts/PreferencesTemplates/WebPreferencesDefinitions.h.erb
Source/WebKitLegacy/mac/Scripts/PreferencesTemplates/WebPreferencesExperimentalFeatures.mm.erb
Source/WebKitLegacy/mac/Scripts/PreferencesTemplates/WebPreferencesInternalFeatures.mm.erb
Source/WebKitLegacy/mac/Scripts/PreferencesTemplates/WebViewPreferencesChangedGenerated.mm.erb
Tools/ChangeLog
Tools/DumpRenderTree/Scripts/PreferencesTemplates/TestOptionsGeneratedKeys.h.erb
Tools/WebKitTestRunner/Scripts/PreferencesTemplates/TestOptionsGeneratedKeys.h.erb