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

Issue 236673002: Simplify whitespace handling in build/ Jinja templates (Closed)

Created:
6 years, 8 months ago by Nils Barth (inactive)
Modified:
6 years, 8 months ago
Reviewers:
abarth-chromium
CC:
blink-reviews
Visibility:
Public.

Description

Simplify whitespace handling in build/ Jinja templates No change to generated code, just cleanup. This adds the flags: lstrip_blocks=True trim_blocks=True ...to the Jinja environment setup This means we don't need {%- everywhere, and also allows us to indent control blocks. (Other than that, a few consistency fixes of {{ foo() }} => {{foo()}} and " => ') This CL does not change generated code, to simplify testing and review. This turned up lots of minor whitespace errors or warts, which I've marked with FIXME and will fix in a followup. R=abarth Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=171422

Patch Set 1 #

Patch Set 2 : Tweak #

Patch Set 3 : One more FIXME #

Unified diffs Side-by-side diffs Delta from patch set Stats (+499 lines, -485 lines) Patch
M Source/build/scripts/template_expander.py View 1 2 1 chunk +5 lines, -1 line 0 comments Download
M Source/build/scripts/templates/ElementFactory.cpp.tmpl View 5 chunks +27 lines, -24 lines 0 comments Download
M Source/build/scripts/templates/ElementFactory.h.tmpl View 2 chunks +5 lines, -6 lines 0 comments Download
M Source/build/scripts/templates/ElementLookupTrie.cpp.tmpl View 2 chunks +4 lines, -2 lines 0 comments Download
M Source/build/scripts/templates/ElementTypeHelpers.h.tmpl View 3 chunks +22 lines, -11 lines 0 comments Download
M Source/build/scripts/templates/ElementWrapperFactory.cpp.tmpl View 5 chunks +18 lines, -19 lines 0 comments Download
M Source/build/scripts/templates/ElementWrapperFactory.h.tmpl View 1 chunk +1 line, -1 line 0 comments Download
M Source/build/scripts/templates/EventFactory.cpp.tmpl View 2 chunks +5 lines, -5 lines 0 comments Download
M Source/build/scripts/templates/InternalRuntimeFlags.h.tmpl View 2 chunks +8 lines, -6 lines 0 comments Download
M Source/build/scripts/templates/InternalRuntimeFlags.idl.tmpl View 1 chunk +5 lines, -5 lines 0 comments Download
M Source/build/scripts/templates/InternalSettingsGenerated.cpp.tmpl View 3 chunks +7 lines, -9 lines 0 comments Download
M Source/build/scripts/templates/InternalSettingsGenerated.h.tmpl View 2 chunks +6 lines, -6 lines 0 comments Download
M Source/build/scripts/templates/InternalSettingsGenerated.idl.tmpl View 1 chunk +3 lines, -3 lines 0 comments Download
M Source/build/scripts/templates/MakeNames.cpp.tmpl View 2 chunks +12 lines, -13 lines 0 comments Download
M Source/build/scripts/templates/MakeNames.h.tmpl View 1 chunk +10 lines, -10 lines 0 comments Download
M Source/build/scripts/templates/MakeQualifiedNames.cpp.tmpl View 3 chunks +20 lines, -23 lines 0 comments Download
M Source/build/scripts/templates/MakeQualifiedNames.h.tmpl View 2 chunks +7 lines, -8 lines 0 comments Download
M Source/build/scripts/templates/MediaFeatures.h.tmpl View 1 chunk +8 lines, -4 lines 0 comments Download
M Source/build/scripts/templates/RuntimeEnabledFeatures.cpp.tmpl View 1 chunk +9 lines, -7 lines 0 comments Download
M Source/build/scripts/templates/RuntimeEnabledFeatures.h.tmpl View 2 chunks +19 lines, -17 lines 0 comments Download
M Source/build/scripts/templates/SettingsMacros.h.tmpl View 1 chunk +15 lines, -15 lines 0 comments Download
M Source/build/scripts/templates/StyleBuilder.cpp.tmpl View 3 chunks +48 lines, -49 lines 0 comments Download
M Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl View 1 2 12 chunks +183 lines, -196 lines 0 comments Download
M Source/build/scripts/templates/StyleBuilderFunctions.h.tmpl View 2 chunks +6 lines, -5 lines 0 comments Download
M Source/build/scripts/templates/StylePropertyShorthand.cpp.tmpl View 2 chunks +34 lines, -31 lines 0 comments Download
M Source/build/scripts/templates/StylePropertyShorthand.h.tmpl View 1 chunk +4 lines, -2 lines 0 comments Download
M Source/build/scripts/templates/macros.tmpl View 1 2 chunks +8 lines, -7 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Nils Barth (inactive)
Hi Adam, Here's a cleanup CL so we don't need to use {%- -%} everywhere ...
6 years, 8 months ago (2014-04-14 03:51:09 UTC) #1
abarth-chromium
LGTM These settings make the templates much prettier!
6 years, 8 months ago (2014-04-14 04:11:35 UTC) #2
Nils Barth (inactive)
The CQ bit was checked by nbarth@chromium.org
6 years, 8 months ago (2014-04-14 04:22:05 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/nbarth@chromium.org/236673002/40001
6 years, 8 months ago (2014-04-14 04:22:15 UTC) #4
Nils Barth (inactive)
On 2014/04/14 04:11:35, abarth wrote: > These settings make the templates much prettier! Yeah, I've ...
6 years, 8 months ago (2014-04-14 04:33:43 UTC) #5
commit-bot: I haz the power
6 years, 8 months ago (2014-04-14 05:27:06 UTC) #6
Message was sent while issue was closed.
Change committed as 171422

Powered by Google App Engine
This is Rietveld 408576698