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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutMultiColumnSet.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/LayoutMultiColumnSet.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutMultiColumnSet.cpp b/third_party/WebKit/Source/core/layout/LayoutMultiColumnSet.cpp
index 1f7f5a587362c7f48ddbff40d8c8edce312bb0ab..dd23c8866b0b0d3aadb52f9fd48f4de249ebc7ad 100644
--- a/third_party/WebKit/Source/core/layout/LayoutMultiColumnSet.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutMultiColumnSet.cpp
@@ -53,7 +53,7 @@ LayoutMultiColumnSet* LayoutMultiColumnSet::createAnonymous(
unsigned LayoutMultiColumnSet::fragmentainerGroupIndexAtFlowThreadOffset(
LayoutUnit flowThreadOffset,
PageBoundaryRule rule) const {
- ASSERT(m_fragmentainerGroups.size() > 0);
+ DCHECK_GT(m_fragmentainerGroups.size(), 0u);
if (flowThreadOffset <= 0)
return 0;
// TODO(mstensho): Introduce an interval tree or similar to speed up this.
@@ -74,7 +74,7 @@ unsigned LayoutMultiColumnSet::fragmentainerGroupIndexAtFlowThreadOffset(
const MultiColumnFragmentainerGroup&
LayoutMultiColumnSet::fragmentainerGroupAtVisualPoint(
const LayoutPoint& visualPoint) const {
- ASSERT(m_fragmentainerGroups.size() > 0);
+ DCHECK_GT(m_fragmentainerGroups.size(), 0u);
LayoutUnit blockOffset =
isHorizontalWritingMode() ? visualPoint.y() : visualPoint.x();
for (unsigned index = 0; index < m_fragmentainerGroups.size(); index++) {
@@ -183,7 +183,7 @@ bool LayoutMultiColumnSet::newFragmentainerGroupsAllowed() const {
LayoutUnit LayoutMultiColumnSet::nextLogicalTopForUnbreakableContent(
LayoutUnit flowThreadOffset,
LayoutUnit contentLogicalHeight) const {
- ASSERT(flowThreadOffset.mightBeSaturated() ||
+ DCHECK(flowThreadOffset.mightBeSaturated() ||
pageLogicalTopForOffset(flowThreadOffset) == flowThreadOffset);
FragmentationContext* enclosingFragmentationContext =
multiColumnFlowThread()->enclosingFragmentationContext();
@@ -195,7 +195,7 @@ LayoutUnit LayoutMultiColumnSet::nextLogicalTopForUnbreakableContent(
// Assert the problematic situation. If we have no problem with the column
// height, why are we even here?
- ASSERT(pageLogicalHeightForOffset(flowThreadOffset) < contentLogicalHeight);
+ DCHECK_LT(pageLogicalHeightForOffset(flowThreadOffset), contentLogicalHeight);
// There's a likelihood for subsequent rows to be taller than the first one.
// TODO(mstensho): if we're doubly nested (e.g. multicol in multicol in

Powered by Google App Engine
This is Rietveld 408576698