1 /* 2 * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann (at) kde.org> 3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis (at) kde.org> 4 * 5 * This library is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU Library General Public 7 * License as published by the Free Software Foundation; either 8 * version 2 of the License, or (at your option) any later version. 9 * 10 * This library is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * Library General Public License for more details. 14 * 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 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 18 * Boston, MA 02110-1301, USA. 19 */ 20 21 #ifndef SVGTRefElement_h 22 #define SVGTRefElement_h 23 24 #include "core/svg/SVGTextPositioningElement.h" 25 #include "core/svg/SVGURIReference.h" 26 27 namespace WebCore { 28 29 class SVGTRefTargetEventListener; 30 31 class SVGTRefElement FINAL : public SVGTextPositioningElement, 32 public SVGURIReference { 33 public: 34 static PassRefPtr<SVGTRefElement> create(const QualifiedName&, Document*); 35 36 private: 37 friend class SVGTRefTargetEventListener; 38 39 SVGTRefElement(const QualifiedName&, Document*); 40 virtual ~SVGTRefElement(); 41 42 bool isSupportedAttribute(const QualifiedName&); 43 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 44 virtual void svgAttributeChanged(const QualifiedName&); 45 46 virtual RenderObject* createRenderer(RenderStyle*) OVERRIDE; 47 virtual bool childShouldCreateRenderer(const NodeRenderingContext&) const OVERRIDE; 48 virtual bool rendererIsNeeded(const NodeRenderingContext&) OVERRIDE; 49 50 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; 51 virtual void removedFrom(ContainerNode*) OVERRIDE; 52 53 void updateReferencedText(Element*); 54 55 void detachTarget(); 56 57 virtual void buildPendingResource(); 58 59 BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGTRefElement) 60 DECLARE_ANIMATED_STRING(Href, href) 61 END_DECLARE_ANIMATED_PROPERTIES 62 63 RefPtr<SVGTRefTargetEventListener> m_targetListener; 64 }; 65 66 } // namespace WebCore 67 68 #endif 69