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

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

Issue 2879563002: Refactor code generation to allow us to diff generic expressions and not just fields (Closed)
Patch Set: shend@'s suggestions 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.cpp.tmpl
diff --git a/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.cpp.tmpl b/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.cpp.tmpl
index 3bcd4386a1e7e4efba2f01ea68daced067f4a953..4eec248aae63058ed443334e9eb3b297961d5e88 100644
--- a/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.cpp.tmpl
+++ b/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.cpp.tmpl
@@ -48,23 +48,12 @@ void ComputedStyleBase::PropagateIndependentInheritedProperties(
{% endfor %}
}
-bool ComputedStyleBase::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(2)}}
- return false;
-}
-
-bool ComputedStyleBase::DiffNeedsFullLayoutAndPaintInvalidation(
+{% for name, groups_to_diff in diff_functions_map.items() %}
+bool ComputedStyleBase::{{name}}(
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(2)}}
+ {{fieldwise_diff(groups_to_diff)|indent(2)}}
return false;
}
+{% endfor %}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698