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

Unified Diff: third_party/WebKit/Source/core/layout/svg/SVGTextLayoutEngineBaseline.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/SVGTextLayoutEngineBaseline.cpp
diff --git a/third_party/WebKit/Source/core/layout/svg/SVGTextLayoutEngineBaseline.cpp b/third_party/WebKit/Source/core/layout/svg/SVGTextLayoutEngineBaseline.cpp
index 680e8ead57c86615c420034ec868b928ba49b3e8..45742063fb90262ee2f11e2fa2afc6ba8893ae33 100644
--- a/third_party/WebKit/Source/core/layout/svg/SVGTextLayoutEngineBaseline.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/SVGTextLayoutEngineBaseline.cpp
@@ -28,7 +28,7 @@ namespace blink {
SVGTextLayoutEngineBaseline::SVGTextLayoutEngineBaseline(const Font& font,
float effectiveZoom)
: m_font(font), m_effectiveZoom(effectiveZoom) {
- ASSERT(m_effectiveZoom);
+ DCHECK(m_effectiveZoom);
}
float SVGTextLayoutEngineBaseline::calculateBaselineShift(
@@ -59,8 +59,8 @@ EAlignmentBaseline
SVGTextLayoutEngineBaseline::dominantBaselineToAlignmentBaseline(
bool isVerticalText,
LineLayoutItem textLineLayout) const {
- ASSERT(textLineLayout);
- ASSERT(textLineLayout.style());
+ DCHECK(textLineLayout);
+ DCHECK(textLineLayout.style());
const SVGComputedStyle& style = textLineLayout.style()->svgStyle();
@@ -79,11 +79,11 @@ SVGTextLayoutEngineBaseline::dominantBaselineToAlignmentBaseline(
// content.
return AB_ALPHABETIC;
case DB_NO_CHANGE:
- ASSERT(textLineLayout.parent());
+ DCHECK(textLineLayout.parent());
return dominantBaselineToAlignmentBaseline(isVerticalText,
textLineLayout.parent());
case DB_RESET_SIZE:
- ASSERT(textLineLayout.parent());
+ DCHECK(textLineLayout.parent());
return dominantBaselineToAlignmentBaseline(isVerticalText,
textLineLayout.parent());
case DB_IDEOGRAPHIC:
@@ -111,19 +111,20 @@ SVGTextLayoutEngineBaseline::dominantBaselineToAlignmentBaseline(
float SVGTextLayoutEngineBaseline::calculateAlignmentBaselineShift(
bool isVerticalText,
LineLayoutItem textLineLayout) const {
- ASSERT(textLineLayout);
- ASSERT(textLineLayout.style());
- ASSERT(textLineLayout.parent());
+ DCHECK(textLineLayout);
+ DCHECK(textLineLayout.style());
+ DCHECK(textLineLayout.parent());
LineLayoutItem textLineLayoutParent = textLineLayout.parent();
- ASSERT(textLineLayoutParent);
+ DCHECK(textLineLayoutParent);
EAlignmentBaseline baseline =
textLineLayout.style()->svgStyle().alignmentBaseline();
if (baseline == AB_AUTO || baseline == AB_BASELINE) {
baseline = dominantBaselineToAlignmentBaseline(isVerticalText,
textLineLayoutParent);
- ASSERT(baseline != AB_AUTO && baseline != AB_BASELINE);
+ DCHECK_NE(baseline, AB_AUTO);
+ DCHECK_NE(baseline, AB_BASELINE);
}
const SimpleFontData* fontData = m_font.primaryFont();

Powered by Google App Engine
This is Rietveld 408576698