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

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

Issue 1377943005: Change StyleBuilderConverter functions to take const CSSValue&s (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@style_map_references
Patch Set: Rebase Created 5 years, 2 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 | third_party/WebKit/Source/core/css/CSSGradientValue.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 917785d4260092ee0c7085d49c8d7f626c05b24a..5ed359d8e2b12ba2afd352d8e2776fabff412197 100644
--- a/third_party/WebKit/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl
+++ b/third_party/WebKit/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl
@@ -38,7 +38,7 @@ state.style()->{{property.setter}}
{% endmacro %}
{% macro convert_and_set_value(property) %}
{% if property.converter %}
-{{set_value(property)}}(StyleBuilderConverter::{{property.converter}}(state, value));
+{{set_value(property)}}(StyleBuilderConverter::{{property.converter}}(state, *value));
{%- else %}
{{set_value(property)}}(static_cast<{{property.type_name}}>(*toCSSPrimitiveValue(value)));
{%- endif %}
@@ -293,9 +293,9 @@ static bool borderImageLengthMatchesAllSides(const BorderImageLengthBox& borderI
{{declare_value_function(property_id)}}
{
if (state.applyPropertyToRegularStyle())
- {{set_value(property)}}(StyleBuilderConverter::convertStyleColor(state, value));
+ {{set_value(property)}}(StyleBuilderConverter::convertStyleColor(state, *value));
if (state.applyPropertyToVisitedLinkStyle())
- state.style()->{{visited_link_setter}}(StyleBuilderConverter::convertStyleColor(state, value, true));
+ state.style()->{{visited_link_setter}}(StyleBuilderConverter::convertStyleColor(state, *value, true));
}
{% endmacro %}
{{apply_color('CSSPropertyBackgroundColor', initial_color='ComputedStyle::initialBackgroundColor') }}
@@ -465,7 +465,7 @@ static bool borderImageLengthMatchesAllSides(const BorderImageLengthBox& borderI
Vector<GridTrackSize> trackSizes;
NamedGridLinesMap namedGridLines;
OrderedNamedGridLines orderedNamedGridLines;
- StyleBuilderConverter::convertGridTrackList(value, trackSizes, namedGridLines, orderedNamedGridLines, state);
+ StyleBuilderConverter::convertGridTrackList(*value, trackSizes, namedGridLines, orderedNamedGridLines, state);
const NamedGridAreaMap& namedGridAreas = state.style()->namedGridArea();
if (!namedGridAreas.isEmpty())
StyleBuilderConverter::createImplicitNamedGridLinesFromGridArea(namedGridAreas, namedGridLines, For{{type}}s);
@@ -523,7 +523,7 @@ static bool borderImageLengthMatchesAllSides(const BorderImageLengthBox& borderI
color = state.style()->color();
paintType = url.isEmpty() ? SVG_PAINTTYPE_CURRENTCOLOR : SVG_PAINTTYPE_URI_CURRENTCOLOR;
} else {
- color = StyleBuilderConverter::convertColor(state, primitiveValue);
+ color = StyleBuilderConverter::convertColor(state, *primitiveValue);
paintType = url.isEmpty() ? SVG_PAINTTYPE_RGBCOLOR : SVG_PAINTTYPE_URI_RGBCOLOR;
}
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/CSSGradientValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698