OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2004, 2005, 2006, 2007, 2010 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2010 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 SVGSVGElement_h | 21 #ifndef SVGSVGElement_h |
22 #define SVGSVGElement_h | 22 #define SVGSVGElement_h |
23 | 23 |
24 #include "core/svg/SVGAnimatedBoolean.h" | 24 #include "core/svg/SVGAnimatedBoolean.h" |
25 #include "core/svg/SVGAnimatedLength.h" | 25 #include "core/svg/SVGAnimatedLength.h" |
26 #include "core/svg/SVGAnimatedPreserveAspectRatio.h" | 26 #include "core/svg/SVGAnimatedPreserveAspectRatio.h" |
27 #include "core/svg/SVGAnimatedRect.h" | 27 #include "core/svg/SVGAnimatedRect.h" |
28 #include "core/svg/SVGExternalResourcesRequired.h" | |
29 #include "core/svg/SVGFitToViewBox.h" | 28 #include "core/svg/SVGFitToViewBox.h" |
30 #include "core/svg/SVGGraphicsElement.h" | 29 #include "core/svg/SVGGraphicsElement.h" |
31 #include "core/svg/SVGZoomAndPan.h" | 30 #include "core/svg/SVGZoomAndPan.h" |
32 #include "wtf/WeakPtr.h" | 31 #include "wtf/WeakPtr.h" |
33 | 32 |
34 namespace WebCore { | 33 namespace WebCore { |
35 | 34 |
36 class SVGAngle; | 35 class SVGAngle; |
37 class SVGMatrix; | 36 class SVGMatrix; |
38 class SVGTransform; | 37 class SVGTransform; |
39 class SVGViewSpec; | 38 class SVGViewSpec; |
40 class SVGViewElement; | 39 class SVGViewElement; |
41 class SMILTimeContainer; | 40 class SMILTimeContainer; |
42 | 41 |
43 class SVGSVGElement FINAL : public SVGGraphicsElement, | 42 class SVGSVGElement FINAL : public SVGGraphicsElement, |
44 public SVGExternalResourcesRequired, | |
45 public SVGFitToViewBox, | 43 public SVGFitToViewBox, |
46 public SVGZoomAndPan { | 44 public SVGZoomAndPan { |
47 public: | 45 public: |
48 static PassRefPtr<SVGSVGElement> create(Document&); | 46 static PassRefPtr<SVGSVGElement> create(Document&); |
49 | 47 |
50 using SVGGraphicsElement::ref; | 48 using SVGGraphicsElement::ref; |
51 using SVGGraphicsElement::deref; | 49 using SVGGraphicsElement::deref; |
52 | 50 |
53 virtual bool isValid() const { return SVGTests::isValid(); } | 51 virtual bool isValid() const { return SVGTests::isValid(); } |
54 virtual bool supportsFocus() const OVERRIDE { return hasFocusEventListeners(
); } | 52 virtual bool supportsFocus() const OVERRIDE { return hasFocusEventListeners(
); } |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 CollectEnclosureList | 156 CollectEnclosureList |
159 }; | 157 }; |
160 | 158 |
161 PassRefPtr<NodeList> collectIntersectionOrEnclosureList(const SVGRect&, SVGE
lement*, CollectIntersectionOrEnclosure) const; | 159 PassRefPtr<NodeList> collectIntersectionOrEnclosureList(const SVGRect&, SVGE
lement*, CollectIntersectionOrEnclosure) const; |
162 | 160 |
163 BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGSVGElement) | 161 BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGSVGElement) |
164 DECLARE_ANIMATED_LENGTH(X, x) | 162 DECLARE_ANIMATED_LENGTH(X, x) |
165 DECLARE_ANIMATED_LENGTH(Y, y) | 163 DECLARE_ANIMATED_LENGTH(Y, y) |
166 DECLARE_ANIMATED_LENGTH(Width, width) | 164 DECLARE_ANIMATED_LENGTH(Width, width) |
167 DECLARE_ANIMATED_LENGTH(Height, height) | 165 DECLARE_ANIMATED_LENGTH(Height, height) |
168 DECLARE_ANIMATED_BOOLEAN(ExternalResourcesRequired, externalResourcesReq
uired) | |
169 DECLARE_ANIMATED_RECT(ViewBox, viewBox) | 166 DECLARE_ANIMATED_RECT(ViewBox, viewBox) |
170 DECLARE_ANIMATED_PRESERVEASPECTRATIO(PreserveAspectRatio, preserveAspect
Ratio) | 167 DECLARE_ANIMATED_PRESERVEASPECTRATIO(PreserveAspectRatio, preserveAspect
Ratio) |
171 END_DECLARE_ANIMATED_PROPERTIES | 168 END_DECLARE_ANIMATED_PROPERTIES |
172 | 169 |
173 virtual AffineTransform localCoordinateSpaceTransform(SVGElement::CTMScope)
const; | 170 virtual AffineTransform localCoordinateSpaceTransform(SVGElement::CTMScope)
const; |
174 | 171 |
175 bool m_useCurrentView; | 172 bool m_useCurrentView; |
176 SVGZoomAndPanType m_zoomAndPan; | 173 SVGZoomAndPanType m_zoomAndPan; |
177 RefPtr<SMILTimeContainer> m_timeContainer; | 174 RefPtr<SMILTimeContainer> m_timeContainer; |
178 SVGPoint m_translation; | 175 SVGPoint m_translation; |
179 RefPtr<SVGViewSpec> m_viewSpec; | 176 RefPtr<SVGViewSpec> m_viewSpec; |
180 WeakPtrFactory<SVGSVGElement> m_weakFactory; | 177 WeakPtrFactory<SVGSVGElement> m_weakFactory; |
181 }; | 178 }; |
182 | 179 |
183 inline bool isSVGSVGElement(const Node& node) | 180 inline bool isSVGSVGElement(const Node& node) |
184 { | 181 { |
185 return node.isSVGElement() && toSVGElement(node).isSVGSVGElement(); | 182 return node.isSVGElement() && toSVGElement(node).isSVGSVGElement(); |
186 } | 183 } |
187 | 184 |
188 DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION(SVGSVGElement); | 185 DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION(SVGSVGElement); |
189 | 186 |
190 } // namespace WebCore | 187 } // namespace WebCore |
191 | 188 |
192 #endif | 189 #endif |
OLD | NEW |