InterpolationValue CSSImageSliceInterpolationType::maybeConvertUnderlyingValue( const InterpolationEnvironment& environment) const { const ComputedStyle& style = *environment.state().style(); return convertImageSlice( ImageSlicePropertyFunctions::getImageSlice(cssProperty(), style), style.effectiveZoom()); }
InterpolationValue CSSImageSliceInterpolationType::maybeConvertNeutral(const InterpolationValue& underlying, ConversionCheckers& conversionCheckers) const { SliceTypes underlyingTypes = UnderlyingSliceTypesChecker::getUnderlyingSliceTypes(underlying); conversionCheckers.append(UnderlyingSliceTypesChecker::create(underlyingTypes)); LengthBox zeroBox( Length(0, underlyingTypes.isNumber[SideTop] ? Fixed : Percent), Length(0, underlyingTypes.isNumber[SideRight] ? Fixed : Percent), Length(0, underlyingTypes.isNumber[SideBottom] ? Fixed : Percent), Length(0, underlyingTypes.isNumber[SideLeft] ? Fixed : Percent)); return convertImageSlice(ImageSlice(zeroBox, underlyingTypes.fill), 1); }
InterpolationValue CSSImageSliceInterpolationType::maybeConvertInherit( const StyleResolverState& state, ConversionCheckers& conversionCheckers) const { const ImageSlice& inheritedImageSlice = ImageSlicePropertyFunctions::getImageSlice(cssProperty(), *state.parentStyle()); conversionCheckers.push_back(InheritedSliceTypesChecker::create( cssProperty(), SliceTypes(inheritedImageSlice))); return convertImageSlice(inheritedImageSlice, state.parentStyle()->effectiveZoom()); }
InterpolationValue CSSImageSliceInterpolationType::maybeConvertInitial(const StyleResolverState&, ConversionCheckers& conversionCheckers) const { return convertImageSlice(ImageSlicePropertyFunctions::getInitialImageSlice(cssProperty()), 1); }