Commit fd302936 authored by Bugs Nash's avatar Bugs Nash Committed by Commit Bot

Made property class headers more readable by adding comment

This is to prevent upcoming larger style builder functions from making
the headers difficult to read

This patch
- Added a comment to section off style builder functions in the property
  class header files for readability
- Moved style builder functions to end of class so that that section
  does not merge with another optional section
- Changed the condition to print style builder functions from
  should_declare to should_implement so that the comment does not appear
  for classes that have not yet had the style builder methods moved into
  them. The should_declare member is kept as it will be required in
  future for declaration only cases.

Diff of generated files:
https://gist.github.com/BugsNash/49febc392af82920fea3e59e6c7d3224/revisions

Bug: 751354
Change-Id: Ic664b6fcad97d70bf24d46428561fff2dd6107a0
Reviewed-on: https://chromium-review.googlesource.com/780160
Commit-Queue: Bugs Nash <bugsnash@chromium.org>
Reviewed-by: default avatarDarren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#518372}
parent 6d763d5a
......@@ -57,9 +57,6 @@ class {{property_classname}} : public {{property.superclass}} {
{% if property.is_descriptor %}
bool IsDescriptor() const override { return true; }
{% endif %}
{% if property.should_declare_apply_functions %}
{{style_builder_functions(property)}}
{%- endif %}
{% if 'Percent' in property.typedom_types %}
bool SupportsPercentage() const override { return true; }
{% endif %}
......@@ -104,6 +101,11 @@ class {{property_classname}} : public {{property.superclass}} {
}
{% endif %}
{% endif %}
{% if property.should_implement_apply_functions %}
// Style builder functions
{{style_builder_functions(property)}}
{%- endif %}
};
} // namespace CSS{{property.superclass}}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment