Changeset 224196 in webkit
- Timestamp:
- Oct 30, 2017 12:45:49 PM (6 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r224192 r224196 1 2017-10-30 Sam Weinig <sam@webkit.org> 2 3 [Setting] Only expose experimental features that are compiled in 4 https://bugs.webkit.org/show_bug.cgi?id=179023 5 6 Reviewed by Tim Horton. 7 8 * Scripts/PreferencesTemplates/WebPreferencesExperimentalFeatures.cpp.erb: 9 10 Update template to conditionally expose experimental features based on their 11 'condition' option in WebPreferences.yaml 12 1 13 2017-10-30 Michael Catanzaro <mcatanzaro@igalia.com> 2 14 -
trunk/Source/WebKit/Scripts/PreferencesTemplates/WebPreferencesExperimentalFeatures.cpp.erb
r224191 r224196 51 51 static NeverDestroyed<Vector<RefPtr<API::Object>>> features(std::initializer_list<RefPtr<API::Object>> { 52 52 <%- for @pref in @experimentalFeatures do -%> 53 <%- if @pref.condition -%> 54 #if <%= @pref.condition %> 55 <%- end -%> 53 56 API::ExperimentalFeature::create(<%= @pref.humanReadableName %>, "<%= @pref.name %>", <%= @pref.humanReadableDescription %>, <%= @pref.defaultValue %>), 57 <%- if @pref.condition -%> 58 #endif 59 <%- end -%> 54 60 <%- end -%> 55 61 }); … … 67 73 static FeatureGetterMapping getters[] = { 68 74 <%- for @pref in @experimentalFeatures do -%> 75 <%- if @pref.condition -%> 76 #if <%= @pref.condition %> 77 <%- end -%> 69 78 { "<%= @pref.name %>", &WebPreferences::<%= @pref.nameLower %> }, 79 <%- if @pref.condition -%> 80 #endif 81 <%- end -%> 70 82 <%- end -%> 71 83 }; … … 90 102 static FeatureSetterMapping setters[] = { 91 103 <%- for @pref in @experimentalFeatures do -%> 104 <%- if @pref.condition -%> 105 #if <%= @pref.condition %> 106 <%- end -%> 92 107 { "<%= @pref.name %>", &WebPreferences::set<%= @pref.name %> }, 108 <%- if @pref.condition -%> 109 #endif 110 <%- end -%> 93 111 <%- end -%> 94 112 }; … … 107 125 { 108 126 <%- for @pref in @experimentalFeatures do -%> 127 <%- if @pref.condition -%> 128 #if <%= @pref.condition %> 129 <%- end -%> 109 130 set<%= @pref.name %>(true); 131 <%- if @pref.condition -%> 132 #endif 133 <%- end -%> 110 134 <%- end -%> 111 135 }
Note: See TracChangeset
for help on using the changeset viewer.