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

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

Issue 2879563002: Refactor code generation to allow us to diff generic expressions and not just fields (Closed)
Patch Set: Formatting 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
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 8ea284e90468291128f389c9666e096f1caa3e41..43f8c820672d3f50b3a7c99b9b3d737be4d31e63 100644
--- a/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl
+++ b/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl
@@ -121,24 +121,12 @@ class CORE_EXPORT ComputedStyleBase {
{% endfor %}
}
- bool ScrollAnchorDisablingPropertyChanged(
- const ComputedStyleBase& other,
- const StyleDifference& diff) const {
- {{fieldwise_diff(computed_style, computed_style.all_fields
- |selectattr("property_name", "in", ["margin-top", "margin-left", "margin-right", "margin-bottom", "left", "right", "top", "bottom", "padding-top", "padding-left", "padding-right", "padding-bottom"])
- |list
- )|indent(4)}}
- return false;
- }
-
- bool DiffNeedsFullLayoutAndPaintInvalidation(
- const ComputedStyleBase& other) const {
- {{fieldwise_diff(computed_style, computed_style.all_fields
- |selectattr("property_name", "in", ["padding-top", "padding-left", "padding-right", "padding-bottom"])
- |list
- )|indent(4)}}
+ {% for name, groups_to_diff in diff_functions_map.items() %}
+ bool {{name}}(const ComputedStyleBase& other) const {
+ {{fieldwise_diff(groups_to_diff)|indent(4)}}
return false;
}
+ {% endfor %}
// Fields.
// TODO(sashab): Remove initialFoo() static methods and update callers to

Powered by Google App Engine
This is Rietveld 408576698