#ifndef SVGLineElement_h
#define SVGLineElement_h
-#include "SVGNames.h"
+#include "core/SVGNames.h"
#include "core/svg/SVGAnimatedBoolean.h"
#include "core/svg/SVGAnimatedLength.h"
-#include "core/svg/SVGExternalResourcesRequired.h"
-#include "core/svg/SVGGraphicsElement.h"
+#include "core/svg/SVGGeometryElement.h"
-namespace WebCore {
+namespace blink {
-class SVGLineElement FINAL : public SVGGraphicsElement,
- public SVGExternalResourcesRequired {
+class SVGLineElement final : public SVGGeometryElement {
+ DEFINE_WRAPPERTYPEINFO();
public:
- static PassRefPtr<SVGLineElement> create(const QualifiedName&, Document&);
+ DECLARE_NODE_FACTORY(SVGLineElement);
-private:
- SVGLineElement(const QualifiedName&, Document&);
+ SVGAnimatedLength* x1() const { return m_x1.get(); }
+ SVGAnimatedLength* y1() const { return m_y1.get(); }
+ SVGAnimatedLength* x2() const { return m_x2.get(); }
+ SVGAnimatedLength* y2() const { return m_y2.get(); }
- virtual bool isValid() const { return SVGTests::isValid(); }
- virtual bool supportsFocus() const OVERRIDE { return hasFocusEventListeners(); }
+private:
+ explicit SVGLineElement(Document&);
bool isSupportedAttribute(const QualifiedName&);
- virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE;
- virtual void svgAttributeChanged(const QualifiedName&);
+ virtual void parseAttribute(const QualifiedName&, const AtomicString&) override;
+ virtual void svgAttributeChanged(const QualifiedName&) override;
- virtual bool supportsMarkers() const { return true; }
+ virtual bool selfHasRelativeLengths() const override;
- virtual bool selfHasRelativeLengths() const;
-
- BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGLineElement)
- DECLARE_ANIMATED_LENGTH(X1, x1)
- DECLARE_ANIMATED_LENGTH(Y1, y1)
- DECLARE_ANIMATED_LENGTH(X2, x2)
- DECLARE_ANIMATED_LENGTH(Y2, y2)
- DECLARE_ANIMATED_BOOLEAN(ExternalResourcesRequired, externalResourcesRequired)
- END_DECLARE_ANIMATED_PROPERTIES
+ RefPtr<SVGAnimatedLength> m_x1;
+ RefPtr<SVGAnimatedLength> m_y1;
+ RefPtr<SVGAnimatedLength> m_x2;
+ RefPtr<SVGAnimatedLength> m_y2;
};
-DEFINE_NODE_TYPE_CASTS(SVGLineElement, hasTagName(SVGNames::lineTag));
-
-} // namespace WebCore
+} // namespace blink
-#endif
+#endif // SVGLineElement_h