Index: third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl |
diff --git a/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl b/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl |
index b89cff5d9bd9b8ddd786a4366fa9da779a74b286..738b7249895440d538b8d4ec7755cb91af96fda2 100644 |
--- a/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl |
+++ b/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl |
@@ -6,8 +6,8 @@ |
#include "core/ComputedStyleBaseConstants.h" |
#include "core/CoreExport.h" |
-{% for field in fields if field.storage_type_path != None %} |
-#include "{{field.storage_type_path}}.h" |
+{% for field in fields if field.field_type_path != None %} |
+#include "{{field.field_type_path}}.h" |
{% endfor %} |
{# Returns the default value for the field, converted to fit in the storage container. #} |
@@ -100,22 +100,33 @@ class CORE_EXPORT ComputedStyleBase { |
// Fields. |
// TODO(sashab): Remove initialFoo() static methods and update callers to |
// use resetFoo(), which can be more efficient. |
+ |
{% for field in fields %} |
// {{field.property_name}} |
- inline static {{field.storage_type}} {{field.initial_method_name}}() { return {{field.default_value}}; } |
- {{field.storage_type}} {{field.getter_method_name}}() const { return static_cast<{{field.storage_type}}>({{field.name}}); } |
+ inline static {{field.type_name}} {{field.initial_method_name}}() { |
+ return {{field.default_value}}; |
+ } |
+ {{field.type_name}} {{field.getter_method_name}}() const { |
+ return static_cast<{{field.type_name}}>({{field.name}}); |
+ } |
{% if field.is_nonproperty %} |
- void {{field.setter_method_name}}() { {{field.name}} = static_cast<unsigned>(true); } |
+ void {{field.setter_method_name}}() { |
+ {{field.name}} = static_cast<unsigned>(true); |
+ } |
{% else %} |
- void {{field.setter_method_name}}({{field.storage_type}} v) { {{field.name}} = static_cast<unsigned>(v); } |
+ void {{field.setter_method_name}}({{field.type_name}} v) { |
+ {{field.name}} = static_cast<unsigned>(v); |
+ } |
{% endif %} |
- inline void {{field.resetter_method_name}}() { {{field.name}} = {{default_value(field)}}; } |
+ inline void {{field.resetter_method_name}}() { |
+ {{field.name}} = {{default_value(field)}}; |
+ } |
{% endfor %} |
protected: |
// Storage. |
{% for field in fields %} |
- unsigned {{field.name}} : {{field.size}}; // {{field.storage_type}} |
+ unsigned {{field.name}} : {{field.size}}; // {{field.type_name}} |
{% endfor %} |
}; |