| 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 bbcf8f535af38fc826047c784e00c1691ea15bf9..0c2025304835c0c4068e6511177a221acc2ec407 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutTable.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutTable.cpp
|
| @@ -734,6 +734,14 @@ LayoutTableSection* LayoutTable::topNonEmptySection() const
|
| return section;
|
| }
|
|
|
| +LayoutTableSection* LayoutTable::bottomNonEmptySection() const
|
| +{
|
| + LayoutTableSection* section = bottomSection();
|
| + if (section && !section->numRows())
|
| + section = sectionAbove(section, SkipEmptySections);
|
| + return section;
|
| +}
|
| +
|
| void LayoutTable::splitEffectiveColumn(unsigned index, unsigned firstSpan)
|
| {
|
| // We split the column at |index|, taking |firstSpan| cells from the span.
|
| @@ -844,6 +852,23 @@ LayoutTable::ColAndColGroup LayoutTable::slowColElementAtAbsoluteColumn(unsigned
|
| return ColAndColGroup();
|
| }
|
|
|
| +unsigned LayoutTable::colElementToAbsoluteColumn(const LayoutTableCol* colElement) const
|
| +{
|
| + unsigned col = 0;
|
| +
|
| + for (LayoutTableCol* columnLayoutObject = firstColumn(); columnLayoutObject; columnLayoutObject = columnLayoutObject->nextColumn()) {
|
| + if (columnLayoutObject == colElement)
|
| + return col;
|
| + if (columnLayoutObject->isTableColumnGroupWithColumnChildren()) {
|
| + // Count spans of leaf col elements only.
|
| + } else {
|
| + col += columnLayoutObject->span();
|
| + }
|
| + }
|
| + ASSERT_NOT_REACHED();
|
| + return 0;
|
| +}
|
| +
|
| void LayoutTable::recalcSections() const
|
| {
|
| ASSERT(m_needsSectionRecalc);
|
|
|