Commit 5ef8abbc authored by Bugs Nash's avatar Bugs Nash Committed by Commit Bot

Changed basic applyValue generated code to hand written.

Changed custom applyValue code for border-image-source and
-webkit-mask-box-image-source to be hand written instead of generated
with a custom template as the savings on code duplication aren't large
enough to warrant the added code complexity.

These hand written custom methods will be moved to property classes
after all the generated methods are moved.

Bug: 751354
Change-Id: Ie983aa0b3a13bddc3c0435faf40e0960e2d2dac5
Reviewed-on: https://chromium-review.googlesource.com/810245Reviewed-by: default avatarnainar <nainar@chromium.org>
Commit-Queue: Bugs Nash <bugsnash@chromium.org>
Cr-Commit-Position: refs/heads/master@{#522001}
parent dd2ed94f
...@@ -121,15 +121,6 @@ namespace blink { ...@@ -121,15 +121,6 @@ namespace blink {
{{apply_animation('CSSPropertyTransitionProperty', 'Property', 'Transition')}} {{apply_animation('CSSPropertyTransitionProperty', 'Property', 'Transition')}}
{{apply_animation('CSSPropertyTransitionTimingFunction', 'TimingFunction', 'Transition')}} {{apply_animation('CSSPropertyTransitionTimingFunction', 'TimingFunction', 'Transition')}}
{% macro apply_value_border_image_source(property_id) %}
{{declare_value_function(property_id)}} {
{% set property = properties_by_id[property_id] %}
{{set_value(property)}}(state.GetStyleImage({{property_id}}, value));
}
{% endmacro %}
{{apply_value_border_image_source('CSSPropertyBorderImageSource')}}
{{apply_value_border_image_source('CSSPropertyWebkitMaskBoxImageSource')}}
{% macro apply_color(property_id, initial_color='StyleColor::CurrentColor') %} {% macro apply_color(property_id, initial_color='StyleColor::CurrentColor') %}
{% set property = properties_by_id[property_id] %} {% set property = properties_by_id[property_id] %}
{% set visited_link_setter = 'SetVisitedLink' + property.name_for_methods %} {% set visited_link_setter = 'SetVisitedLink' + property.name_for_methods %}
......
...@@ -1003,4 +1003,18 @@ void StyleBuilderFunctions::applyValueCSSPropertyCaretColor( ...@@ -1003,4 +1003,18 @@ void StyleBuilderFunctions::applyValueCSSPropertyCaretColor(
} }
} }
void StyleBuilderFunctions::applyValueCSSPropertyBorderImageSource(
StyleResolverState& state,
const CSSValue& value) {
state.Style()->SetBorderImageSource(
state.GetStyleImage(CSSPropertyBorderImageSource, value));
}
void StyleBuilderFunctions::applyValueCSSPropertyWebkitMaskBoxImageSource(
StyleResolverState& state,
const CSSValue& value) {
state.Style()->SetMaskBoxImageSource(
state.GetStyleImage(CSSPropertyWebkitMaskBoxImageSource, value));
}
} // namespace blink } // namespace blink
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment