| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1997 Martin Jones (mjones@kde.org) | 2 * Copyright (C) 1997 Martin Jones (mjones@kde.org) |
| 3 * (C) 1997 Torben Weis (weis@kde.org) | 3 * (C) 1997 Torben Weis (weis@kde.org) |
| 4 * (C) 1998 Waldo Bastian (bastian@kde.org) | 4 * (C) 1998 Waldo Bastian (bastian@kde.org) |
| 5 * (C) 1999 Lars Knoll (knoll@kde.org) | 5 * (C) 1999 Lars Knoll (knoll@kde.org) |
| 6 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 6 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 7 * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009, 2010, 2013 Apple Inc. All r
ights reserved. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009, 2010, 2013 Apple Inc. All r
ights reserved. |
| 8 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 8 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
| 9 * | 9 * |
| 10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
| (...skipping 1629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1640 | 1640 |
| 1641 // FIXME: The table's direction should determine our row's direction, not th
e section's (see bug 96691). | 1641 // FIXME: The table's direction should determine our row's direction, not th
e section's (see bug 96691). |
| 1642 if (!style()->isLeftToRightDirection()) | 1642 if (!style()->isLeftToRightDirection()) |
| 1643 cellLocation.setX(LayoutUnit(table()->columnPositions()[table()->numEffC
ols()] - table()->columnPositions()[table()->colToEffCol(cell->col() + cell->col
Span())] + horizontalBorderSpacing)); | 1643 cellLocation.setX(LayoutUnit(table()->columnPositions()[table()->numEffC
ols()] - table()->columnPositions()[table()->colToEffCol(cell->col() + cell->col
Span())] + horizontalBorderSpacing)); |
| 1644 else | 1644 else |
| 1645 cellLocation.setX(LayoutUnit(table()->columnPositions()[effectiveColumn]
+ horizontalBorderSpacing)); | 1645 cellLocation.setX(LayoutUnit(table()->columnPositions()[effectiveColumn]
+ horizontalBorderSpacing)); |
| 1646 | 1646 |
| 1647 cell->setLogicalLocation(cellLocation); | 1647 cell->setLogicalLocation(cellLocation); |
| 1648 } | 1648 } |
| 1649 | 1649 |
| 1650 LayoutRect LayoutTableSection::positionByCellSpan() const |
| 1651 { |
| 1652 LayoutRect position; |
| 1653 LayoutTableRow* firstRow = this->firstRow(); |
| 1654 LayoutTableRow* lastRow = this->lastRow(); |
| 1655 if (firstRow && lastRow) { |
| 1656 position = firstRow->positionByCellSpan(); |
| 1657 position.unite(lastRow->positionByCellSpan()); |
| 1658 } |
| 1659 return position; |
| 1660 } |
| 1661 |
| 1662 // Ideal cell is a cell that spans single row/column. |
| 1663 // It is used to calculate position of colgroup/col/row |
| 1664 // It is needed because actual cells can be arbitrary rectangles, or non-existen
t |
| 1665 LayoutRect LayoutTableSection::positionOfIdealCell(unsigned row, unsigned col) c
onst |
| 1666 { |
| 1667 LayoutRect position; |
| 1668 LayoutTable * table = this->table(); |
| 1669 unsigned left = table->columnPositions()[col]; |
| 1670 unsigned top = m_rowPos[row]; |
| 1671 unsigned right = table->columnPositions()[col+1]; |
| 1672 unsigned bottom = m_rowPos[row+1]; |
| 1673 left += table->hBorderSpacing(); |
| 1674 return LayoutRect(LayoutPoint(left, top), LayoutSize(right - left, bottom-to
p)); |
| 1675 } |
| 1650 } // namespace blink | 1676 } // namespace blink |
| OLD | NEW |