InterpolationValue CSSColorInterpolationType::maybeConvertInherit(const StyleResolverState& state, ConversionCheckers& conversionCheckers) const { 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()); conversionCheckers.append(ParentColorChecker::create(cssProperty(), inheritedColor)); return convertStyleColorPair(inheritedColor, inheritedColor); }
InterpolationValue CSSColorInterpolationType::maybeConvertUnderlyingValue(const InterpolationEnvironment& environment) const { return convertStyleColorPair( ColorPropertyFunctions::getUnvisitedColor(cssProperty(), *environment.state().style()), ColorPropertyFunctions::getVisitedColor(cssProperty(), *environment.state().style())); }
InterpolationValue CSSColorInterpolationType::maybeConvertInitial(const StyleResolverState&, ConversionCheckers& conversionCheckers) const { const StyleColor initialColor = ColorPropertyFunctions::getInitialColor(cssProperty()); return convertStyleColorPair(initialColor, initialColor); }
InterpolationValue CSSColorInterpolationType::maybeConvertNeutral(const InterpolationValue&, ConversionCheckers&) const { return convertStyleColorPair(StyleColor(Color::transparent), StyleColor(Color::transparent)); }
PassOwnPtr<InterpolationValue> CSSColorInterpolationType::maybeConvertInitial() const { const StyleColor initialColor = ColorPropertyFunctions::getInitialColor(cssProperty()); return convertStyleColorPair(initialColor, initialColor); }
PassOwnPtr<InterpolationValue> CSSColorInterpolationType::maybeConvertNeutral(const UnderlyingValue&, ConversionCheckers&) const { return convertStyleColorPair(StyleColor(Color::transparent), StyleColor(Color::transparent)); }