Title: [291213] trunk/Source/WTF
- Revision
- 291213
- Author
- timothy_hor...@apple.com
- Date
- 2022-03-12 19:01:07 -0800 (Sat, 12 Mar 2022)
Log Message
Fail the build if Internal or Experimental web preferences are missing human readable names
https://bugs.webkit.org/show_bug.cgi?id=237813
Reviewed by Alex Christensen.
* Scripts/GeneratePreferences.rb:
Ensure that all preferences that expose human readable strings to the
API client actually have such a name.
* Scripts/Preferences/WebPreferencesInternal.yaml:
Add one missing human readable preference name.
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (291212 => 291213)
--- trunk/Source/WTF/ChangeLog 2022-03-12 23:29:04 UTC (rev 291212)
+++ trunk/Source/WTF/ChangeLog 2022-03-13 03:01:07 UTC (rev 291213)
@@ -1,5 +1,19 @@
2022-03-12 Tim Horton <timothy_hor...@apple.com>
+ Fail the build if Internal or Experimental web preferences are missing human readable names
+ https://bugs.webkit.org/show_bug.cgi?id=237813
+
+ Reviewed by Alex Christensen.
+
+ * Scripts/GeneratePreferences.rb:
+ Ensure that all preferences that expose human readable strings to the
+ API client actually have such a name.
+
+ * Scripts/Preferences/WebPreferencesInternal.yaml:
+ Add one missing human readable preference name.
+
+2022-03-12 Tim Horton <timothy_hor...@apple.com>
+
Adopt FALLBACK_PLATFORM_NAME in place of FALLBACK_PLATFORM
https://bugs.webkit.org/show_bug.cgi?id=237809
Modified: trunk/Source/WTF/Scripts/GeneratePreferences.rb (291212 => 291213)
--- trunk/Source/WTF/Scripts/GeneratePreferences.rb 2022-03-12 23:29:04 UTC (rev 291212)
+++ trunk/Source/WTF/Scripts/GeneratePreferences.rb 2022-03-13 03:01:07 UTC (rev 291213)
@@ -187,10 +187,10 @@
@frontend = frontend
@preferences = []
- @preferencesNotDebug = initializeParsedPreferences(parsedBasePreferences)
- @preferencesDebug = initializeParsedPreferences(parsedDebugPreferences)
- @experimentalFeatures = initializeParsedPreferences(parsedExperimentalPreferences)
- @internalFeatures = initializeParsedPreferences(parsedInternalPreferences)
+ @preferencesNotDebug = initializeParsedPreferences(parsedBasePreferences, false)
+ @preferencesDebug = initializeParsedPreferences(parsedDebugPreferences, false)
+ @experimentalFeatures = initializeParsedPreferences(parsedExperimentalPreferences, true)
+ @internalFeatures = initializeParsedPreferences(parsedInternalPreferences, true)
@preferences.sort! { |x, y| x.name <=> y.name }
@preferencesNotDebug.sort! { |x, y| x.name <=> y.name }
@@ -211,7 +211,7 @@
@warning = "THIS FILE WAS AUTOMATICALLY GENERATED, DO NOT EDIT."
end
- def initializeParsedPreferences(parsedPreferences)
+ def initializeParsedPreferences(parsedPreferences, requireHumanReadableName)
result = []
if parsedPreferences
parsedPreferences.each do |name, options|
@@ -218,6 +218,9 @@
if !options["webcoreBinding"] && options["defaultValue"].size != 3
raise "ERROR: Preferences bound to WebCore::Settings must have default values for all frontends: #{name}"
end
+ if requireHumanReadableName && !options["humanReadableName"]
+ raise "ERROR: Preference #{name} has no humanReadableName, which is required."
+ end
if options["defaultValue"].include?(@frontend)
preference = Preference.new(name, options, @frontend)
@preferences << preference
Modified: trunk/Source/WTF/Scripts/Preferences/WebPreferencesInternal.yaml (291212 => 291213)
--- trunk/Source/WTF/Scripts/Preferences/WebPreferencesInternal.yaml 2022-03-12 23:29:04 UTC (rev 291212)
+++ trunk/Source/WTF/Scripts/Preferences/WebPreferencesInternal.yaml 2022-03-13 03:01:07 UTC (rev 291213)
@@ -642,6 +642,8 @@
MuteCameraOnMicrophoneInterruptionEnabled:
type: bool
+ humanReadableName: "Mute Camera on Microphone Interruption"
+ humanReadableDescription: "Mute Camera on Microphone Interruption"
condition: ENABLE(MEDIA_STREAM)
defaultValue:
WebKitLegacy:
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes