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

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

Issue 397733004: Allow assertions to be enabled in Blink Release builds. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed config.gni. Minor cleanups. Created 6 years, 5 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
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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 SVGUseElement* correspondingUseElement() const; 123 SVGUseElement* correspondingUseElement() const;
124 124
125 void synchronizeAnimatedSVGAttribute(const QualifiedName&) const; 125 void synchronizeAnimatedSVGAttribute(const QualifiedName&) const;
126 126
127 virtual PassRefPtr<RenderStyle> customStyleForRenderer() OVERRIDE FINAL; 127 virtual PassRefPtr<RenderStyle> customStyleForRenderer() OVERRIDE FINAL;
128 128
129 virtual void synchronizeRequiredFeatures() { } 129 virtual void synchronizeRequiredFeatures() { }
130 virtual void synchronizeRequiredExtensions() { } 130 virtual void synchronizeRequiredExtensions() { }
131 virtual void synchronizeSystemLanguage() { } 131 virtual void synchronizeSystemLanguage() { }
132 132
133 #ifndef NDEBUG 133 #if ENABLE(ASSERT)
134 virtual bool isAnimatableAttribute(const QualifiedName&) const; 134 virtual bool isAnimatableAttribute(const QualifiedName&) const;
135 #endif 135 #endif
136 136
137 MutableStylePropertySet* animatedSMILStyleProperties() const; 137 MutableStylePropertySet* animatedSMILStyleProperties() const;
138 MutableStylePropertySet* ensureAnimatedSMILStyleProperties(); 138 MutableStylePropertySet* ensureAnimatedSMILStyleProperties();
139 void setUseOverrideComputedStyle(bool); 139 void setUseOverrideComputedStyle(bool);
140 140
141 virtual bool haveLoadedRequiredResources(); 141 virtual bool haveLoadedRequiredResources();
142 142
143 virtual bool addEventListener(const AtomicString& eventType, PassRefPtr<Even tListener>, bool useCapture = false) OVERRIDE FINAL; 143 virtual bool addEventListener(const AtomicString& eventType, PassRefPtr<Even tListener>, bool useCapture = false) OVERRIDE FINAL;
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 virtual RenderStyle* virtualComputedStyle(PseudoId pseudoElementSpecifier = NOPSEUDO) OVERRIDE FINAL { return computedStyle(pseudoElementSpecifier); } 230 virtual RenderStyle* virtualComputedStyle(PseudoId pseudoElementSpecifier = NOPSEUDO) OVERRIDE FINAL { return computedStyle(pseudoElementSpecifier); }
231 virtual void willRecalcStyle(StyleRecalcChange) OVERRIDE; 231 virtual void willRecalcStyle(StyleRecalcChange) OVERRIDE;
232 232
233 void buildPendingResourcesIfNeeded(); 233 void buildPendingResourcesIfNeeded();
234 234
235 WillBeHeapHashSet<RawPtrWillBeWeakMember<SVGElement> > m_elementsWithRelativ eLengths; 235 WillBeHeapHashSet<RawPtrWillBeWeakMember<SVGElement> > m_elementsWithRelativ eLengths;
236 236
237 typedef HashMap<QualifiedName, RefPtr<SVGAnimatedPropertyBase> > AttributeTo PropertyMap; 237 typedef HashMap<QualifiedName, RefPtr<SVGAnimatedPropertyBase> > AttributeTo PropertyMap;
238 AttributeToPropertyMap m_newAttributeToPropertyMap; 238 AttributeToPropertyMap m_newAttributeToPropertyMap;
239 239
240 #if ASSERT_ENABLED 240 #if ENABLE(ASSERT)
241 bool m_inRelativeLengthClientsInvalidation; 241 bool m_inRelativeLengthClientsInvalidation;
242 #endif 242 #endif
243 unsigned m_isContextElement : 1; 243 unsigned m_isContextElement : 1;
244 244
245 OwnPtrWillBeMember<SVGElementRareData> m_SVGRareData; 245 OwnPtrWillBeMember<SVGElementRareData> m_SVGRareData;
246 RefPtr<SVGAnimatedString> m_className; 246 RefPtr<SVGAnimatedString> m_className;
247 }; 247 };
248 248
249 struct SVGAttributeHashTranslator { 249 struct SVGAttributeHashTranslator {
250 static unsigned hash(const QualifiedName& key) 250 static unsigned hash(const QualifiedName& key)
251 { 251 {
252 if (key.hasPrefix()) { 252 if (key.hasPrefix()) {
253 QualifiedNameComponents components = { nullAtom.impl(), key.localNam e().impl(), key.namespaceURI().impl() }; 253 QualifiedNameComponents components = { nullAtom.impl(), key.localNam e().impl(), key.namespaceURI().impl() };
254 return hashComponents(components); 254 return hashComponents(components);
255 } 255 }
256 return DefaultHash<QualifiedName>::Hash::hash(key); 256 return DefaultHash<QualifiedName>::Hash::hash(key);
257 } 257 }
258 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); }
259 }; 259 };
260 260
261 DEFINE_ELEMENT_TYPE_CASTS(SVGElement, isSVGElement()); 261 DEFINE_ELEMENT_TYPE_CASTS(SVGElement, isSVGElement());
262 262
263 template <> inline bool isElementOfType<const SVGElement>(const Node& node) { re turn node.isSVGElement(); } 263 template <> inline bool isElementOfType<const SVGElement>(const Node& node) { re turn node.isSVGElement(); }
264 264
265 } 265 }
266 266
267 #endif 267 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698