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

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

Issue 186403002: Make font-related CSS properties less custom. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl
diff --git a/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl b/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl
index 78a0245da7aecc7f128add31de82281a9876f239..1d86ad0f2de981f9bf928e9a0948ba63e9cb5a7f 100644
--- a/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl
+++ b/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl
@@ -426,36 +426,6 @@ namespace WebCore {
{{ apply_fill_layer("CSSPropertyWebkitMaskRepeatY", "RepeatY") }}
{{ apply_fill_layer("CSSPropertyWebkitMaskSize", "Size") }}
-{%- macro apply_font(property_id, name_for_methods, initial, type_name) %}
-{#- We specify the getters/setters here since they are on FontDescription
- and not RenderStyle #}
-{%- set getter = lower_first(name_for_methods) %}
-{%- set setter = "set" + name_for_methods %}
-{{ declare_initial_function(property_id) }}
-{
- state.fontBuilder().{{setter}}({{initial}});
-}
-
-{{ declare_inherit_function(property_id) }}
-{
- state.fontBuilder().{{setter}}(state.parentFontDescription().{{getter}}());
-}
-
-{{ declare_value_function(property_id) }}
-{
- if (!value->isPrimitiveValue())
- return;
- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
- state.fontBuilder().{{setter}}(static_cast<{{type_name}}>(*primitiveValue));
-}
-{%- endmacro %}
-
-{{ apply_font("CSSPropertyFontStyle", "Italic", "FontItalicOff", "FontItalic") }}
-{{ apply_font("CSSPropertyFontVariant", "SmallCaps", "FontSmallCapsOff", "FontSmallCaps") }}
-{{ apply_font("CSSPropertyTextRendering", "TextRenderingMode", "AutoTextRendering", "TextRenderingMode") }}
-{{ apply_font("CSSPropertyFontKerning", "Kerning", "FontDescription::AutoKerning", "FontDescription::Kerning") }}
-{{ apply_font("CSSPropertyWebkitFontSmoothing", "FontSmoothing", "AutoSmoothing", "FontSmoothingMode") }}
-
{%- macro apply_value_number(property_id, id_for_minus_one) %}
{{ declare_value_function(property_id) }}
{

Powered by Google App Engine
This is Rietveld 408576698