Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Side by Side Diff: Source/core/svg/SVGElement.h

Issue 208133002: [SVG] Remove "New" prefix from properties implementation. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/svg/SVGBoolean.cpp ('k') | Source/core/svg/SVGElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 18 matching lines...) Expand all
29 #include "core/svg/properties/SVGPropertyInfo.h" 29 #include "core/svg/properties/SVGPropertyInfo.h"
30 #include "platform/Timer.h" 30 #include "platform/Timer.h"
31 #include "wtf/HashMap.h" 31 #include "wtf/HashMap.h"
32 #include "wtf/OwnPtr.h" 32 #include "wtf/OwnPtr.h"
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 NewSVGAnimatedPropertyBase; 39 class SVGAnimatedPropertyBase;
40 class SubtreeLayoutScope; 40 class SubtreeLayoutScope;
41 class SVGCursorElement; 41 class SVGCursorElement;
42 class SVGDocumentExtensions; 42 class SVGDocumentExtensions;
43 class SVGElementInstance; 43 class SVGElementInstance;
44 class SVGElementRareData; 44 class SVGElementRareData;
45 class SVGFitToViewBox; 45 class SVGFitToViewBox;
46 class SVGSVGElement; 46 class SVGSVGElement;
47 47
48 void mapAttributeToCSSProperty(HashMap<StringImpl*, CSSPropertyID>* propertyName ToIdMap, const QualifiedName& attrName); 48 void mapAttributeToCSSProperty(HashMap<StringImpl*, CSSPropertyID>* propertyName ToIdMap, const QualifiedName& attrName);
49 49
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 virtual bool isFilterEffect() const { return false; } 86 virtual bool isFilterEffect() const { return false; }
87 virtual bool isTextContent() const { return false; } 87 virtual bool isTextContent() const { return false; }
88 virtual bool isTextPositioning() const { return false; } 88 virtual bool isTextPositioning() const { return false; }
89 virtual bool isStructurallyExternal() const { return false; } 89 virtual bool isStructurallyExternal() const { return false; }
90 90
91 // For SVGTests 91 // For SVGTests
92 virtual bool isValid() const { return true; } 92 virtual bool isValid() const { return true; }
93 93
94 virtual void svgAttributeChanged(const QualifiedName&); 94 virtual void svgAttributeChanged(const QualifiedName&);
95 95
96 PassRefPtr<NewSVGAnimatedPropertyBase> propertyFromAttribute(const Qualified Name& attributeName); 96 PassRefPtr<SVGAnimatedPropertyBase> propertyFromAttribute(const QualifiedNam e& attributeName);
97 static AnimatedPropertyType animatedPropertyTypeForCSSAttribute(const Qualif iedName& attributeName); 97 static AnimatedPropertyType animatedPropertyTypeForCSSAttribute(const Qualif iedName& attributeName);
98 98
99 void sendSVGLoadEventIfPossible(bool sendParentLoadEvents = false); 99 void sendSVGLoadEventIfPossible(bool sendParentLoadEvents = false);
100 void sendSVGLoadEventIfPossibleAsynchronously(); 100 void sendSVGLoadEventIfPossibleAsynchronously();
101 void svgLoadEventTimerFired(Timer<SVGElement>*); 101 void svgLoadEventTimerFired(Timer<SVGElement>*);
102 virtual Timer<SVGElement>* svgLoadEventTimer(); 102 virtual Timer<SVGElement>* svgLoadEventTimer();
103 103
104 virtual AffineTransform* supplementalTransform() { return 0; } 104 virtual AffineTransform* supplementalTransform() { return 0; }
105 105
106 void invalidateSVGAttributes() { ensureUniqueElementData().m_animatedSVGAttr ibutesAreDirty = true; } 106 void invalidateSVGAttributes() { ensureUniqueElementData().m_animatedSVGAttr ibutesAreDirty = true; }
(...skipping 29 matching lines...) Expand all
136 virtual bool haveLoadedRequiredResources(); 136 virtual bool haveLoadedRequiredResources();
137 137
138 virtual bool addEventListener(const AtomicString& eventType, PassRefPtr<Even tListener>, bool useCapture = false) OVERRIDE FINAL; 138 virtual bool addEventListener(const AtomicString& eventType, PassRefPtr<Even tListener>, bool useCapture = false) OVERRIDE FINAL;
139 virtual bool removeEventListener(const AtomicString& eventType, EventListene r*, bool useCapture = false) OVERRIDE FINAL; 139 virtual bool removeEventListener(const AtomicString& eventType, EventListene r*, bool useCapture = false) OVERRIDE FINAL;
140 140
141 void invalidateRelativeLengthClients(SubtreeLayoutScope* = 0); 141 void invalidateRelativeLengthClients(SubtreeLayoutScope* = 0);
142 142
143 bool isContextElement() const { return m_isContextElement; } 143 bool isContextElement() const { return m_isContextElement; }
144 void setContextElement() { m_isContextElement = true; } 144 void setContextElement() { m_isContextElement = true; }
145 145
146 void addToPropertyMap(PassRefPtr<NewSVGAnimatedPropertyBase>); 146 void addToPropertyMap(PassRefPtr<SVGAnimatedPropertyBase>);
147 147
148 SVGAnimatedString* className() { return m_className.get(); } 148 SVGAnimatedString* className() { return m_className.get(); }
149 149
150 protected: 150 protected:
151 SVGElement(const QualifiedName&, Document&, ConstructionType = CreateSVGElem ent); 151 SVGElement(const QualifiedName&, Document&, ConstructionType = CreateSVGElem ent);
152 152
153 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR IDE; 153 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR IDE;
154 154
155 virtual void finishParsingChildren() OVERRIDE; 155 virtual void finishParsingChildren() OVERRIDE;
156 virtual void attributeChanged(const QualifiedName&, const AtomicString&, Att ributeModificationReason = ModifiedDirectly) OVERRIDE; 156 virtual void attributeChanged(const QualifiedName&, const AtomicString&, Att ributeModificationReason = ModifiedDirectly) OVERRIDE;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 void buildPendingResourcesIfNeeded(); 196 void buildPendingResourcesIfNeeded();
197 197
198 void mapInstanceToElement(SVGElementInstance*); 198 void mapInstanceToElement(SVGElementInstance*);
199 void removeInstanceMapping(SVGElementInstance*); 199 void removeInstanceMapping(SVGElementInstance*);
200 200
201 void cleanupAnimatedProperties(); 201 void cleanupAnimatedProperties();
202 friend class CleanUpAnimatedPropertiesCaller; 202 friend class CleanUpAnimatedPropertiesCaller;
203 203
204 HashSet<SVGElement*> m_elementsWithRelativeLengths; 204 HashSet<SVGElement*> m_elementsWithRelativeLengths;
205 205
206 typedef HashMap<QualifiedName, RefPtr<NewSVGAnimatedPropertyBase> > Attribut eToPropertyMap; 206 typedef HashMap<QualifiedName, RefPtr<SVGAnimatedPropertyBase> > AttributeTo PropertyMap;
207 AttributeToPropertyMap m_newAttributeToPropertyMap; 207 AttributeToPropertyMap m_newAttributeToPropertyMap;
208 208
209 #if !ASSERT_DISABLED 209 #if !ASSERT_DISABLED
210 bool m_inRelativeLengthClientsInvalidation; 210 bool m_inRelativeLengthClientsInvalidation;
211 #endif 211 #endif
212 unsigned m_isContextElement : 1; 212 unsigned m_isContextElement : 1;
213 unsigned m_hasSVGRareData : 1; 213 unsigned m_hasSVGRareData : 1;
214 214
215 RefPtr<SVGAnimatedString> m_className; 215 RefPtr<SVGAnimatedString> m_className;
216 }; 216 };
(...skipping 10 matching lines...) Expand all
227 static bool equal(const QualifiedName& a, const QualifiedName& b) { return a .matches(b); } 227 static bool equal(const QualifiedName& a, const QualifiedName& b) { return a .matches(b); }
228 }; 228 };
229 229
230 DEFINE_ELEMENT_TYPE_CASTS(SVGElement, isSVGElement()); 230 DEFINE_ELEMENT_TYPE_CASTS(SVGElement, isSVGElement());
231 231
232 template <> inline bool isElementOfType<const SVGElement>(const Node& node) { re turn node.isSVGElement(); } 232 template <> inline bool isElementOfType<const SVGElement>(const Node& node) { re turn node.isSVGElement(); }
233 233
234 } 234 }
235 235
236 #endif 236 #endif
OLDNEW
« no previous file with comments | « Source/core/svg/SVGBoolean.cpp ('k') | Source/core/svg/SVGElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698