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

Unified Diff: third_party/WebKit/Source/core/layout/ColumnBalancer.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/ColumnBalancer.cpp
diff --git a/third_party/WebKit/Source/core/layout/ColumnBalancer.cpp b/third_party/WebKit/Source/core/layout/ColumnBalancer.cpp
index 0dfd5d3b4f569d501836f8eb3bce19a16af2f538..d7aeba04b698b7273d75254f816f2b2ff43beaa6 100644
--- a/third_party/WebKit/Source/core/layout/ColumnBalancer.cpp
+++ b/third_party/WebKit/Source/core/layout/ColumnBalancer.cpp
@@ -21,7 +21,7 @@ ColumnBalancer::ColumnBalancer(const LayoutMultiColumnSet& columnSet,
void ColumnBalancer::traverse() {
traverseSubtree(*columnSet().flowThread());
- ASSERT(!flowThreadOffset());
+ DCHECK(!flowThreadOffset());
}
void ColumnBalancer::traverseSubtree(const LayoutBox& box) {
@@ -243,7 +243,7 @@ void InitialColumnHeightFinder::examineLine(const RootInlineBox& line) {
minimumLogialHeight += lineTopInFlowThread;
m_tallestUnbreakableLogicalHeight =
std::max(m_tallestUnbreakableLogicalHeight, minimumLogialHeight);
- ASSERT(
+ DCHECK(
isFirstAfterBreak(lineTopInFlowThread) || !line.paginationStrut() ||
!isLogicalTopWithinBounds(lineTopInFlowThread - line.paginationStrut()));
if (isFirstAfterBreak(lineTopInFlowThread) &&
@@ -257,7 +257,7 @@ void InitialColumnHeightFinder::recordStrutBeforeOffset(
LayoutUnit offsetInFlowThread,
LayoutUnit strut) {
unsigned columnCount = columnSet().usedColumnCount();
- ASSERT(m_shortestStruts.size() == columnCount);
+ DCHECK_EQ(m_shortestStruts.size(), columnCount);
unsigned index = groupAtOffset(offsetInFlowThread)
.columnIndexAtOffset(offsetInFlowThread - strut,
LayoutBox::AssociateWithFormerPage);
@@ -274,7 +274,7 @@ LayoutUnit InitialColumnHeightFinder::spaceUsedByStrutsAt(
LayoutBox::AssociateWithLatterPage) +
1;
stopBeforeColumn = std::min(stopBeforeColumn, columnSet().usedColumnCount());
- ASSERT(stopBeforeColumn <= m_shortestStruts.size());
+ DCHECK_LE(stopBeforeColumn, m_shortestStruts.size());
LayoutUnit totalStrutSpace;
for (unsigned i = 0; i < stopBeforeColumn; i++) {
if (m_shortestStruts[i] != LayoutUnit::max())
@@ -308,7 +308,7 @@ unsigned InitialColumnHeightFinder::contentRunIndexWithTallestColumns() const {
LayoutUnit largestHeight;
LayoutUnit previousOffset = logicalTopInFlowThread();
size_t runCount = m_contentRuns.size();
- ASSERT(runCount);
+ DCHECK(runCount);
for (size_t i = firstContentRunIndexInLastRow(); i < runCount; i++) {
const ContentRun& run = m_contentRuns[i];
LayoutUnit height = run.columnLogicalHeight(previousOffset);
@@ -473,7 +473,7 @@ void MinimumSpaceShortageFinder::examineLine(const RootInlineBox& line) {
m_pendingStrut = LayoutUnit::min();
return;
}
- ASSERT(
+ DCHECK(
isFirstAfterBreak(lineTopInFlowThread) || !line.paginationStrut() ||
!isLogicalTopWithinBounds(lineTopInFlowThread - line.paginationStrut()));
if (isFirstAfterBreak(lineTopInFlowThread))
« no previous file with comments | « third_party/WebKit/Source/core/layout/BidiRunForLine.cpp ('k') | third_party/WebKit/Source/core/layout/CounterNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698