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

Unified Diff: Source/core/rendering/RenderTableSection.cpp

Issue 397733004: Allow assertions to be enabled in Blink Release builds. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased. Created 6 years, 5 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 | « Source/core/rendering/RenderTableCell.h ('k') | Source/core/rendering/RenderText.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderTableSection.cpp
diff --git a/Source/core/rendering/RenderTableSection.cpp b/Source/core/rendering/RenderTableSection.cpp
index 88092af0a2d4383ec909c95b4a2844667f274682..412107fbae475a3553c2cbf140d7c7b9e9860e3f 100644
--- a/Source/core/rendering/RenderTableSection.cpp
+++ b/Source/core/rendering/RenderTableSection.cpp
@@ -632,7 +632,7 @@ void RenderTableSection::updateBaselineForCell(RenderTableCell* cell, unsigned r
int RenderTableSection::calcRowLogicalHeight()
{
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
SetLayoutNeededForbiddenScope layoutForbiddenScope(*this);
#endif
@@ -652,7 +652,7 @@ int RenderTableSection::calcRowLogicalHeight()
m_rowPos[0] = 0;
SpanningRenderTableCells rowSpanCells;
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
HashSet<const RenderTableCell*> uniqueCells;
#endif
@@ -677,7 +677,7 @@ int RenderTableSection::calcRowLogicalHeight()
if (cell->rowSpan() > 1) {
// For row spanning cells, we only handle them for the first row they span. This ensures we take their baseline into account.
if (lastRowSpanCell != cell && cell->rowIndex() == r) {
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
ASSERT(!uniqueCells.contains(cell));
uniqueCells.add(cell);
#endif
@@ -867,7 +867,7 @@ static bool shouldFlexCellChild(RenderObject* cellDescendant)
void RenderTableSection::layoutRows()
{
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
SetLayoutNeededForbiddenScope layoutForbiddenScope(*this);
#endif
@@ -1030,7 +1030,7 @@ void RenderTableSection::computeOverflowFromCells(unsigned totalRows, unsigned n
unsigned totalCellsCount = nEffCols * totalRows;
unsigned maxAllowedOverflowingCellsCount = totalCellsCount < gMinTableSizeToUseFastPaintPathWithOverflowingCell ? 0 : gMaxAllowedOverflowingCellRatioForFastPaintPath * totalCellsCount;
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
bool hasOverflowingCell = false;
#endif
// Now that our height has been determined, add in overflow from cells.
@@ -1043,7 +1043,7 @@ void RenderTableSection::computeOverflowFromCells(unsigned totalRows, unsigned n
if (r < totalRows - 1 && cell == primaryCellAt(r + 1, c))
continue;
addOverflowFromChild(cell);
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
hasOverflowingCell |= cell->hasVisualOverflow();
#endif
if (cell->hasVisualOverflow() && !m_forceSlowPaintPathWithOverflowingCell) {
@@ -1417,7 +1417,7 @@ void RenderTableSection::paintObject(PaintInfo& paintInfo, const LayoutPoint& pa
}
} else {
// The overflowing cells should be scarce to avoid adding a lot of cells to the HashSet.
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
unsigned totalRows = m_grid.size();
unsigned totalCols = table()->columns().size();
ASSERT(m_overflowingCells.size() < totalRows * totalCols * gMaxAllowedOverflowingCellRatioForFastPaintPath);
« no previous file with comments | « Source/core/rendering/RenderTableCell.h ('k') | Source/core/rendering/RenderText.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698