| 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 Apple Inc. All rights
reserved. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009, 2010 Apple Inc. All rights
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 698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 709 // Add the border-spacing to our final position. | 709 // Add the border-spacing to our final position. |
| 710 m_rowPos[r + 1] += borderSpacingForRow(r); | 710 m_rowPos[r + 1] += borderSpacingForRow(r); |
| 711 m_rowPos[r + 1] = max(m_rowPos[r + 1], m_rowPos[r]); | 711 m_rowPos[r + 1] = max(m_rowPos[r + 1], m_rowPos[r]); |
| 712 } | 712 } |
| 713 | 713 |
| 714 if (!rowSpanCells.isEmpty()) | 714 if (!rowSpanCells.isEmpty()) |
| 715 distributeRowSpanHeightToRows(rowSpanCells); | 715 distributeRowSpanHeightToRows(rowSpanCells); |
| 716 | 716 |
| 717 ASSERT(!needsLayout()); | 717 ASSERT(!needsLayout()); |
| 718 | 718 |
| 719 statePusher.pop(); | |
| 720 | |
| 721 return m_rowPos[m_grid.size()]; | 719 return m_rowPos[m_grid.size()]; |
| 722 } | 720 } |
| 723 | 721 |
| 724 void RenderTableSection::layout() | 722 void RenderTableSection::layout() |
| 725 { | 723 { |
| 726 ASSERT(needsLayout()); | 724 ASSERT(needsLayout()); |
| 727 ASSERT(!needsCellRecalc()); | 725 ASSERT(!needsCellRecalc()); |
| 728 ASSERT(!table()->needsSectionRecalc()); | 726 ASSERT(!table()->needsSectionRecalc()); |
| 729 | 727 |
| 730 LayoutRectRecorder recorder(*this); | 728 LayoutRectRecorder recorder(*this); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 762 cell->setCellLogicalWidth(tableLayoutLogicalWidth, layouter); | 760 cell->setCellLogicalWidth(tableLayoutLogicalWidth, layouter); |
| 763 } | 761 } |
| 764 | 762 |
| 765 if (RenderTableRow* rowRenderer = m_grid[r].rowRenderer) { | 763 if (RenderTableRow* rowRenderer = m_grid[r].rowRenderer) { |
| 766 if (!rowRenderer->needsLayout()) | 764 if (!rowRenderer->needsLayout()) |
| 767 rowRenderer->markForPaginationRelayoutIfNeeded(layouter); | 765 rowRenderer->markForPaginationRelayoutIfNeeded(layouter); |
| 768 rowRenderer->layoutIfNeeded(); | 766 rowRenderer->layoutIfNeeded(); |
| 769 } | 767 } |
| 770 } | 768 } |
| 771 | 769 |
| 772 statePusher.pop(); | |
| 773 clearNeedsLayout(); | 770 clearNeedsLayout(); |
| 774 } | 771 } |
| 775 | 772 |
| 776 void RenderTableSection::distributeExtraLogicalHeightToPercentRows(int& extraLog
icalHeight, int totalPercent) | 773 void RenderTableSection::distributeExtraLogicalHeightToPercentRows(int& extraLog
icalHeight, int totalPercent) |
| 777 { | 774 { |
| 778 if (!totalPercent) | 775 if (!totalPercent) |
| 779 return; | 776 return; |
| 780 | 777 |
| 781 unsigned totalRows = m_grid.size(); | 778 unsigned totalRows = m_grid.size(); |
| 782 int totalHeight = m_rowPos[totalRows] + extraLogicalHeight; | 779 int totalHeight = m_rowPos[totalRows] + extraLogicalHeight; |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1021 } | 1018 } |
| 1022 } | 1019 } |
| 1023 } | 1020 } |
| 1024 } | 1021 } |
| 1025 | 1022 |
| 1026 ASSERT(!needsLayout()); | 1023 ASSERT(!needsLayout()); |
| 1027 | 1024 |
| 1028 setLogicalHeight(m_rowPos[totalRows]); | 1025 setLogicalHeight(m_rowPos[totalRows]); |
| 1029 | 1026 |
| 1030 computeOverflowFromCells(totalRows, nEffCols); | 1027 computeOverflowFromCells(totalRows, nEffCols); |
| 1031 | |
| 1032 statePusher.pop(); | |
| 1033 } | 1028 } |
| 1034 | 1029 |
| 1035 void RenderTableSection::computeOverflowFromCells() | 1030 void RenderTableSection::computeOverflowFromCells() |
| 1036 { | 1031 { |
| 1037 unsigned totalRows = m_grid.size(); | 1032 unsigned totalRows = m_grid.size(); |
| 1038 unsigned nEffCols = table()->numEffCols(); | 1033 unsigned nEffCols = table()->numEffCols(); |
| 1039 computeOverflowFromCells(totalRows, nEffCols); | 1034 computeOverflowFromCells(totalRows, nEffCols); |
| 1040 } | 1035 } |
| 1041 | 1036 |
| 1042 void RenderTableSection::computeOverflowFromCells(unsigned totalRows, unsigned n
EffCols) | 1037 void RenderTableSection::computeOverflowFromCells(unsigned totalRows, unsigned n
EffCols) |
| (...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1736 else | 1731 else |
| 1737 cellLocation.setX(table()->columnPositions()[effectiveColumn] + horizont
alBorderSpacing); | 1732 cellLocation.setX(table()->columnPositions()[effectiveColumn] + horizont
alBorderSpacing); |
| 1738 | 1733 |
| 1739 cell->setLogicalLocation(cellLocation); | 1734 cell->setLogicalLocation(cellLocation); |
| 1740 | 1735 |
| 1741 if (!RuntimeEnabledFeatures::repaintAfterLayoutEnabled()) | 1736 if (!RuntimeEnabledFeatures::repaintAfterLayoutEnabled()) |
| 1742 view()->addLayoutDelta(oldCellLocation - cell->location()); | 1737 view()->addLayoutDelta(oldCellLocation - cell->location()); |
| 1743 } | 1738 } |
| 1744 | 1739 |
| 1745 } // namespace WebCore | 1740 } // namespace WebCore |
| OLD | NEW |