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

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

Issue 2858863002: Add macro to diff the groups (and their members) in ComputedStyleBase (Closed)
Patch Set: use results from diff functions generated in ComputedStyleBase.cpp in ComputedStyle.cpp Created 3 years, 8 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 6f8132fe70b358ca26726b210874ee2cb79aad69..22a1a3e0f6d320a8e512b5d4cbbce49033ac4315 100644
--- a/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.cpp.tmpl
+++ b/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.cpp.tmpl
@@ -1,5 +1,5 @@
{% from 'macros.tmpl' import license %}
-{% from 'fields/field.tmpl' import getter_expression, setter_expression, fieldwise_copy %}
+{% from 'fields/field.tmpl' import getter_expression, setter_expression, fieldwise_copy, fieldwise_diff %}
{{license()}}
#include "core/ComputedStyleBase.h"
@@ -48,4 +48,23 @@ 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(
+ 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)}}
+ return false;
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698