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

Unified Diff: third_party/WebKit/Source/core/layout/TableLayoutAlgorithmAuto.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/layout/TableLayoutAlgorithmAuto.cpp
diff --git a/third_party/WebKit/Source/core/layout/TableLayoutAlgorithmAuto.cpp b/third_party/WebKit/Source/core/layout/TableLayoutAlgorithmAuto.cpp
index c5f3d9cf2ce3427addd68f0cbb681d62461d9706..91c6ac722c5360ee27ff53b0671588356d6292a2 100644
--- a/third_party/WebKit/Source/core/layout/TableLayoutAlgorithmAuto.cpp
+++ b/third_party/WebKit/Source/core/layout/TableLayoutAlgorithmAuto.cpp
@@ -55,7 +55,7 @@ void TableLayoutAlgorithmAuto::RecalcColumn(unsigned eff_col) {
LayoutTableSection* section = ToLayoutTableSection(child);
unsigned num_rows = section->NumRows();
for (unsigned i = 0; i < num_rows; i++) {
- if (eff_col >= section->NumCols(i))
+ if (eff_col >= section->NumEffectiveColumns(i))
continue;
auto& grid_cell = section->GridCellAt(i, eff_col);
LayoutTableCell* cell = grid_cell.PrimaryCell();
@@ -169,7 +169,7 @@ void TableLayoutAlgorithmAuto::FullRecalc() {
unsigned current_column = 0;
for (LayoutTableCol* column = table_->FirstColumn(); column;
column = column->NextColumn()) {
- if (column->IsTableColumnGroupWithColumnChildren()) {
+ if (!column->IsInnermost()) {
group_logical_width = column->Style()->LogicalWidth();
} else {
Length col_logical_width = column->Style()->LogicalWidth();
@@ -366,8 +366,7 @@ int TableLayoutAlgorithmAuto::CalcEffectiveLogicalWidth() {
if (cell_logical_width.IsZero() || cell_logical_width.IsCalculated())
cell_logical_width = Length(); // Make it Auto
- unsigned eff_col =
- table_->AbsoluteColumnToEffectiveColumn(cell->AbsoluteColumnIndex());
+ unsigned eff_col = cell->EffectiveColumnIndex();
size_t last_col = eff_col;
int cell_min_logical_width =
(cell->MinPreferredLogicalWidth() + spacing_in_row_direction).ToInt();

Powered by Google App Engine
This is Rietveld 408576698