SVGLengthListValues.h [plain text]
#pragma once
#include "SVGLengthValue.h"
#include <wtf/Vector.h>
namespace WebCore {
class SVGLength;
class SVGLengthList;
class SVGLengthListValues final : public Vector<SVGLengthValue> {
public:
void parse(const String& value, SVGLengthMode);
String valueAsString() const;
};
template<>
struct SVGPropertyTraits<SVGLengthListValues> {
static SVGLengthListValues initialValue() { return { }; }
static SVGLengthListValues fromString(const String& string, SVGLengthMode lengthMode)
{
SVGLengthListValues list;
list.parse(string, lengthMode);
return list;
}
static Optional<SVGLengthListValues> parse(const QualifiedName& attrName, const String& string)
{
SVGLengthListValues list;
list.parse(string, SVGLengthValue::lengthModeForAnimatedLengthAttribute(attrName));
return list;
}
static String toString(const SVGLengthListValues& type) { return type.valueAsString(); }
using ListItemType = SVGLengthValue;
using ListItemTearOff = SVGLength;
using ListPropertyTearOff = SVGLengthList;
};
}