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

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

Issue 2741103003: Simplify ComputedStyleBase::inheritedEqual. (Closed)
Patch Set: Created 3 years, 9 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 cb055de90f1d00f40c786532f69a0343d83fb5af..2516c34e6732aa31e7b0afc3ee64a24948574f1f 100644
--- a/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl
+++ b/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl
@@ -35,14 +35,6 @@ class CORE_EXPORT ComputedStyleBase {
{% endfor %}
{}
- inline bool inheritedEqual(const ComputedStyleBase& o) const {
- return (
- {% for field in fields if field.is_property and field.is_inherited %}
- {{field.name}} == o.{{field.name}}{{print_if(not loop.last, ' &&')}}
- {% endfor %}
- );
- }
-
inline bool independentInheritedEqual(const ComputedStyleBase& o) const {
return (
{% for field in fields if field.is_property and field.is_inherited and field.is_independent %}
@@ -59,6 +51,10 @@ class CORE_EXPORT ComputedStyleBase {
);
}
+ inline bool inheritedEqual(const ComputedStyleBase& o) const {
+ return independentInheritedEqual(o) && nonIndependentInheritedEqual(o);
+ }
+
inline bool nonInheritedEqual(const ComputedStyleBase& o) const {
return (
{% for field in fields if field.is_property and not field.is_inherited %}
« 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