| 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 1047 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1058 | 1058 |
| 1059 // FIXME: Make pagination work with vertical tables. | 1059 // FIXME: Make pagination work with vertical tables. |
| 1060 if (view()->layoutState()->pageLogicalHeight() && cell->logicalHeigh
t() != rHeight) { | 1060 if (view()->layoutState()->pageLogicalHeight() && cell->logicalHeigh
t() != rHeight) { |
| 1061 // FIXME: Pagination might have made us change size. For now jus
t shrink or grow the cell to fit without doing a relayout. | 1061 // FIXME: Pagination might have made us change size. For now jus
t shrink or grow the cell to fit without doing a relayout. |
| 1062 // We'll also do a basic increase of the row height to accommoda
te the cell if it's bigger, but this isn't quite right | 1062 // We'll also do a basic increase of the row height to accommoda
te the cell if it's bigger, but this isn't quite right |
| 1063 // either. It's at least stable though and won't result in an in
finite # of relayouts that may never stabilize. | 1063 // either. It's at least stable though and won't result in an in
finite # of relayouts that may never stabilize. |
| 1064 LayoutUnit oldLogicalHeight = cell->logicalHeight(); | 1064 LayoutUnit oldLogicalHeight = cell->logicalHeight(); |
| 1065 if (oldLogicalHeight > rHeight) | 1065 if (oldLogicalHeight > rHeight) |
| 1066 rowHeightIncreaseForPagination = std::max<int>(rowHeightIncr
easeForPagination, oldLogicalHeight - rHeight); | 1066 rowHeightIncreaseForPagination = std::max<int>(rowHeightIncr
easeForPagination, oldLogicalHeight - rHeight); |
| 1067 cell->setLogicalHeight(rHeight); | 1067 cell->setLogicalHeight(rHeight); |
| 1068 cell->computeOverflow(oldLogicalHeight, false); | 1068 cell->computeOverflow(oldLogicalHeight); |
| 1069 } | 1069 } |
| 1070 | 1070 |
| 1071 if (rowLayoutObject) | 1071 if (rowLayoutObject) |
| 1072 rowLayoutObject->addOverflowFromCell(cell); | 1072 rowLayoutObject->addOverflowFromCell(cell); |
| 1073 | 1073 |
| 1074 LayoutSize childOffset(cell->location() - oldCellRect.location()); | 1074 LayoutSize childOffset(cell->location() - oldCellRect.location()); |
| 1075 if (childOffset.width() || childOffset.height()) { | 1075 if (childOffset.width() || childOffset.height()) { |
| 1076 // If the child moved, we have to issue paint invalidations to i
t as well as any floating/positioned | 1076 // If the child moved, we have to issue paint invalidations to i
t as well as any floating/positioned |
| 1077 // descendants. An exception is if we need a layout. In this cas
e, we know we're going to | 1077 // descendants. An exception is if we need a layout. In this cas
e, we know we're going to |
| 1078 // issue paint invalidations ourselves (and the child) anyway. | 1078 // issue paint invalidations ourselves (and the child) anyway. |
| 1079 if (!table()->selfNeedsLayout()) | 1079 if (!table()->selfNeedsLayout()) |
| 1080 cell->setMayNeedPaintInvalidation(); | 1080 cell->setMayNeedPaintInvalidation(); |
| 1081 } | 1081 } |
| 1082 } | 1082 } |
| 1083 if (rowHeightIncreaseForPagination) { | 1083 if (rowHeightIncreaseForPagination) { |
| 1084 for (unsigned rowIndex = r + 1; rowIndex <= totalRows; rowIndex++) | 1084 for (unsigned rowIndex = r + 1; rowIndex <= totalRows; rowIndex++) |
| 1085 m_rowPos[rowIndex] += rowHeightIncreaseForPagination; | 1085 m_rowPos[rowIndex] += rowHeightIncreaseForPagination; |
| 1086 for (unsigned c = 0; c < nEffCols; ++c) { | 1086 for (unsigned c = 0; c < nEffCols; ++c) { |
| 1087 Vector<LayoutTableCell*, 1>& cells = cellAt(r, c).cells; | 1087 Vector<LayoutTableCell*, 1>& cells = cellAt(r, c).cells; |
| 1088 for (size_t i = 0; i < cells.size(); ++i) { | 1088 for (size_t i = 0; i < cells.size(); ++i) { |
| 1089 LayoutUnit oldLogicalHeight = cells[i]->logicalHeight(); | 1089 LayoutUnit oldLogicalHeight = cells[i]->logicalHeight(); |
| 1090 cells[i]->setLogicalHeight(oldLogicalHeight + rowHeightIncre
aseForPagination); | 1090 cells[i]->setLogicalHeight(oldLogicalHeight + rowHeightIncre
aseForPagination); |
| 1091 cells[i]->computeOverflow(oldLogicalHeight, false); | 1091 cells[i]->computeOverflow(oldLogicalHeight); |
| 1092 } | 1092 } |
| 1093 } | 1093 } |
| 1094 } | 1094 } |
| 1095 } | 1095 } |
| 1096 | 1096 |
| 1097 ASSERT(!needsLayout()); | 1097 ASSERT(!needsLayout()); |
| 1098 | 1098 |
| 1099 setLogicalHeight(m_rowPos[totalRows]); | 1099 setLogicalHeight(m_rowPos[totalRows]); |
| 1100 | 1100 |
| 1101 computeOverflowFromCells(totalRows, nEffCols); | 1101 computeOverflowFromCells(totalRows, nEffCols); |
| (...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1642 // FIXME: The table's direction should determine our row's direction, not th
e section's (see bug 96691). | 1642 // FIXME: The table's direction should determine our row's direction, not th
e section's (see bug 96691). |
| 1643 if (!style()->isLeftToRightDirection()) | 1643 if (!style()->isLeftToRightDirection()) |
| 1644 cellLocation.setX(table()->columnPositions()[table()->numEffCols()] - ta
ble()->columnPositions()[table()->colToEffCol(cell->col() + cell->colSpan())] +
horizontalBorderSpacing); | 1644 cellLocation.setX(table()->columnPositions()[table()->numEffCols()] - ta
ble()->columnPositions()[table()->colToEffCol(cell->col() + cell->colSpan())] +
horizontalBorderSpacing); |
| 1645 else | 1645 else |
| 1646 cellLocation.setX(table()->columnPositions()[effectiveColumn] + horizont
alBorderSpacing); | 1646 cellLocation.setX(table()->columnPositions()[effectiveColumn] + horizont
alBorderSpacing); |
| 1647 | 1647 |
| 1648 cell->setLogicalLocation(cellLocation); | 1648 cell->setLogicalLocation(cellLocation); |
| 1649 } | 1649 } |
| 1650 | 1650 |
| 1651 } // namespace blink | 1651 } // namespace blink |
| OLD | NEW |