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

Unified Diff: sky/engine/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl

Issue 667003003: Remove most of visited link support. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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 | sky/engine/core/animation/animatable/AnimatableColor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl
diff --git a/sky/engine/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl b/sky/engine/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl
index 9e72a857963263be3a793dd126469c835b82d388..5cc02304f78d2bf95560414be2ce7a0e6cdb587b 100644
--- a/sky/engine/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl
+++ b/sky/engine/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl
@@ -272,33 +272,22 @@ static bool lengthTypeAndValueMatch(const BorderImageLengthBox& borderImageLengt
{% macro apply_color(property_id, initial_color='StyleColor::currentColor') %}
{% set property = properties[property_id] %}
-{% set visited_link_setter = 'setVisitedLink' + property.name_for_methods %}
{{declare_initial_function(property_id)}}
{
StyleColor color = {{initial_color}}();
- if (state.applyPropertyToRegularStyle())
- {{set_value(property)}}(color);
- if (state.applyPropertyToVisitedLinkStyle())
- state.style()->{{visited_link_setter}}(color);
+ {{set_value(property)}}(color);
}
{{declare_inherit_function(property_id)}}
{
- // Visited link style can never explicitly inherit from parent visited link style so no separate getters are needed.
StyleColor color = state.parentStyle()->{{property.getter}}();
Color resolvedColor = color.resolve(state.parentStyle()->color());
- if (state.applyPropertyToRegularStyle())
- {{set_value(property)}}(resolvedColor);
- if (state.applyPropertyToVisitedLinkStyle())
- state.style()->{{visited_link_setter}}(resolvedColor);
+ {{set_value(property)}}(resolvedColor);
}
{{declare_value_function(property_id)}}
{
- if (state.applyPropertyToRegularStyle())
- {{set_value(property)}}(StyleBuilderConverter::convertColor(state, value));
- if (state.applyPropertyToVisitedLinkStyle())
- state.style()->{{visited_link_setter}}(StyleBuilderConverter::convertColor(state, value, true));
+ {{set_value(property)}}(StyleBuilderConverter::convertColor(state, value));
}
{% endmacro %}
{{apply_color('CSSPropertyBackgroundColor', initial_color='RenderStyle::initialBackgroundColor') }}
« no previous file with comments | « no previous file | sky/engine/core/animation/animatable/AnimatableColor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698