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

Unified Diff: third_party/WebKit/Source/core/layout/svg/SVGTextLayoutAttributesBuilder.cpp

Issue 2748103015: Replace ASSERT with DCHECK in core/layout/<sub dirs> (Closed)
Patch Set: Rebase with latest Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/svg/SVGTextLayoutAttributesBuilder.cpp
diff --git a/third_party/WebKit/Source/core/layout/svg/SVGTextLayoutAttributesBuilder.cpp b/third_party/WebKit/Source/core/layout/svg/SVGTextLayoutAttributesBuilder.cpp
index 36f2aab9cf62db65e9e975960539798f9953eb41..11ec151fa171ab27edcf4e949c1211a9daafba7d 100644
--- a/third_party/WebKit/Source/core/layout/svg/SVGTextLayoutAttributesBuilder.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/SVGTextLayoutAttributesBuilder.cpp
@@ -100,11 +100,11 @@ static inline unsigned countCharactersInTextNode(
static SVGTextPositioningElement* positioningElementFromLayoutObject(
LayoutObject& layoutObject) {
- ASSERT(layoutObject.isSVGText() || layoutObject.isSVGInline());
+ DCHECK(layoutObject.isSVGText() || layoutObject.isSVGInline());
Node* node = layoutObject.node();
- ASSERT(node);
- ASSERT(node->isSVGElement());
+ DCHECK(node);
+ DCHECK(node->isSVGElement());
return isSVGTextPositioningElement(*node) ? toSVGTextPositioningElement(node)
: nullptr;
@@ -112,7 +112,7 @@ static SVGTextPositioningElement* positioningElementFromLayoutObject(
void SVGTextLayoutAttributesBuilder::collectTextPositioningElements(
LayoutBoxModelObject& start) {
- ASSERT(!start.isSVGText() || m_textPositions.isEmpty());
+ DCHECK(!start.isSVGText() || m_textPositions.isEmpty());
SVGTextPositioningElement* element =
positioningElementFromLayoutObject(start);
unsigned atPosition = m_textPositions.size();
@@ -138,7 +138,7 @@ void SVGTextLayoutAttributesBuilder::collectTextPositioningElements(
// Compute the length of the subtree after all children have been visited.
TextPosition& position = m_textPositions[atPosition];
- ASSERT(!position.length);
+ DCHECK(!position.length);
position.length = m_characterCount - position.start;
}

Powered by Google App Engine
This is Rietveld 408576698