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

Unified Diff: third_party/WebKit/Source/core/layout/svg/SVGTextChunkBuilder.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/SVGTextChunkBuilder.cpp
diff --git a/third_party/WebKit/Source/core/layout/svg/SVGTextChunkBuilder.cpp b/third_party/WebKit/Source/core/layout/svg/SVGTextChunkBuilder.cpp
index b51e4dcc71854511a173b45035e020900801027f..22908ea017228b2326d0206fe9c8e43babab656c 100644
--- a/third_party/WebKit/Source/core/layout/svg/SVGTextChunkBuilder.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/SVGTextChunkBuilder.cpp
@@ -126,7 +126,7 @@ void SVGTextChunkBuilder::processTextChunks(
if (!foundStart) {
foundStart = true;
} else {
- ASSERT(boxIter != chunkStartBox);
+ DCHECK_NE(boxIter, chunkStartBox);
handleTextChunk(chunkStartBox, boxIter);
}
chunkStartBox = boxIter;
@@ -168,7 +168,7 @@ static float computeTextLengthBias(const SVGTextFragment& fragment,
void SVGTextChunkBuilder::handleTextChunk(BoxListConstIterator boxStart,
BoxListConstIterator boxEnd) {
- ASSERT(*boxStart);
+ DCHECK(*boxStart);
const LineLayoutSVGInlineText textLineLayout =
LineLayoutSVGInlineText((*boxStart)->getLineLayoutItem());
@@ -225,7 +225,7 @@ void SVGTextChunkBuilder::handleTextChunk(BoxListConstIterator boxStart,
lengthAccumulator.processRange(boxStart, boxEnd);
}
} else {
- ASSERT(lengthAdjust == SVGLengthAdjustSpacingAndGlyphs);
+ DCHECK_EQ(lengthAdjust, SVGLengthAdjustSpacingAndGlyphs);
float textLengthScale = desiredTextLength / chunkLength;
float textLengthBias = 0;
@@ -281,7 +281,7 @@ void SVGTextChunkBuilder::applyTextLengthScaleAdjustment(
float textLengthBias,
Vector<SVGTextFragment>& fragments) {
for (SVGTextFragment& fragment : fragments) {
- ASSERT(fragment.lengthAdjustScale == 1);
+ DCHECK_EQ(fragment.lengthAdjustScale, 1u);
fragment.lengthAdjustScale = textLengthScale;
fragment.lengthAdjustBias = textLengthBias;
}

Powered by Google App Engine
This is Rietveld 408576698