OSDN Git Service

Merge WebKit at r78450: Initial merge by git.
[android-x86/external-webkit.git] / Source / WebCore / svg / SVGTextElement.h
1 /*
2  * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org>
3  * Copyright (C) 2004, 2005, 2006, 2008 Rob Buis <buis@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 SVGTextElement_h
22 #define SVGTextElement_h
23
24 #if ENABLE(SVG)
25 #include "SVGAnimatedTransformList.h"
26 #include "SVGTextPositioningElement.h"
27 #include "SVGTransformable.h"
28
29 namespace WebCore {
30
31 class SVGTextElement : public SVGTextPositioningElement,
32                        public SVGTransformable {
33 public:
34     static PassRefPtr<SVGTextElement> create(const QualifiedName&, Document*);
35
36     virtual SVGElement* nearestViewportElement() const;
37     virtual SVGElement* farthestViewportElement() const;
38
39     virtual FloatRect getBBox(StyleUpdateStrategy = AllowStyleUpdate) const;
40     virtual AffineTransform getCTM(StyleUpdateStrategy = AllowStyleUpdate) const;
41     virtual AffineTransform getScreenCTM(StyleUpdateStrategy = AllowStyleUpdate) const;
42     virtual AffineTransform animatedLocalTransform() const;
43
44 private:
45     SVGTextElement(const QualifiedName&, Document*);
46
47     virtual void parseMappedAttribute(Attribute*);
48
49     virtual AffineTransform* supplementalTransform();
50     virtual AffineTransform localCoordinateSpaceTransform(SVGLocatable::CTMScope mode) const { return SVGTransformable::localCoordinateSpaceTransform(mode); }
51
52     virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
53     virtual bool childShouldCreateRenderer(Node*) const;
54             
55     virtual void svgAttributeChanged(const QualifiedName&);
56     virtual void synchronizeProperty(const QualifiedName&);
57     virtual void fillAttributeToPropertyTypeMap();
58     virtual AttributeToPropertyTypeMap& attributeToPropertyTypeMap();
59
60     // Animated property declarations
61     DECLARE_ANIMATED_TRANSFORM_LIST(Transform, transform)
62
63     // Used by <animateMotion>
64     OwnPtr<AffineTransform> m_supplementalTransform;
65 };
66
67 } // namespace WebCore
68
69 #endif // ENABLE(SVG)
70 #endif