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 8ff2023691d2d66cbccff14fe388ccd92f8bac9f..048b27d66d4ee7959aaea7fb3e203c5641567858 100644 |
--- a/third_party/WebKit/Source/core/layout/LayoutTableSection.h |
+++ b/third_party/WebKit/Source/core/layout/LayoutTableSection.h |
@@ -192,7 +192,9 @@ class CORE_EXPORT LayoutTableSection final : public LayoutTableBoxComponent { |
row, effective_column); |
} |
- unsigned NumCols(unsigned row) const { return grid_[row].grid_cells.size(); } |
+ unsigned NumEffectiveColumns(unsigned row) const { |
+ return grid_[row].grid_cells.size(); |
+ } |
// Returns null for cells with a rowspan that exceed the last row. Possibly |
// others. |
@@ -219,7 +221,8 @@ class CORE_EXPORT LayoutTableSection final : public LayoutTableBoxComponent { |
DCHECK(!NeedsCellRecalc()); |
return grid_.size(); |
} |
- unsigned NumEffectiveColumns() const; |
+ // This is slow. Use Table()->NumEffectiveColumns() instead if possible. |
+ unsigned MaxNumEffectiveColumnsOfRows() const; |
// recalcCells() is used when we are not sure about the section's structure |
// and want to do an expensive (but safe) reconstruction of m_grid from |
@@ -328,7 +331,7 @@ class CORE_EXPORT LayoutTableSection final : public LayoutTableBoxComponent { |
} |
void EnsureCols(unsigned row_index, unsigned num_cols) { |
- if (num_cols > this->NumCols(row_index)) |
+ if (num_cols > grid_[row_index].grid_cells.size()) |
grid_[row_index].grid_cells.Grow(num_cols); |
} |