Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(32)

Side by Side Diff: Source/core/svg/SVGRectElement.h

Issue 112003003: [SVG] SVGLength{,List} migration to new SVG property impl. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix tests Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org>
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 16 matching lines...) Expand all
27 #include "core/svg/SVGExternalResourcesRequired.h" 27 #include "core/svg/SVGExternalResourcesRequired.h"
28 #include "core/svg/SVGGeometryElement.h" 28 #include "core/svg/SVGGeometryElement.h"
29 29
30 namespace WebCore { 30 namespace WebCore {
31 31
32 class SVGRectElement FINAL : public SVGGeometryElement, 32 class SVGRectElement FINAL : public SVGGeometryElement,
33 public SVGExternalResourcesRequired { 33 public SVGExternalResourcesRequired {
34 public: 34 public:
35 static PassRefPtr<SVGRectElement> create(Document&); 35 static PassRefPtr<SVGRectElement> create(Document&);
36 36
37 SVGAnimatedLength* x() const { return m_x.get(); }
38 SVGAnimatedLength* y() const { return m_y.get(); }
39 SVGAnimatedLength* width() const { return m_width.get(); }
40 SVGAnimatedLength* height() const { return m_height.get(); }
41 SVGAnimatedLength* rx() const { return m_rx.get(); }
42 SVGAnimatedLength* ry() const { return m_ry.get(); }
43
37 private: 44 private:
38 explicit SVGRectElement(Document&); 45 explicit SVGRectElement(Document&);
39 46
40 virtual bool isValid() const { return SVGTests::isValid(); } 47 virtual bool isValid() const { return SVGTests::isValid(); }
41 virtual bool supportsFocus() const OVERRIDE { return hasFocusEventListeners( ); } 48 virtual bool supportsFocus() const OVERRIDE { return hasFocusEventListeners( ); }
42 49
43 bool isSupportedAttribute(const QualifiedName&); 50 bool isSupportedAttribute(const QualifiedName&);
44 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR IDE; 51 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR IDE;
45 virtual void svgAttributeChanged(const QualifiedName&); 52 virtual void svgAttributeChanged(const QualifiedName&);
46 53
47 virtual bool selfHasRelativeLengths() const; 54 virtual bool selfHasRelativeLengths() const;
48 55
49 virtual RenderObject* createRenderer(RenderStyle*) OVERRIDE; 56 virtual RenderObject* createRenderer(RenderStyle*) OVERRIDE;
50 57
58 RefPtr<SVGAnimatedLength> m_x;
59 RefPtr<SVGAnimatedLength> m_y;
60 RefPtr<SVGAnimatedLength> m_width;
61 RefPtr<SVGAnimatedLength> m_height;
62 RefPtr<SVGAnimatedLength> m_rx;
63 RefPtr<SVGAnimatedLength> m_ry;
51 BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGRectElement) 64 BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGRectElement)
52 DECLARE_ANIMATED_LENGTH(X, x)
53 DECLARE_ANIMATED_LENGTH(Y, y)
54 DECLARE_ANIMATED_LENGTH(Width, width)
55 DECLARE_ANIMATED_LENGTH(Height, height)
56 DECLARE_ANIMATED_LENGTH(Rx, rx)
57 DECLARE_ANIMATED_LENGTH(Ry, ry)
58 DECLARE_ANIMATED_BOOLEAN(ExternalResourcesRequired, externalResourcesReq uired) 65 DECLARE_ANIMATED_BOOLEAN(ExternalResourcesRequired, externalResourcesReq uired)
59 END_DECLARE_ANIMATED_PROPERTIES 66 END_DECLARE_ANIMATED_PROPERTIES
60 }; 67 };
61 68
62 DEFINE_NODE_TYPE_CASTS(SVGRectElement, hasTagName(SVGNames::rectTag)); 69 DEFINE_NODE_TYPE_CASTS(SVGRectElement, hasTagName(SVGNames::rectTag));
63 70
64 } // namespace WebCore 71 } // namespace WebCore
65 72
66 #endif 73 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698