| OLD | NEW |
| 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 "core/SVGNames.h" | 24 #include "core/SVGNames.h" |
| 25 #include "core/svg/SVGAnimatedLengthList.h" | 25 #include "core/svg/SVGAnimatedLengthList.h" |
| 26 #include "core/svg/SVGAnimatedNumberList.h" | 26 #include "core/svg/SVGAnimatedNumberList.h" |
| 27 #include "core/svg/SVGTextContentElement.h" | 27 #include "core/svg/SVGTextContentElement.h" |
| 28 #include "platform/heap/Handle.h" |
| 28 | 29 |
| 29 namespace blink { | 30 namespace blink { |
| 30 | 31 |
| 31 class SVGTextPositioningElement : public SVGTextContentElement { | 32 class SVGTextPositioningElement : public SVGTextContentElement { |
| 32 DEFINE_WRAPPERTYPEINFO(); | 33 DEFINE_WRAPPERTYPEINFO(); |
| 33 public: | 34 public: |
| 34 static SVGTextPositioningElement* elementFromRenderer(RenderObject&); | 35 static SVGTextPositioningElement* elementFromRenderer(RenderObject&); |
| 35 | 36 |
| 36 SVGAnimatedLengthList* x() { return m_x.get(); } | 37 SVGAnimatedLengthList* x() { return m_x.get(); } |
| 37 SVGAnimatedLengthList* y() { return m_y.get(); } | 38 SVGAnimatedLengthList* y() { return m_y.get(); } |
| 38 SVGAnimatedLengthList* dx() { return m_dx.get(); } | 39 SVGAnimatedLengthList* dx() { return m_dx.get(); } |
| 39 SVGAnimatedLengthList* dy() { return m_dy.get(); } | 40 SVGAnimatedLengthList* dy() { return m_dy.get(); } |
| 40 SVGAnimatedNumberList* rotate() { return m_rotate.get(); } | 41 SVGAnimatedNumberList* rotate() { return m_rotate.get(); } |
| 41 | 42 |
| 43 virtual void trace(Visitor*) override; |
| 44 |
| 42 protected: | 45 protected: |
| 43 SVGTextPositioningElement(const QualifiedName&, Document&); | 46 SVGTextPositioningElement(const QualifiedName&, Document&); |
| 44 | 47 |
| 45 bool isSupportedAttribute(const QualifiedName&); | 48 bool isSupportedAttribute(const QualifiedName&); |
| 46 virtual void parseAttribute(const QualifiedName&, const AtomicString&) overr
ide final; | 49 virtual void parseAttribute(const QualifiedName&, const AtomicString&) overr
ide final; |
| 47 virtual void svgAttributeChanged(const QualifiedName&) override final; | 50 virtual void svgAttributeChanged(const QualifiedName&) override final; |
| 48 virtual bool isTextPositioning() const override final { return true; } | 51 virtual bool isTextPositioning() const override final { return true; } |
| 49 | 52 |
| 50 RefPtr<SVGAnimatedLengthList> m_x; | 53 RefPtrWillBeMember<SVGAnimatedLengthList> m_x; |
| 51 RefPtr<SVGAnimatedLengthList> m_y; | 54 RefPtrWillBeMember<SVGAnimatedLengthList> m_y; |
| 52 RefPtr<SVGAnimatedLengthList> m_dx; | 55 RefPtrWillBeMember<SVGAnimatedLengthList> m_dx; |
| 53 RefPtr<SVGAnimatedLengthList> m_dy; | 56 RefPtrWillBeMember<SVGAnimatedLengthList> m_dy; |
| 54 RefPtr<SVGAnimatedNumberList> m_rotate; | 57 RefPtrWillBeMember<SVGAnimatedNumberList> m_rotate; |
| 55 }; | 58 }; |
| 56 | 59 |
| 57 inline bool isSVGTextPositioningElement(const SVGElement& element) | 60 inline bool isSVGTextPositioningElement(const SVGElement& element) |
| 58 { | 61 { |
| 59 return element.isTextPositioning(); | 62 return element.isTextPositioning(); |
| 60 } | 63 } |
| 61 | 64 |
| 62 DEFINE_SVGELEMENT_TYPE_CASTS_WITH_FUNCTION(SVGTextPositioningElement); | 65 DEFINE_SVGELEMENT_TYPE_CASTS_WITH_FUNCTION(SVGTextPositioningElement); |
| 63 | 66 |
| 64 } // namespace blink | 67 } // namespace blink |
| 65 | 68 |
| 66 #endif // SVGTextPositioningElement_h | 69 #endif // SVGTextPositioningElement_h |
| OLD | NEW |