Title: [224196] trunk/Source/WebKit
- Revision
- 224196
- Author
- commit-qu...@webkit.org
- Date
- 2017-10-30 12:45:49 -0700 (Mon, 30 Oct 2017)
Log Message
[Setting] Only expose experimental features that are compiled in
https://bugs.webkit.org/show_bug.cgi?id=179023
Patch by Sam Weinig <s...@webkit.org> on 2017-10-30
Reviewed by Tim Horton.
* Scripts/PreferencesTemplates/WebPreferencesExperimentalFeatures.cpp.erb:
Update template to conditionally expose experimental features based on their
'condition' option in WebPreferences.yaml
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (224195 => 224196)
--- trunk/Source/WebKit/ChangeLog 2017-10-30 19:34:42 UTC (rev 224195)
+++ trunk/Source/WebKit/ChangeLog 2017-10-30 19:45:49 UTC (rev 224196)
@@ -1,3 +1,15 @@
+2017-10-30 Sam Weinig <s...@webkit.org>
+
+ [Setting] Only expose experimental features that are compiled in
+ https://bugs.webkit.org/show_bug.cgi?id=179023
+
+ Reviewed by Tim Horton.
+
+ * Scripts/PreferencesTemplates/WebPreferencesExperimentalFeatures.cpp.erb:
+
+ Update template to conditionally expose experimental features based on their
+ 'condition' option in WebPreferences.yaml
+
2017-10-30 Michael Catanzaro <mcatanz...@igalia.com>
[WPE] Fix build warnings
Modified: trunk/Source/WebKit/Scripts/PreferencesTemplates/WebPreferencesExperimentalFeatures.cpp.erb (224195 => 224196)
--- trunk/Source/WebKit/Scripts/PreferencesTemplates/WebPreferencesExperimentalFeatures.cpp.erb 2017-10-30 19:34:42 UTC (rev 224195)
+++ trunk/Source/WebKit/Scripts/PreferencesTemplates/WebPreferencesExperimentalFeatures.cpp.erb 2017-10-30 19:45:49 UTC (rev 224196)
@@ -50,8 +50,14 @@
{
static NeverDestroyed<Vector<RefPtr<API::Object>>> features(std::initializer_list<RefPtr<API::Object>> {
<%- for @pref in @experimentalFeatures do -%>
+<%- if @pref.condition -%>
+#if <%= @pref.condition %>
+<%- end -%>
API::ExperimentalFeature::create(<%= @pref.humanReadableName %>, "<%= @pref.name %>", <%= @pref.humanReadableDescription %>, <%= @pref.defaultValue %>),
+<%- if @pref.condition -%>
+#endif
<%- end -%>
+<%- end -%>
});
return features;
@@ -66,8 +72,14 @@
static FeatureGetterMapping getters[] = {
<%- for @pref in @experimentalFeatures do -%>
+<%- if @pref.condition -%>
+#if <%= @pref.condition %>
+<%- end -%>
{ "<%= @pref.name %>", &WebPreferences::<%= @pref.nameLower %> },
+<%- if @pref.condition -%>
+#endif
<%- end -%>
+<%- end -%>
};
const String& key = feature.key();
@@ -89,8 +101,14 @@
static FeatureSetterMapping setters[] = {
<%- for @pref in @experimentalFeatures do -%>
+<%- if @pref.condition -%>
+#if <%= @pref.condition %>
+<%- end -%>
{ "<%= @pref.name %>", &WebPreferences::set<%= @pref.name %> },
+<%- if @pref.condition -%>
+#endif
<%- end -%>
+<%- end -%>
};
const String& key = feature.key();
@@ -106,8 +124,14 @@
void WebPreferences::enableAllExperimentalFeatures()
{
<%- for @pref in @experimentalFeatures do -%>
+<%- if @pref.condition -%>
+#if <%= @pref.condition %>
+<%- end -%>
set<%= @pref.name %>(true);
+<%- if @pref.condition -%>
+#endif
<%- end -%>
+<%- end -%>
}
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes