Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(442)

Unified Diff: Source/build/scripts/templates/RuntimeEnabledFeatures.h.tmpl

Issue 236673002: Simplify whitespace handling in build/ Jinja templates (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: One more FIXME Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/build/scripts/templates/RuntimeEnabledFeatures.h.tmpl
diff --git a/Source/build/scripts/templates/RuntimeEnabledFeatures.h.tmpl b/Source/build/scripts/templates/RuntimeEnabledFeatures.h.tmpl
index 6707e73f46df19952c7be63ad6f86cbc26972ec4..b370527d59c1cc46168673ce61f170b7006f3af2 100644
--- a/Source/build/scripts/templates/RuntimeEnabledFeatures.h.tmpl
+++ b/Source/build/scripts/templates/RuntimeEnabledFeatures.h.tmpl
@@ -1,4 +1,4 @@
-{% from "macros.tmpl" import wrap_with_condition, license -%}
+{% from "macros.tmpl" import wrap_with_condition, license %}
{{ license() }}
#ifndef RuntimeEnabledFeatures_h
@@ -12,36 +12,38 @@ namespace WebCore {
class PLATFORM_EXPORT RuntimeEnabledFeatures {
public:
-
-{%- for feature_set in feature_sets %}
+ {% for feature_set in feature_sets %}
static void set{{feature_set|capitalize}}FeaturesEnabled(bool);
-{%- endfor %}
+ {% endfor %}
+
-{% for feature in features %}
-{%- if feature.custom %}
+ {% for feature in features %}
+ {% if feature.custom %}
static bool {{feature.first_lowered_name}}Enabled();
-{%- else %}
-{%- if feature.condition %}
+ {% else %}
+ {% if feature.condition %}
#if ENABLE({{feature.condition}})
-{%- endif %}
+ {% endif %}
static void set{{feature.name}}Enabled(bool isEnabled) { is{{feature.name}}Enabled = isEnabled; }
static bool {{feature.first_lowered_name}}Enabled() { return {{feature.enabled_condition}}; }
-{%- if feature.condition %}
+ {% if feature.condition %}
#else
static void set{{feature.name}}Enabled(bool) { }
static bool {{feature.first_lowered_name}}Enabled() { return false; }
#endif
-{%- endif %}
-{%- endif %}
-{% endfor %}
+ {% endif %}
+
+ {% endif %}
+ {% endfor %}
private:
RuntimeEnabledFeatures() { }
-{% for feature in features if not feature.custom %}
-{%- call wrap_with_condition(feature.condition) %}
+
+ {% for feature in features if not feature.custom %}
+ {% call wrap_with_condition(feature.condition) %}
static bool is{{feature.name}}Enabled;
-{%- endcall %}
-{%- endfor %}
+ {% endcall %}
+ {% endfor %}
};
} // namespace WebCore
« no previous file with comments | « Source/build/scripts/templates/RuntimeEnabledFeatures.cpp.tmpl ('k') | Source/build/scripts/templates/SettingsMacros.h.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698