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

Unified Diff: third_party/WebKit/Source/core/layout/svg/line/SVGInlineTextBox.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
« no previous file with comments | « third_party/WebKit/Source/core/layout/svg/SVGTextQuery.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/svg/line/SVGInlineTextBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/svg/line/SVGInlineTextBox.cpp b/third_party/WebKit/Source/core/layout/svg/line/SVGInlineTextBox.cpp
index 98cf34108bdf337dc66401b17fba3a5c86ac5720..c44accb44cd4d85ba95069af37c3b2bcd4d2f527 100644
--- a/third_party/WebKit/Source/core/layout/svg/line/SVGInlineTextBox.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/line/SVGInlineTextBox.cpp
@@ -73,7 +73,7 @@ int SVGInlineTextBox::offsetForPositionInFragment(
LineLayoutSVGInlineText(this->getLineLayoutItem());
float scalingFactor = lineLayoutItem.scalingFactor();
- ASSERT(scalingFactor);
+ DCHECK(scalingFactor);
const ComputedStyle& style = lineLayoutItem.styleRef();
@@ -103,13 +103,13 @@ FloatRect SVGInlineTextBox::selectionRectForTextFragment(
int startPosition,
int endPosition,
const ComputedStyle& style) const {
- ASSERT(startPosition < endPosition);
+ DCHECK_LT(startPosition, endPosition);
LineLayoutSVGInlineText lineLayoutItem =
LineLayoutSVGInlineText(this->getLineLayoutItem());
float scalingFactor = lineLayoutItem.scalingFactor();
- ASSERT(scalingFactor);
+ DCHECK(scalingFactor);
const Font& scaledFont = lineLayoutItem.scaledFont();
const SimpleFontData* fontData = scaledFont.primaryFont();
@@ -207,7 +207,7 @@ TextRun SVGInlineTextBox::constructTextRun(
// Propagate the maximum length of the characters buffer to the TextRun, even
// when we're only processing a substring.
run.setCharactersLength(text.textLength() - fragment.characterOffset);
- ASSERT(run.charactersLength() >= run.length());
+ DCHECK_GE(run.charactersLength(), run.length());
return run;
}
@@ -268,7 +268,7 @@ LayoutRect SVGInlineTextBox::calculateBoundaries() const {
return LayoutRect();
float scalingFactor = lineLayoutItem.scalingFactor();
- ASSERT(scalingFactor);
+ DCHECK(scalingFactor);
LayoutUnit baseline(fontData->getFontMetrics().floatAscent() / scalingFactor);
LayoutRect textBoundingRect;
@@ -284,7 +284,7 @@ bool SVGInlineTextBox::nodeAtPoint(HitTestResult& result,
LayoutUnit,
LayoutUnit) {
// FIXME: integrate with InlineTextBox::nodeAtPoint better.
- ASSERT(!isLineBreak());
+ DCHECK(!isLineBreak());
PointerEventsHitRules hitRules(PointerEventsHitRules::SVG_TEXT_HITTESTING,
result.hitTestRequest(),
« no previous file with comments | « third_party/WebKit/Source/core/layout/svg/SVGTextQuery.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698