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

Unified Diff: third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl

Issue 2692803002: Clean up type handling in make_computed_style_base.py. (Closed)
Patch Set: Rebase Created 3 years, 10 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: 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..feaf0522b338a43328ca20b321a6ee6a78d46721 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.type_path != None %}
+#include "{{field.type_path}}.h"
{% endfor %}
{# Returns the default value for the field, converted to fit in the storage container. #}
@@ -102,12 +102,12 @@ class CORE_EXPORT ComputedStyleBase {
// 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); }
{% 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)}}; }
@@ -115,7 +115,7 @@ class CORE_EXPORT ComputedStyleBase {
protected:
// Storage.
{% for field in fields %}
- unsigned {{field.name}} : {{field.size}}; // {{field.storage_type}}
+ unsigned {{field.name}} : {{field.size}}; // {{field.type_name}}
{% endfor %}
};

Powered by Google App Engine
This is Rietveld 408576698