SVGPatternElement.h [plain text]
#pragma once
#include "SVGAnimatedBoolean.h"
#include "SVGAnimatedEnumeration.h"
#include "SVGAnimatedLength.h"
#include "SVGAnimatedPreserveAspectRatio.h"
#include "SVGAnimatedRect.h"
#include "SVGAnimatedTransformList.h"
#include "SVGElement.h"
#include "SVGExternalResourcesRequired.h"
#include "SVGFitToViewBox.h"
#include "SVGNames.h"
#include "SVGTests.h"
#include "SVGURIReference.h"
#include "SVGUnitTypes.h"
namespace WebCore {
struct PatternAttributes;
class SVGPatternElement final : public SVGElement, public SVGURIReference, public SVGTests, public SVGExternalResourcesRequired, public SVGFitToViewBox {
public:
static Ref<SVGPatternElement> create(const QualifiedName&, Document&);
void collectPatternAttributes(PatternAttributes&) const;
AffineTransform localCoordinateSpaceTransform(SVGLocatable::CTMScope) const final;
Ref<SVGStringList> requiredFeatures();
Ref<SVGStringList> requiredExtensions();
Ref<SVGStringList> systemLanguage();
private:
SVGPatternElement(const QualifiedName&, Document&);
bool isValid() const final { return SVGTests::isValid(); }
bool needsPendingResourceHandling() const final { return false; }
static bool isSupportedAttribute(const QualifiedName&);
void parseAttribute(const QualifiedName&, const AtomicString&) final;
void svgAttributeChanged(const QualifiedName&) final;
void childrenChanged(const ChildChange&) final;
RenderPtr<RenderElement> createElementRenderer(RenderStyle&&, const RenderTreePosition&) final;
bool selfHasRelativeLengths() const final { return true; }
BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGPatternElement)
DECLARE_ANIMATED_LENGTH(X, x)
DECLARE_ANIMATED_LENGTH(Y, y)
DECLARE_ANIMATED_LENGTH(Width, width)
DECLARE_ANIMATED_LENGTH(Height, height)
DECLARE_ANIMATED_ENUMERATION(PatternUnits, patternUnits, SVGUnitTypes::SVGUnitType)
DECLARE_ANIMATED_ENUMERATION(PatternContentUnits, patternContentUnits, SVGUnitTypes::SVGUnitType)
DECLARE_ANIMATED_TRANSFORM_LIST(PatternTransform, patternTransform)
DECLARE_ANIMATED_STRING_OVERRIDE(Href, href)
DECLARE_ANIMATED_BOOLEAN_OVERRIDE(ExternalResourcesRequired, externalResourcesRequired)
DECLARE_ANIMATED_RECT(ViewBox, viewBox)
DECLARE_ANIMATED_PRESERVEASPECTRATIO(PreserveAspectRatio, preserveAspectRatio)
END_DECLARE_ANIMATED_PROPERTIES
void synchronizeRequiredFeatures() final { SVGTests::synchronizeRequiredFeatures(*this); }
void synchronizeRequiredExtensions() final { SVGTests::synchronizeRequiredExtensions(*this); }
void synchronizeSystemLanguage() final { SVGTests::synchronizeSystemLanguage(*this); }
};
}