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

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

Issue 133203003: Generate toSVGFooElement() for SVGFELight|AnimateMotion|FontFaceSrc|TextPositioningElement (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Modified 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2006, 2008 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006, 2008 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,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details. 13 * Library General Public License for more details.
14 * 14 *
15 * You should have received a copy of the GNU Library General Public License 15 * You should have received a copy of the GNU Library General Public License
16 * along with this library; see the file COPYING.LIB. If not, write to 16 * along with this library; see the file COPYING.LIB. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA. 18 * Boston, MA 02110-1301, USA.
19 */ 19 */
20 20
21 #ifndef SVGTextPositioningElement_h 21 #ifndef SVGTextPositioningElement_h
22 #define SVGTextPositioningElement_h 22 #define SVGTextPositioningElement_h
23 23
24 #include "SVGNames.h"
24 #include "core/svg/SVGAnimatedLengthList.h" 25 #include "core/svg/SVGAnimatedLengthList.h"
25 #include "core/svg/SVGAnimatedNumberList.h" 26 #include "core/svg/SVGAnimatedNumberList.h"
26 #include "core/svg/SVGTextContentElement.h" 27 #include "core/svg/SVGTextContentElement.h"
27 28
28 namespace WebCore { 29 namespace WebCore {
29 30
30 class SVGTextPositioningElement : public SVGTextContentElement { 31 class SVGTextPositioningElement : public SVGTextContentElement {
31 public: 32 public:
32 static SVGTextPositioningElement* elementFromRenderer(RenderObject*); 33 static SVGTextPositioningElement* elementFromRenderer(RenderObject*);
33 34
34 SVGAnimatedLengthList* x() const { return m_x.get(); } 35 SVGAnimatedLengthList* x() const { return m_x.get(); }
35 SVGAnimatedLengthList* y() const { return m_y.get(); } 36 SVGAnimatedLengthList* y() const { return m_y.get(); }
36 SVGAnimatedLengthList* dx() const { return m_dx.get(); } 37 SVGAnimatedLengthList* dx() const { return m_dx.get(); }
37 SVGAnimatedLengthList* dy() const { return m_dy.get(); } 38 SVGAnimatedLengthList* dy() const { return m_dy.get(); }
38 39
39 protected: 40 protected:
40 SVGTextPositioningElement(const QualifiedName&, Document&); 41 SVGTextPositioningElement(const QualifiedName&, Document&);
41 42
42 bool isSupportedAttribute(const QualifiedName&); 43 bool isSupportedAttribute(const QualifiedName&);
43 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR IDE FINAL; 44 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR IDE FINAL;
44 virtual void svgAttributeChanged(const QualifiedName&) OVERRIDE FINAL; 45 virtual void svgAttributeChanged(const QualifiedName&) OVERRIDE FINAL;
46 virtual bool isTextPositioning() const OVERRIDE FINAL { return true; }
45 47
46 RefPtr<SVGAnimatedLengthList> m_x; 48 RefPtr<SVGAnimatedLengthList> m_x;
47 RefPtr<SVGAnimatedLengthList> m_y; 49 RefPtr<SVGAnimatedLengthList> m_y;
48 RefPtr<SVGAnimatedLengthList> m_dx; 50 RefPtr<SVGAnimatedLengthList> m_dx;
49 RefPtr<SVGAnimatedLengthList> m_dy; 51 RefPtr<SVGAnimatedLengthList> m_dy;
50 BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGTextPositioningElement) 52 BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGTextPositioningElement)
51 DECLARE_ANIMATED_NUMBER_LIST(Rotate, rotate) 53 DECLARE_ANIMATED_NUMBER_LIST(Rotate, rotate)
52 END_DECLARE_ANIMATED_PROPERTIES 54 END_DECLARE_ANIMATED_PROPERTIES
53 }; 55 };
54 56
57 inline bool isSVGTextPositioningElement(const Node& node)
58 {
59 return node.isSVGElement() && toSVGElement(node).isTextPositioning();
60 }
61
62 DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION(SVGTextPositioningElement);
63
55 } // namespace WebCore 64 } // namespace WebCore
56 65
57 #endif 66 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698