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 28 matching lines...) Expand all Loading... |
759 endCol++; | 757 endCol++; |
760 } | 758 } |
761 int tableLayoutLogicalWidth = columnPos[endCol] - columnPos[startCol
umn] - table()->hBorderSpacing(); | 759 int tableLayoutLogicalWidth = columnPos[endCol] - columnPos[startCol
umn] - table()->hBorderSpacing(); |
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 rowRenderer->layoutIfNeeded(); | 764 rowRenderer->layoutIfNeeded(); |
767 } | 765 } |
768 | 766 |
769 statePusher.pop(); | |
770 clearNeedsLayout(); | 767 clearNeedsLayout(); |
771 } | 768 } |
772 | 769 |
773 void RenderTableSection::distributeExtraLogicalHeightToPercentRows(int& extraLog
icalHeight, int totalPercent) | 770 void RenderTableSection::distributeExtraLogicalHeightToPercentRows(int& extraLog
icalHeight, int totalPercent) |
774 { | 771 { |
775 if (!totalPercent) | 772 if (!totalPercent) |
776 return; | 773 return; |
777 | 774 |
778 unsigned totalRows = m_grid.size(); | 775 unsigned totalRows = m_grid.size(); |
779 int totalHeight = m_rowPos[totalRows] + extraLogicalHeight; | 776 int totalHeight = m_rowPos[totalRows] + extraLogicalHeight; |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1009 cells[i]->setLogicalHeight(cells[i]->logicalHeight() + rowHe
ightIncreaseForPagination); | 1006 cells[i]->setLogicalHeight(cells[i]->logicalHeight() + rowHe
ightIncreaseForPagination); |
1010 } | 1007 } |
1011 } | 1008 } |
1012 } | 1009 } |
1013 | 1010 |
1014 ASSERT(!needsLayout()); | 1011 ASSERT(!needsLayout()); |
1015 | 1012 |
1016 setLogicalHeight(m_rowPos[totalRows]); | 1013 setLogicalHeight(m_rowPos[totalRows]); |
1017 | 1014 |
1018 computeOverflowFromCells(totalRows, nEffCols); | 1015 computeOverflowFromCells(totalRows, nEffCols); |
1019 | |
1020 statePusher.pop(); | |
1021 } | 1016 } |
1022 | 1017 |
1023 void RenderTableSection::computeOverflowFromCells() | 1018 void RenderTableSection::computeOverflowFromCells() |
1024 { | 1019 { |
1025 unsigned totalRows = m_grid.size(); | 1020 unsigned totalRows = m_grid.size(); |
1026 unsigned nEffCols = table()->numEffCols(); | 1021 unsigned nEffCols = table()->numEffCols(); |
1027 computeOverflowFromCells(totalRows, nEffCols); | 1022 computeOverflowFromCells(totalRows, nEffCols); |
1028 } | 1023 } |
1029 | 1024 |
1030 void RenderTableSection::computeOverflowFromCells(unsigned totalRows, unsigned n
EffCols) | 1025 void RenderTableSection::computeOverflowFromCells(unsigned totalRows, unsigned n
EffCols) |
(...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1727 else | 1722 else |
1728 cellLocation.setX(table()->columnPositions()[effectiveColumn] + horizont
alBorderSpacing); | 1723 cellLocation.setX(table()->columnPositions()[effectiveColumn] + horizont
alBorderSpacing); |
1729 | 1724 |
1730 cell->setLogicalLocation(cellLocation); | 1725 cell->setLogicalLocation(cellLocation); |
1731 | 1726 |
1732 if (!RuntimeEnabledFeatures::repaintAfterLayoutEnabled()) | 1727 if (!RuntimeEnabledFeatures::repaintAfterLayoutEnabled()) |
1733 view()->addLayoutDelta(oldCellLocation - cell->location()); | 1728 view()->addLayoutDelta(oldCellLocation - cell->location()); |
1734 } | 1729 } |
1735 | 1730 |
1736 } // namespace WebCore | 1731 } // namespace WebCore |
OLD | NEW |