| 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 c25bb9d453251f636249256fd426f2f68264bab7..7299b7d3381823a6c22acb6032a985d3894824cc 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,24 @@ LayoutTable::ColAndColGroup LayoutTable::slowColElementAtAbsoluteColumn(unsigned
|
| return ColAndColGroup();
|
| }
|
|
|
| +// Maps LayoutTableCol => absoluteColumnIndex,
|
| +// an inverse of slowColElementAtAbsoluteColumn
|
| +unsigned LayoutTable::colElementToAbsoluteColumn(const LayoutTableCol * colElement) const
|
| +{
|
| + unsigned col = 0;
|
| +
|
| + for (LayoutTableCol* columnLayoutObject = firstColumn(); columnLayoutObject; columnLayoutObject = columnLayoutObject->nextColumn()) {
|
| + if (columnLayoutObject == colElement)
|
| + break;
|
| + if (columnLayoutObject->isTableColumnGroupWithColumnChildren()) {
|
| + // Do nothing, span will increase with children
|
| + } else {
|
| + col += columnLayoutObject->span();
|
| + }
|
| + }
|
| + return col;
|
| +}
|
| +
|
| void LayoutTable::recalcSections() const
|
| {
|
| ASSERT(m_needsSectionRecalc);
|
|
|