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

Unified Diff: Source/core/scripts/templates/StyleBuilder.cpp.tmpl

Issue 21625003: StyleBuilder should not know about StyleResolver. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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: Source/core/scripts/templates/StyleBuilder.cpp.tmpl
diff --git a/Source/core/scripts/templates/StyleBuilder.cpp.tmpl b/Source/core/scripts/templates/StyleBuilder.cpp.tmpl
index 2c601b7c89326f3c2f50d5bb9ed87cabbc16168d..0d25729d4b27d0e112f753d021ac1e031d84fb3e 100644
--- a/Source/core/scripts/templates/StyleBuilder.cpp.tmpl
+++ b/Source/core/scripts/templates/StyleBuilder.cpp.tmpl
@@ -6,7 +6,7 @@
#include "StyleBuilderFunctions.h"
#include "core/css/CSSPrimitiveValueMappings.h"
-#include "core/css/resolver/StyleResolver.h"
+#include "core/css/resolver/StyleResolverState.h"
// FIXME: currently we're just generating a switch statement, but we should
// test other variations for performance once we have more properties here.
@@ -76,7 +76,7 @@ namespace WebCore {
{%- set apply_type = property.apply_type %}
{%- if not property.custom_initial %}
-void StyleBuilderFunctions::applyInitial{{property_id}}(StyleResolver* styleResolver, StyleResolverState& state)
+void StyleBuilderFunctions::applyInitial{{property_id}}(StyleResolverState& state)
{
{%- if property.svg %}
{{ set_value(property) }}(SVGRenderStyle::{{property.initial}}());
@@ -87,7 +87,7 @@ void StyleBuilderFunctions::applyInitial{{property_id}}(StyleResolver* styleReso
{% endif %}
{%- if not property.custom_inherit %}
-void StyleBuilderFunctions::applyInherit{{property_id}}(StyleResolver* styleResolver, StyleResolverState& state)
+void StyleBuilderFunctions::applyInherit{{property_id}}(StyleResolverState& state)
{
{%- if property.svg %}
{{ set_value(property) }}(state.parentStyle()->svgStyle()->{{property.getter}}());
@@ -98,7 +98,7 @@ void StyleBuilderFunctions::applyInherit{{property_id}}(StyleResolver* styleReso
{% endif %}
{%- if not property.custom_value %}
-void StyleBuilderFunctions::applyValue{{property_id}}(StyleResolver* styleResolver, StyleResolverState& state, CSSValue* value)
+void StyleBuilderFunctions::applyValue{{property_id}}(StyleResolverState& state, CSSValue* value)
{
{%- if apply_type == "length" %}
{{ apply_value_length(property) }}
@@ -111,7 +111,7 @@ void StyleBuilderFunctions::applyValue{{property_id}}(StyleResolver* styleResolv
{%- endcall %}
{%- endfor %}
-bool StyleBuilder::applyProperty(CSSPropertyID property, StyleResolver* styleResolver, StyleResolverState& state, CSSValue* value, bool isInitial, bool isInherit) {
+bool StyleBuilder::applyProperty(CSSPropertyID property, StyleResolverState& state, CSSValue* value, bool isInitial, bool isInherit) {
switch(property) {
{%- for property_id, property in properties.items() %}
{%- set used_property = properties[property.use_handlers_for] or property %}
@@ -119,11 +119,11 @@ bool StyleBuilder::applyProperty(CSSPropertyID property, StyleResolver* styleRes
{%- call wrap_with_condition(used_property.condition) %}
case {{ property_id }}:
if (isInitial)
- StyleBuilderFunctions::applyInitial{{ used_property_id }}(styleResolver, state);
+ StyleBuilderFunctions::applyInitial{{ used_property_id }}(state);
else if (isInherit)
- StyleBuilderFunctions::applyInherit{{ used_property_id }}(styleResolver, state);
+ StyleBuilderFunctions::applyInherit{{ used_property_id }}(state);
else
- StyleBuilderFunctions::applyValue{{ used_property_id }}(styleResolver, state, value);
+ StyleBuilderFunctions::applyValue{{ used_property_id }}(state, value);
return true;
{%- endcall %}
{% endfor %}

Powered by Google App Engine
This is Rietveld 408576698