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 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1012 cells[i]->setLogicalHeight(cells[i]->logicalHeight() + rowHe
ightIncreaseForPagination); | 1009 cells[i]->setLogicalHeight(cells[i]->logicalHeight() + rowHe
ightIncreaseForPagination); |
1013 } | 1010 } |
1014 } | 1011 } |
1015 } | 1012 } |
1016 | 1013 |
1017 ASSERT(!needsLayout()); | 1014 ASSERT(!needsLayout()); |
1018 | 1015 |
1019 setLogicalHeight(m_rowPos[totalRows]); | 1016 setLogicalHeight(m_rowPos[totalRows]); |
1020 | 1017 |
1021 computeOverflowFromCells(totalRows, nEffCols); | 1018 computeOverflowFromCells(totalRows, nEffCols); |
1022 | |
1023 statePusher.pop(); | |
1024 } | 1019 } |
1025 | 1020 |
1026 void RenderTableSection::computeOverflowFromCells() | 1021 void RenderTableSection::computeOverflowFromCells() |
1027 { | 1022 { |
1028 unsigned totalRows = m_grid.size(); | 1023 unsigned totalRows = m_grid.size(); |
1029 unsigned nEffCols = table()->numEffCols(); | 1024 unsigned nEffCols = table()->numEffCols(); |
1030 computeOverflowFromCells(totalRows, nEffCols); | 1025 computeOverflowFromCells(totalRows, nEffCols); |
1031 } | 1026 } |
1032 | 1027 |
1033 void RenderTableSection::computeOverflowFromCells(unsigned totalRows, unsigned n
EffCols) | 1028 void RenderTableSection::computeOverflowFromCells(unsigned totalRows, unsigned n
EffCols) |
(...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1730 else | 1725 else |
1731 cellLocation.setX(table()->columnPositions()[effectiveColumn] + horizont
alBorderSpacing); | 1726 cellLocation.setX(table()->columnPositions()[effectiveColumn] + horizont
alBorderSpacing); |
1732 | 1727 |
1733 cell->setLogicalLocation(cellLocation); | 1728 cell->setLogicalLocation(cellLocation); |
1734 | 1729 |
1735 if (!RuntimeEnabledFeatures::repaintAfterLayoutEnabled()) | 1730 if (!RuntimeEnabledFeatures::repaintAfterLayoutEnabled()) |
1736 view()->addLayoutDelta(oldCellLocation - cell->location()); | 1731 view()->addLayoutDelta(oldCellLocation - cell->location()); |
1737 } | 1732 } |
1738 | 1733 |
1739 } // namespace WebCore | 1734 } // namespace WebCore |
OLD | NEW |