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

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

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, 2007, 2008 Nikolas Zimmermann <zimmermann@kde .org> 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde .org>
3 * Copyright (C) 2004, 2005, 2006, 2008 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006, 2008 Rob Buis <buis@kde.org>
4 * Copyright (C) 2008 Apple Inc. All rights reserved. 4 * Copyright (C) 2008 Apple Inc. All rights reserved.
5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com>
6 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> 6 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au>
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 #include "wtf/TemporaryChange.h" 51 #include "wtf/TemporaryChange.h"
52 52
53 namespace WebCore { 53 namespace WebCore {
54 54
55 using namespace HTMLNames; 55 using namespace HTMLNames;
56 using namespace SVGNames; 56 using namespace SVGNames;
57 57
58 SVGElement::SVGElement(const QualifiedName& tagName, Document& document, Constru ctionType constructionType) 58 SVGElement::SVGElement(const QualifiedName& tagName, Document& document, Constru ctionType constructionType)
59 : Element(tagName, &document, constructionType) 59 : Element(tagName, &document, constructionType)
60 #if ASSERT_ENABLED 60 #if ENABLE(ASSERT)
61 , m_inRelativeLengthClientsInvalidation(false) 61 , m_inRelativeLengthClientsInvalidation(false)
62 #endif 62 #endif
63 // |m_isContextElement| must be initialized before |m_className|, as SVGAnim atedString tear-off c-tor currently set this to true. 63 // |m_isContextElement| must be initialized before |m_className|, as SVGAnim atedString tear-off c-tor currently set this to true.
64 , m_isContextElement(false) 64 , m_isContextElement(false)
65 , m_SVGRareData(nullptr) 65 , m_SVGRareData(nullptr)
66 , m_className(SVGAnimatedString::create(this, HTMLNames::classAttr, SVGStrin g::create())) 66 , m_className(SVGAnimatedString::create(this, HTMLNames::classAttr, SVGStrin g::create()))
67 { 67 {
68 ScriptWrappable::init(this); 68 ScriptWrappable::init(this);
69 addToPropertyMap(m_className); 69 addToPropertyMap(m_className);
70 setHasCustomStyleCallbacks(); 70 setHasCustomStyleCallbacks();
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 svgExtensions.removeSVGRootWithRelativeLengthDescendents(toSVGSVGEle ment(clientElement)); 409 svgExtensions.removeSVGRootWithRelativeLengthDescendents(toSVGSVGEle ment(clientElement));
410 } 410 }
411 } 411 }
412 412
413 void SVGElement::invalidateRelativeLengthClients(SubtreeLayoutScope* layoutScope ) 413 void SVGElement::invalidateRelativeLengthClients(SubtreeLayoutScope* layoutScope )
414 { 414 {
415 if (!inDocument()) 415 if (!inDocument())
416 return; 416 return;
417 417
418 ASSERT(!m_inRelativeLengthClientsInvalidation); 418 ASSERT(!m_inRelativeLengthClientsInvalidation);
419 #if ASSERT_ENABLED 419 #if ENABLE(ASSERT)
420 TemporaryChange<bool> inRelativeLengthClientsInvalidationChange(m_inRelative LengthClientsInvalidation, true); 420 TemporaryChange<bool> inRelativeLengthClientsInvalidationChange(m_inRelative LengthClientsInvalidation, true);
421 #endif 421 #endif
422 422
423 RenderObject* renderer = this->renderer(); 423 RenderObject* renderer = this->renderer();
424 if (renderer && selfHasRelativeLengths()) { 424 if (renderer && selfHasRelativeLengths()) {
425 if (renderer->isSVGResourceContainer()) 425 if (renderer->isSVGResourceContainer())
426 toRenderSVGResourceContainer(renderer)->invalidateCacheAndMarkForLay out(layoutScope); 426 toRenderSVGResourceContainer(renderer)->invalidateCacheAndMarkForLay out(layoutScope);
427 else 427 else
428 renderer->setNeedsLayoutAndFullPaintInvalidation(MarkContainingBlock Chain, layoutScope); 428 renderer->setNeedsLayoutAndFullPaintInvalidation(MarkContainingBlock Chain, layoutScope);
429 } 429 }
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
979 if (m_targetElement) 979 if (m_targetElement)
980 m_targetElement->setInstanceUpdatesBlocked(true); 980 m_targetElement->setInstanceUpdatesBlocked(true);
981 } 981 }
982 982
983 SVGElement::InstanceUpdateBlocker::~InstanceUpdateBlocker() 983 SVGElement::InstanceUpdateBlocker::~InstanceUpdateBlocker()
984 { 984 {
985 if (m_targetElement) 985 if (m_targetElement)
986 m_targetElement->setInstanceUpdatesBlocked(false); 986 m_targetElement->setInstanceUpdatesBlocked(false);
987 } 987 }
988 988
989 #ifndef NDEBUG 989 #if ENABLE(ASSERT)
990 bool SVGElement::isAnimatableAttribute(const QualifiedName& name) const 990 bool SVGElement::isAnimatableAttribute(const QualifiedName& name) const
991 { 991 {
992 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, animatableAttributes, ()); 992 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, animatableAttributes, ());
993 993
994 if (animatableAttributes.isEmpty()) { 994 if (animatableAttributes.isEmpty()) {
995 animatableAttributes.add(XLinkNames::hrefAttr); 995 animatableAttributes.add(XLinkNames::hrefAttr);
996 animatableAttributes.add(SVGNames::amplitudeAttr); 996 animatableAttributes.add(SVGNames::amplitudeAttr);
997 animatableAttributes.add(SVGNames::azimuthAttr); 997 animatableAttributes.add(SVGNames::azimuthAttr);
998 animatableAttributes.add(SVGNames::baseFrequencyAttr); 998 animatableAttributes.add(SVGNames::baseFrequencyAttr);
999 animatableAttributes.add(SVGNames::biasAttr); 999 animatableAttributes.add(SVGNames::biasAttr);
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
1164 Element::trace(visitor); 1164 Element::trace(visitor);
1165 } 1165 }
1166 1166
1167 const AtomicString& SVGElement::eventParameterName() 1167 const AtomicString& SVGElement::eventParameterName()
1168 { 1168 {
1169 DEFINE_STATIC_LOCAL(const AtomicString, evtString, ("evt", AtomicString::Con structFromLiteral)); 1169 DEFINE_STATIC_LOCAL(const AtomicString, evtString, ("evt", AtomicString::Con structFromLiteral));
1170 return evtString; 1170 return evtString;
1171 } 1171 }
1172 1172
1173 } 1173 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698