| 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 771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 782 if (cell->rowSpan() > 1) { | 782 if (cell->rowSpan() > 1) { |
| 783 // For row spanning cells, we only handle them for the first
row they span. This ensures we take their baseline into account. | 783 // For row spanning cells, we only handle them for the first
row they span. This ensures we take their baseline into account. |
| 784 if (lastRowSpanCell != cell && cell->rowIndex() == r) { | 784 if (lastRowSpanCell != cell && cell->rowIndex() == r) { |
| 785 #if ENABLE(ASSERT) | 785 #if ENABLE(ASSERT) |
| 786 ASSERT(!uniqueCells.contains(cell)); | 786 ASSERT(!uniqueCells.contains(cell)); |
| 787 uniqueCells.add(cell); | 787 uniqueCells.add(cell); |
| 788 #endif | 788 #endif |
| 789 | 789 |
| 790 rowSpanCells.append(cell); | 790 rowSpanCells.append(cell); |
| 791 lastRowSpanCell = cell; | 791 lastRowSpanCell = cell; |
| 792 | |
| 793 // Find out the baseline. The baseline is set on the fir
st row in a rowSpan. | |
| 794 updateBaselineForCell(cell, r, baselineDescent); | |
| 795 } | 792 } |
| 796 continue; | |
| 797 } | 793 } |
| 798 | 794 |
| 799 ASSERT(cell->rowSpan() == 1); | 795 if (cell->rowIndex() == r && cell->hasOverrideLogicalContentHeig
ht()) { |
| 800 | |
| 801 if (cell->hasOverrideLogicalContentHeight()) { | |
| 802 cell->clearIntrinsicPadding(); | 796 cell->clearIntrinsicPadding(); |
| 803 cell->clearOverrideSize(); | 797 cell->clearOverrideSize(); |
| 804 cell->forceChildLayout(); | 798 cell->forceChildLayout(); |
| 805 } | 799 } |
| 806 | 800 |
| 807 m_rowPos[r + 1] = std::max(m_rowPos[r + 1], m_rowPos[r] + cell->
logicalHeightForRowSizing()); | 801 if (cell->rowSpan() == 1) |
| 802 m_rowPos[r + 1] = std::max(m_rowPos[r + 1], m_rowPos[r] + ce
ll->logicalHeightForRowSizing()); |
| 808 | 803 |
| 809 // Find out the baseline. | 804 // Find out the baseline. The baseline is set on the first row i
n a rowSpan. |
| 810 updateBaselineForCell(cell, r, baselineDescent); | 805 if (cell->rowIndex() == r) |
| 806 updateBaselineForCell(cell, r, baselineDescent); |
| 811 } | 807 } |
| 812 } | 808 } |
| 813 | 809 |
| 814 // Add the border-spacing to our final position. | 810 // Add the border-spacing to our final position. |
| 815 m_rowPos[r + 1] += borderSpacingForRow(r); | 811 m_rowPos[r + 1] += borderSpacingForRow(r); |
| 816 m_rowPos[r + 1] = std::max(m_rowPos[r + 1], m_rowPos[r]); | 812 m_rowPos[r + 1] = std::max(m_rowPos[r + 1], m_rowPos[r]); |
| 817 } | 813 } |
| 818 | 814 |
| 819 if (!rowSpanCells.isEmpty()) | 815 if (!rowSpanCells.isEmpty()) |
| 820 distributeRowSpanHeightToRows(rowSpanCells); | 816 distributeRowSpanHeightToRows(rowSpanCells); |
| (...skipping 850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1671 // FIXME: The table's direction should determine our row's direction, not th
e section's (see bug 96691). | 1667 // FIXME: The table's direction should determine our row's direction, not th
e section's (see bug 96691). |
| 1672 if (!style()->isLeftToRightDirection()) | 1668 if (!style()->isLeftToRightDirection()) |
| 1673 cellLocation.setX(table()->columnPositions()[table()->numEffCols()] - ta
ble()->columnPositions()[table()->colToEffCol(cell->col() + cell->colSpan())] +
horizontalBorderSpacing); | 1669 cellLocation.setX(table()->columnPositions()[table()->numEffCols()] - ta
ble()->columnPositions()[table()->colToEffCol(cell->col() + cell->colSpan())] +
horizontalBorderSpacing); |
| 1674 else | 1670 else |
| 1675 cellLocation.setX(table()->columnPositions()[effectiveColumn] + horizont
alBorderSpacing); | 1671 cellLocation.setX(table()->columnPositions()[effectiveColumn] + horizont
alBorderSpacing); |
| 1676 | 1672 |
| 1677 cell->setLogicalLocation(cellLocation); | 1673 cell->setLogicalLocation(cellLocation); |
| 1678 } | 1674 } |
| 1679 | 1675 |
| 1680 } // namespace blink | 1676 } // namespace blink |
| OLD | NEW |