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

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

Issue 2896233002: Assert that ComputedStyleBase is only templated with ComputedStyle (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 cf15c37253a59730ff69800aec585d3adb73bf95..61387a99796037eeb86a72c4ed05546739249020 100644
--- a/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl
+++ b/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl
@@ -152,6 +152,7 @@ class CORE_EXPORT ComputedStyleBase {
{{field_templates[field.field_template].decl_public_methods(field)|indent(2)}}
{% endfor %}
+
shend 2017/05/23 22:22:48 nit: don't need extra space.
nainar 2017/05/23 23:45:16 Done
private:
{% for subgroup in computed_style.subgroups %}
{{define_field_group_class(subgroup)|indent(2)}}
@@ -169,6 +170,9 @@ class CORE_EXPORT ComputedStyleBase {
{% for subgroup in computed_style.subgroups %}
{{subgroup.member_name}}.Init();
{% endfor %}
+
+ static_assert(std::is_same<ComputedStyle, ComputedStyleFinal>::value, "ComputedStyleBase can only be templated with ComputedStyle");
shend 2017/05/23 22:22:47 nit: I would move this closer to the top of the cl
nainar 2017/05/23 23:45:16 Done. Since we talked about this IRL. One of the c
+
}
{% for field in computed_style.all_fields %}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698