| Index: third_party/WebKit/Source/core/layout/LayoutTable.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/LayoutTable.cpp b/third_party/WebKit/Source/core/layout/LayoutTable.cpp
|
| index 4d51fd471ce1d2449701fd4520d515a0bf20faf0..9e87f5c81f82d3964c752db35479a93ba84d280e 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutTable.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutTable.cpp
|
| @@ -964,6 +964,13 @@ LayoutTableSection* LayoutTable::TopNonEmptySection() const {
|
| return section;
|
| }
|
|
|
| +LayoutTableSection* LayoutTable::BottomNonEmptySection() const {
|
| + LayoutTableSection* section = BottomSection();
|
| + if (section && !section->NumRows())
|
| + section = SectionAbove(section, kSkipEmptySections);
|
| + return section;
|
| +}
|
| +
|
| void LayoutTable::SplitEffectiveColumn(unsigned index, unsigned first_span) {
|
| // We split the column at |index|, taking |firstSpan| cells from the span.
|
| DCHECK_GT(effective_columns_[index].span, first_span);
|
| @@ -1083,6 +1090,25 @@ LayoutTable::ColAndColGroup LayoutTable::SlowColElementAtAbsoluteColumn(
|
| return ColAndColGroup();
|
| }
|
|
|
| +// Maps LayoutTableCol => absoluteColumnIndex,
|
| +// an inverse of slowColElementAtAbsoluteColumn
|
| +unsigned LayoutTable::ColElementToAbsoluteColumn(
|
| + const LayoutTableCol* col_element) const {
|
| + unsigned col = 0;
|
| + for (LayoutTableCol* column_layout_object = FirstColumn();
|
| + column_layout_object;
|
| + column_layout_object = column_layout_object->NextColumn()) {
|
| + if (column_layout_object == col_element)
|
| + break;
|
| + if (column_layout_object->IsTableColumnGroupWithColumnChildren()) {
|
| + // Do nothing, span will increase with children
|
| + } else {
|
| + col += column_layout_object->Span();
|
| + }
|
| + }
|
| + return col;
|
| +}
|
| +
|
| void LayoutTable::RecalcSections() const {
|
| DCHECK(needs_section_recalc_);
|
|
|
|
|