| Index: third_party/WebKit/Source/core/layout/LayoutTableSection.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp b/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp
|
| index 901dfb458dbcee07d724b2053983d012986aeb79..715be719547269ef02b06477499d0443c6b6387f 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp
|
| @@ -1647,4 +1647,30 @@ void LayoutTableSection::setLogicalPositionForCell(LayoutTableCell* cell, unsign
|
| cell->setLogicalLocation(cellLocation);
|
| }
|
|
|
| +LayoutRect LayoutTableSection::positionByCellSpan() const
|
| +{
|
| + LayoutRect position;
|
| + LayoutTableRow* firstRow = this->firstRow();
|
| + LayoutTableRow* lastRow = this->lastRow();
|
| + if (firstRow && lastRow) {
|
| + position = firstRow->positionByCellSpan();
|
| + position.unite(lastRow->positionByCellSpan());
|
| + }
|
| + return position;
|
| +}
|
| +
|
| +// Ideal cell is a cell that spans single row/column.
|
| +// It is used to calculate position of colgroup/col/row
|
| +// It is needed because actual cells can be arbitrary rectangles, or non-existent
|
| +LayoutRect LayoutTableSection::positionOfIdealCell(unsigned row, unsigned col) const
|
| +{
|
| + LayoutRect position;
|
| + LayoutTable * table = this->table();
|
| + unsigned left = table->columnPositions()[col];
|
| + unsigned top = m_rowPos[row];
|
| + unsigned right = table->columnPositions()[col+1];
|
| + unsigned bottom = m_rowPos[row+1];
|
| + left += table->hBorderSpacing();
|
| + return LayoutRect(LayoutPoint(left, top), LayoutSize(right - left, bottom-top));
|
| +}
|
| } // namespace blink
|
|
|