Index: third_party/WebKit/Source/core/layout/LayoutTableSection.h |
diff --git a/third_party/WebKit/Source/core/layout/LayoutTableSection.h b/third_party/WebKit/Source/core/layout/LayoutTableSection.h |
index 916aab9e2f2aa2e4802a97339ac1decc9460a440..fcf8844348ff6a274c115fc8b341b33256d87740 100644 |
--- a/third_party/WebKit/Source/core/layout/LayoutTableSection.h |
+++ b/third_party/WebKit/Source/core/layout/LayoutTableSection.h |
@@ -218,6 +218,8 @@ class CORE_EXPORT LayoutTableSection final : public LayoutTableBoxComponent { |
return m_grid[row].row[effectiveColumn]; |
} |
LayoutTableCell* primaryCellAt(unsigned row, unsigned effectiveColumn) { |
+ if (effectiveColumn >= numCols(row)) |
+ return nullptr; |
CellStruct& c = m_grid[row].row[effectiveColumn]; |
return c.primaryCell(); |
} |
@@ -227,6 +229,8 @@ class CORE_EXPORT LayoutTableSection final : public LayoutTableBoxComponent { |
row, effectiveColumn); |
} |
+ unsigned numCols(unsigned row) const { return m_grid[row].row.size(); } |
+ |
// Returns null for cells with a rowspan that exceed the last row. Possibly |
// others. |
LayoutTableRow* rowLayoutObjectAt(unsigned row) { |
@@ -347,6 +351,11 @@ class CORE_EXPORT LayoutTableSection final : public LayoutTableBoxComponent { |
void ensureRows(unsigned); |
+ void ensureCol(unsigned r, unsigned c) { |
mstensho (USE GERRIT)
2017/01/03 15:18:41
Maybe it should be named ensureCols(), since we al
a.suchit
2017/01/04 10:35:18
Done.
|
+ if (c >= numCols(r)) |
+ m_grid[r].row.grow(c + 1); |
+ } |
+ |
bool rowHasOnlySpanningCells(unsigned); |
unsigned calcRowHeightHavingOnlySpanningCells(unsigned, |
int&, |