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

Unified Diff: third_party/WebKit/Source/core/animation/CSSColorInterpolationType.cpp

Issue 1428513003: Pass InterpolationEnvironment as a reference to InterpolationType conversion functions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@_svgAttributeReference
Patch Set: 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
Index: third_party/WebKit/Source/core/animation/CSSColorInterpolationType.cpp
diff --git a/third_party/WebKit/Source/core/animation/CSSColorInterpolationType.cpp b/third_party/WebKit/Source/core/animation/CSSColorInterpolationType.cpp
index 8fd137d557fd0eeff59638bf08364aa1d3002018..a5dd9cd7137c1a1df602b2f8e6dccb7e654fcc4d 100644
--- a/third_party/WebKit/Source/core/animation/CSSColorInterpolationType.cpp
+++ b/third_party/WebKit/Source/core/animation/CSSColorInterpolationType.cpp
@@ -173,12 +173,12 @@ PassOwnPtr<InterpolationValue> CSSColorInterpolationType::maybeConvertInitial()
return convertStyleColorPair(initialColor, initialColor);
}
-PassOwnPtr<InterpolationValue> CSSColorInterpolationType::maybeConvertInherit(const StyleResolverState* state, ConversionCheckers& conversionCheckers) const
+PassOwnPtr<InterpolationValue> CSSColorInterpolationType::maybeConvertInherit(const StyleResolverState& state, ConversionCheckers& conversionCheckers) const
{
- if (!state || !state->parentStyle())
+ if (!state.parentStyle())
return nullptr;
// Visited color can never explicitly inherit from parent visited color so only use the unvisited color.
- const StyleColor inheritedColor = ColorPropertyFunctions::getUnvisitedColor(cssProperty(), *state->parentStyle());
+ const StyleColor inheritedColor = ColorPropertyFunctions::getUnvisitedColor(cssProperty(), *state.parentStyle());
conversionCheckers.append(ParentColorChecker::create(*this, cssProperty(), inheritedColor));
return convertStyleColorPair(inheritedColor, inheritedColor);
}
@@ -189,7 +189,7 @@ enum InterpolableColorPairIndex {
InterpolableColorPairIndexCount,
};
-PassOwnPtr<InterpolationValue> CSSColorInterpolationType::maybeConvertValue(const CSSValue& value, const StyleResolverState* state, ConversionCheckers& conversionCheckers) const
+PassOwnPtr<InterpolationValue> CSSColorInterpolationType::maybeConvertValue(const CSSValue& value, const StyleResolverState& state, ConversionCheckers& conversionCheckers) const
{
if (cssProperty() == CSSPropertyColor && value.isPrimitiveValue() && toCSSPrimitiveValue(value).getValueID() == CSSValueCurrentcolor)
return maybeConvertInherit(state, conversionCheckers);

Powered by Google App Engine
This is Rietveld 408576698