예제 #1
0
InterpolationValue CSSImageInterpolationType::maybeConvertNeutral(
    const InterpolationValue& underlying,
    ConversionCheckers& conversionCheckers) const {
  conversionCheckers.append(UnderlyingImageChecker::create(underlying));
  return InterpolationValue(underlying.clone());
}
InterpolationValue CSSPaintInterpolationType::maybeConvertNeutral(const InterpolationValue&, ConversionCheckers&) const
{
    return InterpolationValue(CSSColorInterpolationType::createInterpolableColor(Color::transparent));
}
InterpolationValue CSSScaleInterpolationType::maybeConvertUnderlyingValue(
    const InterpolationEnvironment& environment) const {
  return InterpolationValue(
      Scale(environment.state().style()->scale()).createInterpolableValue());
}
static InterpolationValue convertKeyword(CSSValueID keyword) {
  return InterpolationValue(InterpolableList::create(0),
                            CSSSizeNonInterpolableValue::create(keyword));
}
InterpolationValue CSSScaleInterpolationType::maybeConvertInitial(
    const StyleResolverState&,
    ConversionCheckers&) const {
  return InterpolationValue(Scale(1, 1, 1).createInterpolableValue());
}
InterpolationValue CSSScaleInterpolationType::maybeConvertNeutral(
    const InterpolationValue&,
    ConversionCheckers&) const {
  return InterpolationValue(Scale(1, 1, 1).createInterpolableValue());
}
InterpolationValue SVGAngleInterpolationType::maybeConvertSVGValue(const SVGPropertyBase& svgValue) const
{
    if (toSVGAngle(svgValue).orientType()->enumValue() != SVGMarkerOrientAngle)
        return nullptr;
    return InterpolationValue(InterpolableNumber::create(toSVGAngle(svgValue).value()));
}
InterpolationValue SVGAngleInterpolationType::maybeConvertNeutral(const InterpolationValue&, ConversionCheckers&) const
{
    return InterpolationValue(InterpolableNumber::create(0));
}
예제 #9
0
InterpolationValue CSSNumberInterpolationType::createNumberValue(double number) const
{
    return InterpolationValue(InterpolableNumber::create(number));
}