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

Side by Side Diff: third_party/WebKit/Source/core/layout/svg/LayoutSVGText.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) 2006 Apple Computer, Inc. 2 * Copyright (C) 2006 Apple Computer, Inc.
3 * Copyright (C) 2006 Alexander Kellett <lypanov@kde.org> 3 * Copyright (C) 2006 Alexander Kellett <lypanov@kde.org>
4 * Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz> 4 * Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz>
5 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> 5 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org>
6 * Copyright (C) 2008 Rob Buis <buis@kde.org> 6 * Copyright (C) 2008 Rob Buis <buis@kde.org>
7 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> 7 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org>
8 * Copyright (C) Research In Motion Limited 2010-2012. All rights reserved. 8 * Copyright (C) Research In Motion Limited 2010-2012. All rights reserved.
9 * Copyright (C) 2012 Google Inc. 9 * Copyright (C) 2012 Google Inc.
10 * 10 *
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 continue; 159 continue;
160 LayoutSVGInlineText& text = toLayoutSVGInlineText(*descendant); 160 LayoutSVGInlineText& text = toLayoutSVGInlineText(*descendant);
161 text.updateScaledFont(); 161 text.updateScaledFont();
162 text.updateMetricsList(lastCharacterWasWhiteSpace); 162 text.updateMetricsList(lastCharacterWasWhiteSpace);
163 } 163 }
164 } 164 }
165 165
166 static inline void checkDescendantTextNodeConsistency( 166 static inline void checkDescendantTextNodeConsistency(
167 LayoutSVGText& text, 167 LayoutSVGText& text,
168 Vector<LayoutSVGInlineText*>& expectedDescendantTextNodes) { 168 Vector<LayoutSVGInlineText*>& expectedDescendantTextNodes) {
169 #if ENABLE(ASSERT) 169 #if DCHECK_IS_ON()
170 Vector<LayoutSVGInlineText*> newDescendantTextNodes; 170 Vector<LayoutSVGInlineText*> newDescendantTextNodes;
171 collectDescendantTextNodes(text, newDescendantTextNodes); 171 collectDescendantTextNodes(text, newDescendantTextNodes);
172 ASSERT(newDescendantTextNodes == expectedDescendantTextNodes); 172 ASSERT(newDescendantTextNodes == expectedDescendantTextNodes);
173 #endif 173 #endif
174 } 174 }
175 175
176 void LayoutSVGText::layout() { 176 void LayoutSVGText::layout() {
177 ASSERT(needsLayout()); 177 ASSERT(needsLayout());
178 // This flag is set and reset as needed only within this function. 178 // This flag is set and reset as needed only within this function.
179 ASSERT(!m_needsReordering); 179 ASSERT(!m_needsReordering);
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 411
412 void LayoutSVGText::invalidateTreeIfNeeded( 412 void LayoutSVGText::invalidateTreeIfNeeded(
413 const PaintInvalidationState& paintInvalidationState) { 413 const PaintInvalidationState& paintInvalidationState) {
414 // TODO(wangxianzhu): Verify if the inherited 414 // TODO(wangxianzhu): Verify if the inherited
415 // LayoutBoxModelObject::invalidateTreeIfNeeded() 415 // LayoutBoxModelObject::invalidateTreeIfNeeded()
416 // is applicable here. If yes, remove this overriding method. 416 // is applicable here. If yes, remove this overriding method.
417 LayoutObject::invalidateTreeIfNeeded(paintInvalidationState); 417 LayoutObject::invalidateTreeIfNeeded(paintInvalidationState);
418 } 418 }
419 419
420 } // namespace blink 420 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698