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

Unified Diff: third_party/WebKit/Source/core/layout/MultiColumnFragmentainerGroup.cpp

Issue 2770123003: Replace ASSERT with DCHECK in core/layout/ excluding subdirs (Closed)
Patch Set: Split some DCHECKs and add DCHECK_ops wherever possible Created 3 years, 8 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/MultiColumnFragmentainerGroup.cpp
diff --git a/third_party/WebKit/Source/core/layout/MultiColumnFragmentainerGroup.cpp b/third_party/WebKit/Source/core/layout/MultiColumnFragmentainerGroup.cpp
index 11c9a64140b026fbf938342706f5ae18163e43b9..c805ca841d72289bd271d9b219982c8a1380b832 100644
--- a/third_party/WebKit/Source/core/layout/MultiColumnFragmentainerGroup.cpp
+++ b/third_party/WebKit/Source/core/layout/MultiColumnFragmentainerGroup.cpp
@@ -301,7 +301,7 @@ unsigned MultiColumnFragmentainerGroup::actualColumnCount() const {
// flowThreadPortionHeight may be saturated, so detect the remainder manually.
if (count * m_columnHeight < flowThreadPortionHeight)
count++;
- ASSERT(count >= 1);
+ DCHECK_GE(count, 1u);
return count;
}
@@ -369,9 +369,9 @@ LayoutUnit MultiColumnFragmentainerGroup::rebalanceColumnHeightIfNeeded()
// by the lowest amount of space.
LayoutUnit minSpaceShortage = shortageFinder.minimumSpaceShortage();
- ASSERT(minSpaceShortage > 0); // We should never _shrink_ the height!
- ASSERT(minSpaceShortage !=
- LayoutUnit::max()); // If this happens, we probably have a bug.
+ DCHECK_GT(minSpaceShortage, 0); // We should never _shrink_ the height!
+ DCHECK_NE(minSpaceShortage,
+ LayoutUnit::max()); // If this happens, we probably have a bug.
if (minSpaceShortage == LayoutUnit::max())
return m_columnHeight; // So bail out rather than looping infinitely.
@@ -578,7 +578,7 @@ void MultiColumnFragmentainerGroup::columnIntervalForVisualRect(
lastColumn = columnIndexAtVisualPoint(rect.minXMaxYCorner());
}
}
- ASSERT(firstColumn <= lastColumn);
+ DCHECK_LE(firstColumn, lastColumn);
}
MultiColumnFragmentainerGroupList::MultiColumnFragmentainerGroupList(

Powered by Google App Engine
This is Rietveld 408576698