OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> |
4 * Copyright (C) 2009 Apple Inc. All rights reserved. | 4 * Copyright (C) 2009 Apple Inc. All rights reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
11 * This library is distributed in the hope that it will be useful, | 11 * This library is distributed in the hope that it will be useful, |
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
14 * Library General Public License for more details. | 14 * Library General Public License for more details. |
15 * | 15 * |
16 * You should have received a copy of the GNU Library General Public License | 16 * You should have received a copy of the GNU Library General Public License |
17 * along with this library; see the file COPYING.LIB. If not, write to | 17 * along with this library; see the file COPYING.LIB. If not, write to |
18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
19 * Boston, MA 02110-1301, USA. | 19 * Boston, MA 02110-1301, USA. |
20 */ | 20 */ |
21 | 21 |
22 #ifndef SVGElement_h | 22 #ifndef SVGElement_h |
23 #define SVGElement_h | 23 #define SVGElement_h |
24 | 24 |
25 #include "core/dom/Element.h" | 25 #include "core/dom/Element.h" |
26 #include "core/svg/SVGAnimatedString.h" | 26 #include "core/svg/SVGAnimatedString.h" |
27 #include "core/svg/SVGLangSpace.h" | |
28 #include "core/svg/SVGParsingError.h" | 27 #include "core/svg/SVGParsingError.h" |
29 #include "core/svg/properties/SVGAnimatedPropertyMacros.h" | 28 #include "core/svg/properties/SVGAnimatedPropertyMacros.h" |
30 #include "core/svg/properties/SVGPropertyInfo.h" | 29 #include "core/svg/properties/SVGPropertyInfo.h" |
31 #include "platform/Timer.h" | 30 #include "platform/Timer.h" |
32 #include "wtf/HashMap.h" | 31 #include "wtf/HashMap.h" |
33 | 32 |
34 namespace WebCore { | 33 namespace WebCore { |
35 | 34 |
36 class AffineTransform; | 35 class AffineTransform; |
37 class CSSCursorImageValue; | 36 class CSSCursorImageValue; |
38 class Document; | 37 class Document; |
39 class SubtreeLayoutScope; | 38 class SubtreeLayoutScope; |
40 class SVGAttributeToPropertyMap; | 39 class SVGAttributeToPropertyMap; |
41 class SVGCursorElement; | 40 class SVGCursorElement; |
42 class SVGDocumentExtensions; | 41 class SVGDocumentExtensions; |
43 class SVGElementInstance; | 42 class SVGElementInstance; |
44 class SVGElementRareData; | 43 class SVGElementRareData; |
45 class SVGSVGElement; | 44 class SVGSVGElement; |
46 | 45 |
47 void mapAttributeToCSSProperty(HashMap<StringImpl*, CSSPropertyID>* propertyName
ToIdMap, const QualifiedName& attrName); | 46 void mapAttributeToCSSProperty(HashMap<StringImpl*, CSSPropertyID>* propertyName
ToIdMap, const QualifiedName& attrName); |
48 | 47 |
49 class SVGElement : public Element, public SVGLangSpace { | 48 class SVGElement : public Element { |
50 public: | 49 public: |
51 virtual ~SVGElement(); | 50 virtual ~SVGElement(); |
52 | 51 |
53 bool isOutermostSVGSVGElement() const; | 52 bool isOutermostSVGSVGElement() const; |
54 | 53 |
55 virtual String title() const; | 54 virtual String title() const; |
56 bool hasRelativeLengths() const { return !m_elementsWithRelativeLengths.isEm
pty(); } | 55 bool hasRelativeLengths() const { return !m_elementsWithRelativeLengths.isEm
pty(); } |
57 virtual bool supportsMarkers() const { return false; } | 56 virtual bool supportsMarkers() const { return false; } |
58 PassRefPtr<CSSValue> getPresentationAttribute(const String& name); | 57 PassRefPtr<CSSValue> getPresentationAttribute(const String& name); |
59 bool isKnownAttribute(const QualifiedName&); | |
60 static bool isAnimatableCSSProperty(const QualifiedName&); | 58 static bool isAnimatableCSSProperty(const QualifiedName&); |
61 enum CTMScope { | 59 enum CTMScope { |
62 NearestViewportScope, // Used by SVGGraphicsElement::getCTM() | 60 NearestViewportScope, // Used by SVGGraphicsElement::getCTM() |
63 ScreenScope // Used by SVGGraphicsElement::getScreenCTM() | 61 ScreenScope // Used by SVGGraphicsElement::getScreenCTM() |
64 }; | 62 }; |
65 virtual AffineTransform localCoordinateSpaceTransform(CTMScope) const; | 63 virtual AffineTransform localCoordinateSpaceTransform(CTMScope) const; |
66 virtual bool needsPendingResourceHandling() const { return true; } | 64 virtual bool needsPendingResourceHandling() const { return true; } |
67 | 65 |
68 bool instanceUpdatesBlocked() const; | 66 bool instanceUpdatesBlocked() const; |
69 void setInstanceUpdatesBlocked(bool); | 67 void setInstanceUpdatesBlocked(bool); |
70 | 68 |
71 String xmlbase() const; | 69 String xmlbase() const; |
72 void setXMLbase(const String&); | 70 void setXMLbase(const String&); |
73 | 71 |
| 72 String xmllang() const; |
| 73 void setXMLlang(const String& xmlLang); |
| 74 |
| 75 String xmlspace() const; |
| 76 void setXMLspace(const String& xmlSpace); |
| 77 |
74 SVGSVGElement* ownerSVGElement() const; | 78 SVGSVGElement* ownerSVGElement() const; |
75 SVGElement* viewportElement() const; | 79 SVGElement* viewportElement() const; |
76 | 80 |
77 SVGDocumentExtensions* accessDocumentSVGExtensions(); | 81 SVGDocumentExtensions* accessDocumentSVGExtensions(); |
78 | 82 |
79 virtual bool isSVGGraphicsElement() const { return false; } | 83 virtual bool isSVGGraphicsElement() const { return false; } |
80 virtual bool isSVGSVGElement() const { return false; } | 84 virtual bool isSVGSVGElement() const { return false; } |
81 virtual bool isFilterEffect() const { return false; } | 85 virtual bool isFilterEffect() const { return false; } |
82 virtual bool isGradientStop() const { return false; } | 86 virtual bool isGradientStop() const { return false; } |
83 virtual bool isTextContent() const { return false; } | 87 virtual bool isTextContent() const { return false; } |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 return DefaultHash<QualifiedName>::Hash::hash(key); | 237 return DefaultHash<QualifiedName>::Hash::hash(key); |
234 } | 238 } |
235 static bool equal(const QualifiedName& a, const QualifiedName& b) { return a
.matches(b); } | 239 static bool equal(const QualifiedName& a, const QualifiedName& b) { return a
.matches(b); } |
236 }; | 240 }; |
237 | 241 |
238 DEFINE_NODE_TYPE_CASTS(SVGElement, isSVGElement()); | 242 DEFINE_NODE_TYPE_CASTS(SVGElement, isSVGElement()); |
239 | 243 |
240 } | 244 } |
241 | 245 |
242 #endif | 246 #endif |
OLD | NEW |