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

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

Issue 2351993002: Added support for non-inherited flags in ComputedStyleBase (Closed)
Patch Set: Rebase Created 4 years, 3 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 f71516fe9d4b5308473712acdf46b451250ac83e..5c8bdb9f04e4b9685b14902901c9abeccea87907 100644
--- a/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl
+++ b/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl
@@ -83,7 +83,7 @@ public:
void setBitDefaults()
{
{% for field in fields %}
- reset{{field.property['upper_camel_name']}}();
+ {{field.resetter_method_name}}();
{% endfor %}
}
@@ -93,15 +93,17 @@ public:
};
void inheritFrom(const ComputedStyleBase& inheritParent, IsAtShadowBoundary isAtShadowBoundary = NotAtShadowBoundary);
+ void copyNonInheritedFromCached(const ComputedStyleBase& other);
+
// Fields.
// TODO(sashab): Remove initialFoo() static methods and update callers to
// use resetFoo(), which can be more efficient.
{% for field in fields %}
// {{field.property['name']}}
- inline static {{field.type}} initial{{field.property['upper_camel_name']}}() { return {{field.default_value}}; }
- {{field.type}} {{field.property['lower_camel_name']}}() const { return static_cast<{{field.type}}>({{field.name}}); }
- void set{{field.property['upper_camel_name']}}({{field.type}} v) { {{field.name}} = static_cast<unsigned>(v); }
- inline void reset{{field.property['upper_camel_name']}}() { {{field.name}} = {{default_value(field)}}; }
+ inline static {{field.type}} {{field.initial_method_name}}() { return {{field.default_value}}; }
+ {{field.type}} {{field.getter_method_name}}() const { return static_cast<{{field.type}}>({{field.name}}); }
+ void {{field.setter_method_name}}({{field.type}} v) { {{field.name}} = static_cast<unsigned>(v); }
+ inline void {{field.resetter_method_name}}() { {{field.name}} = {{default_value(field)}}; }
{% endfor %}
protected:

Powered by Google App Engine
This is Rietveld 408576698