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

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

Issue 1321453012: Added allocator matcros to blink classes and structures in core/svg. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « Source/core/svg/SVGAnimatedRect.h ('k') | Source/core/svg/SVGPathSeg.h » ('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, 2014 Apple Inc. All rights reserved. 4 * Copyright (C) 2009, 2014 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 10 matching lines...) Expand all
21 21
22 #ifndef SVGElement_h 22 #ifndef SVGElement_h
23 #define SVGElement_h 23 #define SVGElement_h
24 24
25 #include "core/CoreExport.h" 25 #include "core/CoreExport.h"
26 #include "core/SVGNames.h" 26 #include "core/SVGNames.h"
27 #include "core/dom/Element.h" 27 #include "core/dom/Element.h"
28 #include "core/svg/SVGParsingError.h" 28 #include "core/svg/SVGParsingError.h"
29 #include "core/svg/properties/SVGPropertyInfo.h" 29 #include "core/svg/properties/SVGPropertyInfo.h"
30 #include "platform/heap/Handle.h" 30 #include "platform/heap/Handle.h"
31 #include "wtf/Allocator.h"
31 #include "wtf/HashMap.h" 32 #include "wtf/HashMap.h"
32 #include "wtf/OwnPtr.h" 33 #include "wtf/OwnPtr.h"
33 34
34 namespace blink { 35 namespace blink {
35 36
36 class AffineTransform; 37 class AffineTransform;
37 class CSSCursorImageValue; 38 class CSSCursorImageValue;
38 class Document; 39 class Document;
39 class SVGAnimatedPropertyBase; 40 class SVGAnimatedPropertyBase;
40 class SubtreeLayoutScope; 41 class SubtreeLayoutScope;
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 239
239 #if ENABLE(ASSERT) 240 #if ENABLE(ASSERT)
240 bool m_inRelativeLengthClientsInvalidation; 241 bool m_inRelativeLengthClientsInvalidation;
241 #endif 242 #endif
242 243
243 OwnPtrWillBeMember<SVGElementRareData> m_SVGRareData; 244 OwnPtrWillBeMember<SVGElementRareData> m_SVGRareData;
244 RefPtrWillBeMember<SVGAnimatedString> m_className; 245 RefPtrWillBeMember<SVGAnimatedString> m_className;
245 }; 246 };
246 247
247 struct SVGAttributeHashTranslator { 248 struct SVGAttributeHashTranslator {
249 STATIC_ONLY(SVGAttributeHashTranslator);
248 static unsigned hash(const QualifiedName& key) 250 static unsigned hash(const QualifiedName& key)
249 { 251 {
250 if (key.hasPrefix()) { 252 if (key.hasPrefix()) {
251 QualifiedNameComponents components = { nullAtom.impl(), key.localNam e().impl(), key.namespaceURI().impl() }; 253 QualifiedNameComponents components = { nullAtom.impl(), key.localNam e().impl(), key.namespaceURI().impl() };
252 return hashComponents(components); 254 return hashComponents(components);
253 } 255 }
254 return DefaultHash<QualifiedName>::Hash::hash(key); 256 return DefaultHash<QualifiedName>::Hash::hash(key);
255 } 257 }
256 static bool equal(const QualifiedName& a, const QualifiedName& b) { return a .matches(b); } 258 static bool equal(const QualifiedName& a, const QualifiedName& b) { return a .matches(b); }
257 }; 259 };
(...skipping 18 matching lines...) Expand all
276 template<typename T> inline bool is##thisType(const PassRefPtrWillBeRawPtr<T >& node) { return is##thisType(node.get()); } \ 278 template<typename T> inline bool is##thisType(const PassRefPtrWillBeRawPtr<T >& node) { return is##thisType(node.get()); } \
277 template<typename T> inline bool is##thisType(const RefPtrWillBeMember<T>& n ode) { return is##thisType(node.get()); } \ 279 template<typename T> inline bool is##thisType(const RefPtrWillBeMember<T>& n ode) { return is##thisType(node.get()); } \
278 template <> inline bool isElementOfType<const thisType>(const SVGElement& el ement) { return is##thisType(element); } \ 280 template <> inline bool isElementOfType<const thisType>(const SVGElement& el ement) { return is##thisType(element); } \
279 DEFINE_ELEMENT_TYPE_CASTS_WITH_FUNCTION(thisType) 281 DEFINE_ELEMENT_TYPE_CASTS_WITH_FUNCTION(thisType)
280 282
281 } // namespace blink 283 } // namespace blink
282 284
283 #include "core/SVGElementTypeHelpers.h" 285 #include "core/SVGElementTypeHelpers.h"
284 286
285 #endif // SVGElement_h 287 #endif // SVGElement_h
OLDNEW
« no previous file with comments | « Source/core/svg/SVGAnimatedRect.h ('k') | Source/core/svg/SVGPathSeg.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698