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

Unified Diff: third_party/WebKit/Source/core/paint/TableSectionPainter.cpp

Issue 2884573002: Replace LayoutTableCell::AbsoluteColumnIndex() with EffectiveColumnIndex()
Patch Set: - Created 3 years, 7 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/paint/TableSectionPainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/TableSectionPainter.cpp b/third_party/WebKit/Source/core/paint/TableSectionPainter.cpp
index f1f68fd79263c9a999934a5b0a683a615307427e..7890b3d0ec39bbb40d4cea17a53fe81148f22084 100644
--- a/third_party/WebKit/Source/core/paint/TableSectionPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/TableSectionPainter.cpp
@@ -152,7 +152,7 @@ void TableSectionPainter::PaintCollapsedSectionBorders(
// precedence due to cell position is respected.
for (unsigned r = dirtied_rows.End(); r > dirtied_rows.Start(); r--) {
unsigned row = r - 1;
- unsigned n_cols = layout_table_section_.NumCols(row);
+ unsigned n_cols = layout_table_section_.NumEffectiveColumns(row);
for (unsigned c = std::min(dirtied_columns.End(), n_cols);
c > dirtied_columns.Start(); c--) {
unsigned col = c - 1;
@@ -257,7 +257,7 @@ void TableSectionPainter::PaintObject(const PaintInfo& paint_info,
TableRowPainter(*row).PaintOutline(paint_info_for_descendants,
paint_offset);
}
- unsigned n_cols = layout_table_section_.NumCols(r);
+ unsigned n_cols = layout_table_section_.NumEffectiveColumns(r);
for (unsigned c = dirtied_columns.Start();
c < n_cols && c < dirtied_columns.End(); c++) {
if (const auto* cell = layout_table_section_.OriginatingCellAt(r, c)) {
@@ -279,8 +279,9 @@ void TableSectionPainter::PaintBoxDecorationBackground(
const LayoutPoint& paint_offset,
const CellSpan& dirtied_rows,
const CellSpan& dirtied_columns) {
- bool may_have_background = layout_table_section_.Table()->HasColElements() ||
- layout_table_section_.StyleRef().HasBackground();
+ bool may_have_background =
+ layout_table_section_.Table()->HasColOrColGroups() ||
+ layout_table_section_.StyleRef().HasBackground();
bool has_box_shadow = layout_table_section_.StyleRef().BoxShadow();
if (!may_have_background && !has_box_shadow)
return;
@@ -340,9 +341,7 @@ void TableSectionPainter::PaintBackgroundsBehindCell(
// to top) consists of the column group, column, row group, row, and then the
// cell.
- LayoutTable::ColAndColGroup col_and_col_group =
- layout_table_section_.Table()->ColElementAtAbsoluteColumn(
- cell.AbsoluteColumnIndex());
+ auto col_and_col_group = cell.GetColAndColGroup();
LayoutTableCol* column = col_and_col_group.col;
LayoutTableCol* column_group = col_and_col_group.colgroup;
TableCellPainter table_cell_painter(cell);

Powered by Google App Engine
This is Rietveld 408576698