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

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

Issue 2220873002: Add a fast-path for independent inherited properties (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix for shadow roots Created 4 years, 4 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/StyleBuilderFunctions.cpp.tmpl
diff --git a/third_party/WebKit/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl b/third_party/WebKit/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl
index 241ed5cbcfedaca0cf9d17382d629555c865440e..5f73114d7b3147a53a1d4ea6dced752bcd3b604d 100644
--- a/third_party/WebKit/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl
+++ b/third_party/WebKit/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl
@@ -43,6 +43,9 @@ state.style()->{{property.setter}}
{{set_value(property)}}(toCSSPrimitiveValue(value).convertTo<{{property.type_name}}>());
{%- endif %}
{% endmacro %}
+{% macro set_is_inherited(property) %}
+state.style()->{{property.is_inherited_setter}}
+{% endmacro %}
namespace blink {
@@ -58,6 +61,9 @@ namespace blink {
{% else %}
{{set_value(property)}}(ComputedStyle::{{property.initial}}());
{% endif %}
+ {% if property.independent %}
+ {{set_is_inherited(property)}}(true);
rune 2016/08/18 08:06:49 Shouldn't this be false? Last time I looked I thou
sashab 2016/08/19 05:35:25 Oops, nice catch! Not sure how that happened, yes,
+ {% endif %}
}
{% endif %}
@@ -71,6 +77,9 @@ namespace blink {
{% else %}
{{set_value(property)}}(state.parentStyle()->{{property.getter}}());
{% endif %}
+ {% if property.independent %}
+ {{set_is_inherited(property)}}(true);
sashab 2016/08/18 04:47:14 Fix for hidden tabs problem - crbug.com/634254
+ {% endif %}
}
{% endif %}
@@ -78,6 +87,9 @@ namespace blink {
{{declare_value_function(property_id)}}
{
{{convert_and_set_value(property)}}
+ {% if property.independent %}
+ {{set_is_inherited(property)}}(false);
+ {% endif %}
}
{% endif %}

Powered by Google App Engine
This is Rietveld 408576698