BorderImageLengthBox CSSToStyleMap::mapNinePieceImageQuad(StyleResolverState& state, const CSSValue& value) { if (!value.isQuadValue()) return BorderImageLengthBox(Length(Auto)); const CSSQuadValue& slices = toCSSQuadValue(value); // Set up a border image length box to represent our image slices. return BorderImageLengthBox( toBorderImageLength(*slices.top(), state.cssToLengthConversionData()), toBorderImageLength(*slices.right(), state.cssToLengthConversionData()), toBorderImageLength(*slices.bottom(), state.cssToLengthConversionData()), toBorderImageLength(*slices.left(), state.cssToLengthConversionData())); }
BorderImageLengthBox CSSToStyleMap::mapNinePieceImageQuad(StyleResolverState& state, CSSValue* value) { if (!value || !value->isPrimitiveValue()) return BorderImageLengthBox(Length(Auto)); Quad* slices = toCSSPrimitiveValue(value)->getQuadValue(); // Set up a border image length box to represent our image slices. return BorderImageLengthBox( toBorderImageLength(*slices->top(), state.cssToLengthConversionData()), toBorderImageLength(*slices->right(), state.cssToLengthConversionData()), toBorderImageLength(*slices->bottom(), state.cssToLengthConversionData()), toBorderImageLength(*slices->left(), state.cssToLengthConversionData())); }
BorderImageLengthBox CSSToStyleMap::mapNinePieceImageQuad(CSSValue* value) const { if (!value || !value->isPrimitiveValue()) return BorderImageLengthBox(Length(Auto)); float zoom = useSVGZoomRules() ? 1.0f : cssToLengthConversionData().zoom(); Quad* slices = toCSSPrimitiveValue(value)->getQuadValue(); // Set up a border image length box to represent our image slices. const CSSToLengthConversionData& conversionData = cssToLengthConversionData().copyWithAdjustedZoom(zoom); return BorderImageLengthBox( toBorderImageLength(*slices->top(), conversionData), toBorderImageLength(*slices->right(), conversionData), toBorderImageLength(*slices->bottom(), conversionData), toBorderImageLength(*slices->left(), conversionData)); }