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

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

Issue 2640163004: Replace ENABLE(ASSERT) with DCHECK_IS_ON(). (Closed)
Patch Set: Created 3 years, 11 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann
3 * <zimmermann@kde.org> 3 * <zimmermann@kde.org>
4 * Copyright (C) 2004, 2005, 2006, 2008 Rob Buis <buis@kde.org> 4 * Copyright (C) 2004, 2005, 2006, 2008 Rob Buis <buis@kde.org>
5 * Copyright (C) 2008 Apple Inc. All rights reserved. 5 * Copyright (C) 2008 Apple Inc. All rights reserved.
6 * Copyright (C) 2008 Alp Toker <alp@atoker.com> 6 * Copyright (C) 2008 Alp Toker <alp@atoker.com>
7 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> 7 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au>
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 55
56 namespace blink { 56 namespace blink {
57 57
58 using namespace HTMLNames; 58 using namespace HTMLNames;
59 using namespace SVGNames; 59 using namespace SVGNames;
60 60
61 SVGElement::SVGElement(const QualifiedName& tagName, 61 SVGElement::SVGElement(const QualifiedName& tagName,
62 Document& document, 62 Document& document,
63 ConstructionType constructionType) 63 ConstructionType constructionType)
64 : Element(tagName, &document, constructionType), 64 : Element(tagName, &document, constructionType),
65 #if ENABLE(ASSERT)
66 m_inRelativeLengthClientsInvalidation(false),
67 #endif
68 m_SVGRareData(nullptr), 65 m_SVGRareData(nullptr),
69 m_className(SVGAnimatedString::create(this, HTMLNames::classAttr)) { 66 m_className(SVGAnimatedString::create(this, HTMLNames::classAttr)) {
70 addToPropertyMap(m_className); 67 addToPropertyMap(m_className);
71 setHasCustomStyleCallbacks(); 68 setHasCustomStyleCallbacks();
72 } 69 }
73 70
74 SVGElement::~SVGElement() { 71 SVGElement::~SVGElement() {
75 ASSERT(isConnected() || !hasRelativeLengths()); 72 ASSERT(isConnected() || !hasRelativeLengths());
76 } 73 }
77 74
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 toSVGSVGElement(clientElement)); 544 toSVGSVGElement(clientElement));
548 } 545 }
549 } 546 }
550 547
551 void SVGElement::invalidateRelativeLengthClients( 548 void SVGElement::invalidateRelativeLengthClients(
552 SubtreeLayoutScope* layoutScope) { 549 SubtreeLayoutScope* layoutScope) {
553 if (!isConnected()) 550 if (!isConnected())
554 return; 551 return;
555 552
556 ASSERT(!m_inRelativeLengthClientsInvalidation); 553 ASSERT(!m_inRelativeLengthClientsInvalidation);
557 #if ENABLE(ASSERT) 554 #if DCHECK_IS_ON()
558 AutoReset<bool> inRelativeLengthClientsInvalidationChange( 555 AutoReset<bool> inRelativeLengthClientsInvalidationChange(
559 &m_inRelativeLengthClientsInvalidation, true); 556 &m_inRelativeLengthClientsInvalidation, true);
560 #endif 557 #endif
561 558
562 if (LayoutObject* layoutObject = this->layoutObject()) { 559 if (LayoutObject* layoutObject = this->layoutObject()) {
563 if (hasRelativeLengths() && layoutObject->isSVGResourceContainer()) 560 if (hasRelativeLengths() && layoutObject->isSVGResourceContainer())
564 toLayoutSVGResourceContainer(layoutObject) 561 toLayoutSVGResourceContainer(layoutObject)
565 ->invalidateCacheAndMarkForLayout(layoutScope); 562 ->invalidateCacheAndMarkForLayout(layoutScope);
566 else if (selfHasRelativeLengths()) 563 else if (selfHasRelativeLengths())
567 layoutObject->setNeedsLayoutAndFullPaintInvalidation( 564 layoutObject->setNeedsLayoutAndFullPaintInvalidation(
(...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after
1287 visitor->trace(m_className); 1284 visitor->trace(m_className);
1288 Element::trace(visitor); 1285 Element::trace(visitor);
1289 } 1286 }
1290 1287
1291 const AtomicString& SVGElement::eventParameterName() { 1288 const AtomicString& SVGElement::eventParameterName() {
1292 DEFINE_STATIC_LOCAL(const AtomicString, evtString, ("evt")); 1289 DEFINE_STATIC_LOCAL(const AtomicString, evtString, ("evt"));
1293 return evtString; 1290 return evtString;
1294 } 1291 }
1295 1292
1296 } // namespace blink 1293 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698