summaryrefslogtreecommitdiff
path: root/chromium/third_party/WebKit/Source/core/rendering/RenderTableSection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/WebKit/Source/core/rendering/RenderTableSection.cpp')
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderTableSection.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/chromium/third_party/WebKit/Source/core/rendering/RenderTableSection.cpp b/chromium/third_party/WebKit/Source/core/rendering/RenderTableSection.cpp
index b5e77a06320..ab6d4da9c60 100644
--- a/chromium/third_party/WebKit/Source/core/rendering/RenderTableSection.cpp
+++ b/chromium/third_party/WebKit/Source/core/rendering/RenderTableSection.cpp
@@ -29,7 +29,9 @@
// FIXME: Remove 'RuntimeEnabledFeatures.h' when http://crbug.com/78724 is closed.
#include "RuntimeEnabledFeatures.h"
#include <limits>
+#include "core/rendering/GraphicsContextAnnotator.h"
#include "core/rendering/HitTestResult.h"
+#include "core/rendering/LayoutRectRecorder.h"
#include "core/rendering/PaintInfo.h"
#include "core/rendering/RenderTableCell.h"
#include "core/rendering/RenderTableCol.h"
@@ -37,7 +39,6 @@
#include "core/rendering/RenderView.h"
#include "core/rendering/SubtreeLayoutScope.h"
#include "wtf/HashSet.h"
-#include "wtf/Vector.h"
using namespace std;
@@ -478,7 +479,7 @@ void RenderTableSection::updateRowsHeightHavingOnlySpanningCells(RenderTableCell
const unsigned rowSpan = cell->rowSpan();
const unsigned rowIndex = cell->rowIndex();
- ASSERT(rowSpan == spanningRowsHeight.rowHeight.size());
+ ASSERT_UNUSED(rowSpan, rowSpan == spanningRowsHeight.rowHeight.size());
for (unsigned row = 0; row < spanningRowsHeight.rowHeight.size(); row++) {
unsigned actualRow = row + rowIndex;
@@ -730,6 +731,8 @@ void RenderTableSection::layout()
ASSERT(!needsCellRecalc());
ASSERT(!table()->needsSectionRecalc());
+ LayoutRectRecorder recorder(*this);
+
// addChild may over-grow m_grid but we don't want to throw away the memory too early as addChild
// can be called in a loop (e.g during parsing). Doing it now ensures we have a stable-enough structure.
m_grid.shrinkToFit();
@@ -1026,7 +1029,7 @@ void RenderTableSection::computeOverflowFromCells()
void RenderTableSection::computeOverflowFromCells(unsigned totalRows, unsigned nEffCols)
{
unsigned totalCellsCount = nEffCols * totalRows;
- int maxAllowedOverflowingCellsCount = totalCellsCount < gMinTableSizeToUseFastPaintPathWithOverflowingCell ? 0 : gMaxAllowedOverflowingCellRatioForFastPaintPath * totalCellsCount;
+ unsigned maxAllowedOverflowingCellsCount = totalCellsCount < gMinTableSizeToUseFastPaintPathWithOverflowingCell ? 0 : gMaxAllowedOverflowingCellRatioForFastPaintPath * totalCellsCount;
#ifndef NDEBUG
bool hasOverflowingCell = false;
@@ -1283,8 +1286,7 @@ void RenderTableSection::paint(PaintInfo& paintInfo, const LayoutPoint& paintOff
{
ANNOTATE_GRAPHICS_CONTEXT(paintInfo, this);
- // put this back in when all layout tests can handle it
- // ASSERT(!needsLayout());
+ ASSERT_WITH_SECURITY_IMPLICATION(!needsLayout());
// avoid crashing on bugs that cause us to paint with dirty layout
if (needsLayout())
return;
@@ -1785,7 +1787,7 @@ CollapsedBorderValue& RenderTableSection::cachedCollapsedBorder(const RenderTabl
{
ASSERT(table()->collapseBorders());
HashMap<pair<const RenderTableCell*, int>, CollapsedBorderValue>::iterator it = m_cellsCollapsedBorders.find(make_pair(cell, side));
- ASSERT(it != m_cellsCollapsedBorders.end());
+ ASSERT_WITH_SECURITY_IMPLICATION(it != m_cellsCollapsedBorders.end());
return it->value;
}