| 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 937 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 948 m_overflowingCells.clear(); | 948 m_overflowingCells.clear(); |
| 949 m_forceSlowPaintPathWithOverflowingCell = false; | 949 m_forceSlowPaintPathWithOverflowingCell = false; |
| 950 | 950 |
| 951 int vspacing = table()->vBorderSpacing(); | 951 int vspacing = table()->vBorderSpacing(); |
| 952 unsigned nEffCols = table()->numEffCols(); | 952 unsigned nEffCols = table()->numEffCols(); |
| 953 | 953 |
| 954 LayoutState state(*this, locationOffset()); | 954 LayoutState state(*this, locationOffset()); |
| 955 | 955 |
| 956 for (unsigned r = 0; r < totalRows; r++) { | 956 for (unsigned r = 0; r < totalRows; r++) { |
| 957 // Set the row's x/y position and width/height. | 957 // Set the row's x/y position and width/height. |
| 958 if (RenderTableRow* rowRenderer = m_grid[r].rowRenderer) { | 958 RenderTableRow* rowRenderer = m_grid[r].rowRenderer; |
| 959 if (rowRenderer) { |
| 959 rowRenderer->setLocation(LayoutPoint(0, m_rowPos[r])); | 960 rowRenderer->setLocation(LayoutPoint(0, m_rowPos[r])); |
| 960 rowRenderer->setLogicalWidth(logicalWidth()); | 961 rowRenderer->setLogicalWidth(logicalWidth()); |
| 961 rowRenderer->setLogicalHeight(m_rowPos[r + 1] - m_rowPos[r] - vspaci
ng); | 962 rowRenderer->setLogicalHeight(m_rowPos[r + 1] - m_rowPos[r] - vspaci
ng); |
| 962 rowRenderer->updateLayerTransformAfterLayout(); | 963 rowRenderer->updateLayerTransformAfterLayout(); |
| 963 rowRenderer->clearAllOverflows(); | 964 rowRenderer->clearAllOverflows(); |
| 964 rowRenderer->addVisualEffectOverflow(); | 965 rowRenderer->addVisualEffectOverflow(); |
| 965 } | 966 } |
| 966 | 967 |
| 967 int rowHeightIncreaseForPagination = 0; | 968 int rowHeightIncreaseForPagination = 0; |
| 968 | 969 |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1046 // FIXME: Pagination might have made us change size. For now jus
t shrink or grow the cell to fit without doing a relayout. | 1047 // FIXME: Pagination might have made us change size. For now jus
t shrink or grow the cell to fit without doing a relayout. |
| 1047 // 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 | 1048 // 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 |
| 1048 // either. It's at least stable though and won't result in an in
finite # of relayouts that may never stabilize. | 1049 // either. It's at least stable though and won't result in an in
finite # of relayouts that may never stabilize. |
| 1049 LayoutUnit oldLogicalHeight = cell->logicalHeight(); | 1050 LayoutUnit oldLogicalHeight = cell->logicalHeight(); |
| 1050 if (oldLogicalHeight > rHeight) | 1051 if (oldLogicalHeight > rHeight) |
| 1051 rowHeightIncreaseForPagination = std::max<int>(rowHeightIncr
easeForPagination, oldLogicalHeight - rHeight); | 1052 rowHeightIncreaseForPagination = std::max<int>(rowHeightIncr
easeForPagination, oldLogicalHeight - rHeight); |
| 1052 cell->setLogicalHeight(rHeight); | 1053 cell->setLogicalHeight(rHeight); |
| 1053 cell->computeOverflow(oldLogicalHeight, false); | 1054 cell->computeOverflow(oldLogicalHeight, false); |
| 1054 } | 1055 } |
| 1055 | 1056 |
| 1057 if (rowRenderer) |
| 1058 rowRenderer->addOverflowFromCell(cell); |
| 1059 |
| 1056 LayoutSize childOffset(cell->location() - oldCellRect.location()); | 1060 LayoutSize childOffset(cell->location() - oldCellRect.location()); |
| 1057 if (childOffset.width() || childOffset.height()) { | 1061 if (childOffset.width() || childOffset.height()) { |
| 1058 // If the child moved, we have to issue paint invalidations to i
t as well as any floating/positioned | 1062 // If the child moved, we have to issue paint invalidations to i
t as well as any floating/positioned |
| 1059 // descendants. An exception is if we need a layout. In this cas
e, we know we're going to | 1063 // descendants. An exception is if we need a layout. In this cas
e, we know we're going to |
| 1060 // issue paint invalidations ourselves (and the child) anyway. | 1064 // issue paint invalidations ourselves (and the child) anyway. |
| 1061 if (!table()->selfNeedsLayout()) | 1065 if (!table()->selfNeedsLayout()) |
| 1062 cell->setMayNeedPaintInvalidation(true); | 1066 cell->setMayNeedPaintInvalidation(true); |
| 1063 } | 1067 } |
| 1064 } | 1068 } |
| 1065 if (rowHeightIncreaseForPagination) { | 1069 if (rowHeightIncreaseForPagination) { |
| (...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1610 // FIXME: The table's direction should determine our row's direction, not th
e section's (see bug 96691). | 1614 // FIXME: The table's direction should determine our row's direction, not th
e section's (see bug 96691). |
| 1611 if (!style()->isLeftToRightDirection()) | 1615 if (!style()->isLeftToRightDirection()) |
| 1612 cellLocation.setX(table()->columnPositions()[table()->numEffCols()] - ta
ble()->columnPositions()[table()->colToEffCol(cell->col() + cell->colSpan())] +
horizontalBorderSpacing); | 1616 cellLocation.setX(table()->columnPositions()[table()->numEffCols()] - ta
ble()->columnPositions()[table()->colToEffCol(cell->col() + cell->colSpan())] +
horizontalBorderSpacing); |
| 1613 else | 1617 else |
| 1614 cellLocation.setX(table()->columnPositions()[effectiveColumn] + horizont
alBorderSpacing); | 1618 cellLocation.setX(table()->columnPositions()[effectiveColumn] + horizont
alBorderSpacing); |
| 1615 | 1619 |
| 1616 cell->setLogicalLocation(cellLocation); | 1620 cell->setLogicalLocation(cellLocation); |
| 1617 } | 1621 } |
| 1618 | 1622 |
| 1619 } // namespace blink | 1623 } // namespace blink |
| OLD | NEW |