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 * |
(...skipping 22 matching lines...) Expand all Loading... |
33 | 33 |
34 namespace WebCore { | 34 namespace WebCore { |
35 | 35 |
36 class AffineTransform; | 36 class AffineTransform; |
37 class CSSCursorImageValue; | 37 class CSSCursorImageValue; |
38 class Document; | 38 class Document; |
39 class SVGAnimatedPropertyBase; | 39 class SVGAnimatedPropertyBase; |
40 class SubtreeLayoutScope; | 40 class SubtreeLayoutScope; |
41 class SVGCursorElement; | 41 class SVGCursorElement; |
42 class SVGDocumentExtensions; | 42 class SVGDocumentExtensions; |
| 43 class SVGElement; |
43 class SVGElementRareData; | 44 class SVGElementRareData; |
44 class SVGFitToViewBox; | 45 class SVGFitToViewBox; |
45 class SVGSVGElement; | 46 class SVGSVGElement; |
46 | 47 |
47 void mapAttributeToCSSProperty(HashMap<StringImpl*, CSSPropertyID>* propertyName
ToIdMap, const QualifiedName& attrName); | 48 void mapAttributeToCSSProperty(HashMap<StringImpl*, CSSPropertyID>* propertyName
ToIdMap, const QualifiedName& attrName); |
48 | 49 |
| 50 typedef WillBeHeapHashSet<RawPtrWillBeMember<SVGElement> > SVGElementSet; |
| 51 |
49 class SVGElement : public Element { | 52 class SVGElement : public Element { |
50 public: | 53 public: |
51 virtual ~SVGElement(); | 54 virtual ~SVGElement(); |
52 virtual void attach(const AttachContext&) OVERRIDE; | 55 virtual void attach(const AttachContext&) OVERRIDE; |
53 virtual void detach(const AttachContext&) OVERRIDE; | 56 virtual void detach(const AttachContext&) OVERRIDE; |
54 | 57 |
55 virtual short tabIndex() const OVERRIDE; | 58 virtual short tabIndex() const OVERRIDE; |
56 virtual bool supportsFocus() const OVERRIDE { return false; } | 59 virtual bool supportsFocus() const OVERRIDE { return false; } |
57 | 60 |
58 bool isOutermostSVGSVGElement() const; | 61 bool isOutermostSVGSVGElement() const; |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 | 155 |
153 bool isContextElement() const { return m_isContextElement; } | 156 bool isContextElement() const { return m_isContextElement; } |
154 void setContextElement() { m_isContextElement = true; } | 157 void setContextElement() { m_isContextElement = true; } |
155 | 158 |
156 void addToPropertyMap(PassRefPtr<SVGAnimatedPropertyBase>); | 159 void addToPropertyMap(PassRefPtr<SVGAnimatedPropertyBase>); |
157 | 160 |
158 SVGAnimatedString* className() { return m_className.get(); } | 161 SVGAnimatedString* className() { return m_className.get(); } |
159 | 162 |
160 bool inUseShadowTree() const; | 163 bool inUseShadowTree() const; |
161 | 164 |
| 165 SVGElementSet* setOfIncomingReferences() const; |
| 166 void addReferenceTo(SVGElement*); |
| 167 void rebuildAllIncomingReferences(); |
| 168 void removeAllIncomingReferences(); |
| 169 void removeAllOutgoingReferences(); |
| 170 |
162 class InvalidationGuard { | 171 class InvalidationGuard { |
163 STACK_ALLOCATED(); | 172 STACK_ALLOCATED(); |
164 WTF_MAKE_NONCOPYABLE(InvalidationGuard); | 173 WTF_MAKE_NONCOPYABLE(InvalidationGuard); |
165 public: | 174 public: |
166 InvalidationGuard(SVGElement* element) : m_element(element) { } | 175 InvalidationGuard(SVGElement* element) : m_element(element) { } |
167 ~InvalidationGuard() { m_element->invalidateInstances(); } | 176 ~InvalidationGuard() { m_element->invalidateInstances(); } |
168 | 177 |
169 private: | 178 private: |
170 RawPtrWillBeMember<SVGElement> m_element; | 179 RawPtrWillBeMember<SVGElement> m_element; |
171 }; | 180 }; |
(...skipping 28 matching lines...) Expand all Loading... |
200 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; | 209 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; |
201 virtual void removedFrom(ContainerNode*) OVERRIDE; | 210 virtual void removedFrom(ContainerNode*) OVERRIDE; |
202 virtual void childrenChanged(bool changedByParser = false, Node* beforeChang
e = 0, Node* afterChange = 0, int childCountDelta = 0) OVERRIDE; | 211 virtual void childrenChanged(bool changedByParser = false, Node* beforeChang
e = 0, Node* afterChange = 0, int childCountDelta = 0) OVERRIDE; |
203 | 212 |
204 static CSSPropertyID cssPropertyIdForSVGAttributeName(const QualifiedName&); | 213 static CSSPropertyID cssPropertyIdForSVGAttributeName(const QualifiedName&); |
205 void updateRelativeLengthsInformation() { updateRelativeLengthsInformation(s
elfHasRelativeLengths(), this); } | 214 void updateRelativeLengthsInformation() { updateRelativeLengthsInformation(s
elfHasRelativeLengths(), this); } |
206 void updateRelativeLengthsInformation(bool hasRelativeLengths, SVGElement*); | 215 void updateRelativeLengthsInformation(bool hasRelativeLengths, SVGElement*); |
207 | 216 |
208 virtual bool selfHasRelativeLengths() const { return false; } | 217 virtual bool selfHasRelativeLengths() const { return false; } |
209 | 218 |
210 // FIXME: This "friend" is temporary to keep the current |SVGDocumentExtensi
ons::*ReferencesFor*| methods. This will be removed after they are moved to SVGE
lement. | |
211 friend class SVGDocumentExtensions; | |
212 SVGElementRareData* ensureSVGRareData(); | 219 SVGElementRareData* ensureSVGRareData(); |
213 inline bool hasSVGRareData() const { return m_SVGRareData; } | 220 inline bool hasSVGRareData() const { return m_SVGRareData; } |
214 inline SVGElementRareData* svgRareData() const | 221 inline SVGElementRareData* svgRareData() const |
215 { | 222 { |
216 ASSERT(m_SVGRareData); | 223 ASSERT(m_SVGRareData); |
217 return m_SVGRareData.get(); | 224 return m_SVGRareData.get(); |
218 } | 225 } |
219 | 226 |
220 // SVGFitToViewBox::parseAttribute uses reportAttributeParsingError. | 227 // SVGFitToViewBox::parseAttribute uses reportAttributeParsingError. |
221 friend class SVGFitToViewBox; | 228 friend class SVGFitToViewBox; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 static bool equal(const QualifiedName& a, const QualifiedName& b) { return a
.matches(b); } | 268 static bool equal(const QualifiedName& a, const QualifiedName& b) { return a
.matches(b); } |
262 }; | 269 }; |
263 | 270 |
264 DEFINE_ELEMENT_TYPE_CASTS(SVGElement, isSVGElement()); | 271 DEFINE_ELEMENT_TYPE_CASTS(SVGElement, isSVGElement()); |
265 | 272 |
266 template <> inline bool isElementOfType<const SVGElement>(const Node& node) { re
turn node.isSVGElement(); } | 273 template <> inline bool isElementOfType<const SVGElement>(const Node& node) { re
turn node.isSVGElement(); } |
267 | 274 |
268 } | 275 } |
269 | 276 |
270 #endif | 277 #endif |
OLD | NEW |