InterpolationValue CSSInterpolationType::maybeConvertSingle( const PropertySpecificKeyframe& keyframe, const InterpolationEnvironment& environment, const InterpolationValue& underlying, ConversionCheckers& conversionCheckers) const { const CSSValue* value = toCSSPropertySpecificKeyframe(keyframe).value(); if (!value) return maybeConvertNeutral(underlying, conversionCheckers); if (value->isVariableReferenceValue() || value->isPendingSubstitutionValue()) { bool omitAnimationTainted = false; const CSSValue* resolvedValue = CSSVariableResolver::resolveVariableReferences( environment.state(), cssProperty(), *value, omitAnimationTainted); conversionCheckers.push_back( ResolvedVariableChecker::create(cssProperty(), value, resolvedValue)); value = resolvedValue; } if (value->isInitialValue() || (value->isUnsetValue() && !CSSPropertyMetadata::isInheritedProperty(cssProperty()))) return maybeConvertInitial(environment.state(), conversionCheckers); if (value->isInheritedValue() || (value->isUnsetValue() && CSSPropertyMetadata::isInheritedProperty(cssProperty()))) return maybeConvertInherit(environment.state(), conversionCheckers); return maybeConvertValue(*value, environment.state(), conversionCheckers); }
InterpolationValue SVGInterpolationType::maybeConvertSingle(const PropertySpecificKeyframe& keyframe, const InterpolationEnvironment& environment, const InterpolationValue& underlying, ConversionCheckers& conversionCheckers) const { if (keyframe.isNeutral()) return maybeConvertNeutral(underlying, conversionCheckers); SVGPropertyBase* svgValue = environment.svgBaseValue().cloneForAnimation(toSVGPropertySpecificKeyframe(keyframe).value()); return maybeConvertSVGValue(*svgValue); }