| 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. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009, 2010, 2013 Apple Inc. |
| 8 * All rights reserved. | 8 * All rights reserved. |
| 9 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 9 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
| 10 * | 10 * |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 currentSpan = cSpan; | 279 currentSpan = cSpan; |
| 280 } else { | 280 } else { |
| 281 if (cSpan < columns[m_cCol].span) | 281 if (cSpan < columns[m_cCol].span) |
| 282 table()->splitEffectiveColumn(m_cCol, cSpan); | 282 table()->splitEffectiveColumn(m_cCol, cSpan); |
| 283 currentSpan = columns[m_cCol].span; | 283 currentSpan = columns[m_cCol].span; |
| 284 } | 284 } |
| 285 for (unsigned r = 0; r < rSpan; r++) { | 285 for (unsigned r = 0; r < rSpan; r++) { |
| 286 ensureCols(insertionRow + r, m_cCol + 1); | 286 ensureCols(insertionRow + r, m_cCol + 1); |
| 287 CellStruct& c = cellAt(insertionRow + r, m_cCol); | 287 CellStruct& c = cellAt(insertionRow + r, m_cCol); |
| 288 ASSERT(cell); | 288 ASSERT(cell); |
| 289 c.cells.append(cell); | 289 c.cells.push_back(cell); |
| 290 checkThatVectorIsDOMOrdered(c.cells); | 290 checkThatVectorIsDOMOrdered(c.cells); |
| 291 // If cells overlap then we take the slow path for painting. | 291 // If cells overlap then we take the slow path for painting. |
| 292 if (c.cells.size() > 1) | 292 if (c.cells.size() > 1) |
| 293 m_hasMultipleCellLevels = true; | 293 m_hasMultipleCellLevels = true; |
| 294 if (inColSpan) | 294 if (inColSpan) |
| 295 c.inColSpan = true; | 295 c.inColSpan = true; |
| 296 } | 296 } |
| 297 m_cCol++; | 297 m_cCol++; |
| 298 cSpan -= currentSpan; | 298 cSpan -= currentSpan; |
| 299 inColSpan = true; | 299 inColSpan = true; |
| (...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 642 unsigned lastRowSpan = 0; | 642 unsigned lastRowSpan = 0; |
| 643 | 643 |
| 644 Vector<int> rowsCountWithOnlySpanningCells; | 644 Vector<int> rowsCountWithOnlySpanningCells; |
| 645 | 645 |
| 646 // At this stage, Height of the rows are zero for the one containing only | 646 // At this stage, Height of the rows are zero for the one containing only |
| 647 // spanning cells. | 647 // spanning cells. |
| 648 int count = 0; | 648 int count = 0; |
| 649 for (unsigned row = 0; row < m_grid.size(); row++) { | 649 for (unsigned row = 0; row < m_grid.size(); row++) { |
| 650 if (rowHasOnlySpanningCells(row)) | 650 if (rowHasOnlySpanningCells(row)) |
| 651 count++; | 651 count++; |
| 652 rowsCountWithOnlySpanningCells.append(count); | 652 rowsCountWithOnlySpanningCells.push_back(count); |
| 653 } | 653 } |
| 654 | 654 |
| 655 for (unsigned i = 0; i < rowSpanCells.size(); i++) { | 655 for (unsigned i = 0; i < rowSpanCells.size(); i++) { |
| 656 LayoutTableCell* cell = rowSpanCells[i]; | 656 LayoutTableCell* cell = rowSpanCells[i]; |
| 657 | 657 |
| 658 unsigned rowIndex = cell->rowIndex(); | 658 unsigned rowIndex = cell->rowIndex(); |
| 659 | 659 |
| 660 unsigned rowSpan = cell->rowSpan(); | 660 unsigned rowSpan = cell->rowSpan(); |
| 661 | 661 |
| 662 unsigned spanningCellEndIndex = rowIndex + rowSpan; | 662 unsigned spanningCellEndIndex = rowIndex + rowSpan; |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 889 // Entering or extending a range of unstretchable rows. We enter this | 889 // Entering or extending a range of unstretchable rows. We enter this |
| 890 // mode when a cell in a row crosses a fragmentainer boundary, and | 890 // mode when a cell in a row crosses a fragmentainer boundary, and |
| 891 // we'll stay in this mode until we get to a row where we're past all | 891 // we'll stay in this mode until we get to a row where we're past all |
| 892 // rowspanned cells that we encountered while in this mode. | 892 // rowspanned cells that we encountered while in this mode. |
| 893 DCHECK(state.isPaginated()); | 893 DCHECK(state.isPaginated()); |
| 894 unsigned rowIndexBelowCell = r + cell->rowSpan(); | 894 unsigned rowIndexBelowCell = r + cell->rowSpan(); |
| 895 indexOfFirstStretchableRow = | 895 indexOfFirstStretchableRow = |
| 896 std::max(indexOfFirstStretchableRow, rowIndexBelowCell); | 896 std::max(indexOfFirstStretchableRow, rowIndexBelowCell); |
| 897 } else if (cell->rowSpan() > 1) { | 897 } else if (cell->rowSpan() > 1) { |
| 898 DCHECK(!rowSpanCells.contains(cell)); | 898 DCHECK(!rowSpanCells.contains(cell)); |
| 899 rowSpanCells.append(cell); | 899 rowSpanCells.push_back(cell); |
| 900 } | 900 } |
| 901 | 901 |
| 902 if (cell->hasOverrideLogicalContentHeight()) { | 902 if (cell->hasOverrideLogicalContentHeight()) { |
| 903 cell->clearIntrinsicPadding(); | 903 cell->clearIntrinsicPadding(); |
| 904 cell->clearOverrideSize(); | 904 cell->clearOverrideSize(); |
| 905 cell->forceChildLayout(); | 905 cell->forceChildLayout(); |
| 906 } | 906 } |
| 907 | 907 |
| 908 if (cell->rowSpan() == 1) | 908 if (cell->rowSpan() == 1) |
| 909 m_rowPos[r + 1] = std::max( | 909 m_rowPos[r + 1] = std::max( |
| (...skipping 1161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2071 // the header in all columns. | 2071 // the header in all columns. |
| 2072 // Note that this is in flow thread coordinates, not visual coordinates. The | 2072 // Note that this is in flow thread coordinates, not visual coordinates. The |
| 2073 // enclosing LayoutFlowThread will convert to visual coordinates. | 2073 // enclosing LayoutFlowThread will convert to visual coordinates. |
| 2074 if (table()->header() == this && isRepeatingHeaderGroup()) | 2074 if (table()->header() == this && isRepeatingHeaderGroup()) |
| 2075 rect.setHeight(table()->logicalHeight()); | 2075 rect.setHeight(table()->logicalHeight()); |
| 2076 return LayoutTableBoxComponent::mapToVisualRectInAncestorSpace(ancestor, rect, | 2076 return LayoutTableBoxComponent::mapToVisualRectInAncestorSpace(ancestor, rect, |
| 2077 flags); | 2077 flags); |
| 2078 } | 2078 } |
| 2079 | 2079 |
| 2080 } // namespace blink | 2080 } // namespace blink |
| OLD | NEW |