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

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

Issue 2312823002: Added support for isInherited flags to ComputedStyleBase (Closed)
Patch Set: Rebase and a bit more cleanup work... Maybe needs a rethink 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.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 d73b9934519171e844f58849cb63c79acbd2bbd1..d6a229ff8f9036e3b31d05da40a07294ff108dd0 100644
--- a/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.cpp.tmpl
+++ b/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.cpp.tmpl
@@ -7,9 +7,24 @@ namespace blink {
void ComputedStyleBase::inheritFrom(const ComputedStyleBase& inheritParent, IsAtShadowBoundary isAtShadowBoundary)
{
- {% for field in fields if field.property['inherited'] %}
+ {% for field in fields if field.copy_function_inherit %}
{{field.name}} = inheritParent.{{field.name}};
{% endfor %}
}
+void ComputedStyleBase::copyNonInheritedFromCached(const ComputedStyleBase& other)
+{
+ {% for field in fields if field.copy_function_non_inherited_cache %}
+ {{field.name}} = other.{{field.name}};
+ {% endfor %}
+}
+
+void ComputedStyleBase::propagateIndependentInheritedProperties(const ComputedStyleBase& parentStyle)
+{
+ {% for field in fields if field.inherited_flag_field %}
+ if ({{field.inherited_flag_field.lower_camel_name}}())
+ set{{field.upper_camel_method_name}}(parentStyle.{{field.lower_camel_name}}());
+ {% endfor %}
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698