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 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
513 #endif | 513 #endif |
514 | 514 |
515 ASSERT(!needsLayout()); | 515 ASSERT(!needsLayout()); |
516 | 516 |
517 RenderTableCell* cell; | 517 RenderTableCell* cell; |
518 | 518 |
519 RenderView* viewRenderer = view(); | 519 RenderView* viewRenderer = view(); |
520 LayoutStateMaintainer statePusher(viewRenderer); | 520 LayoutStateMaintainer statePusher(viewRenderer); |
521 | 521 |
522 m_rowPos.resize(m_grid.size() + 1); | 522 m_rowPos.resize(m_grid.size() + 1); |
523 m_rowPos[0] = table()->vBorderSpacing(); | 523 |
| 524 // We ignore the border-spacing on any non-top section as it is already incl
uded in the previous section's last row position. |
| 525 if (this == table()->topSection()) |
| 526 m_rowPos[0] = table()->vBorderSpacing(); |
| 527 else |
| 528 m_rowPos[0] = 0; |
524 | 529 |
525 SpanningRenderTableCells rowSpanCells; | 530 SpanningRenderTableCells rowSpanCells; |
526 | 531 |
527 for (unsigned r = 0; r < m_grid.size(); r++) { | 532 for (unsigned r = 0; r < m_grid.size(); r++) { |
528 m_grid[r].baseline = 0; | 533 m_grid[r].baseline = 0; |
529 LayoutUnit baselineDescent = 0; | 534 LayoutUnit baselineDescent = 0; |
530 | 535 |
531 // Our base size is the biggest logical height from our cells' styles (e
xcluding row spanning cells). | 536 // Our base size is the biggest logical height from our cells' styles (e
xcluding row spanning cells). |
532 m_rowPos[r + 1] = max(m_rowPos[r] + minimumValueForLength(m_grid[r].logi
calHeight, 0, viewRenderer).round(), 0); | 537 m_rowPos[r + 1] = max(m_rowPos[r] + minimumValueForLength(m_grid[r].logi
calHeight, 0, viewRenderer).round(), 0); |
533 | 538 |
(...skipping 1158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1692 if (!style()->isLeftToRightDirection()) | 1697 if (!style()->isLeftToRightDirection()) |
1693 cellLocation.setX(table()->columnPositions()[table()->numEffCols()] - ta
ble()->columnPositions()[table()->colToEffCol(cell->col() + cell->colSpan())] +
horizontalBorderSpacing); | 1698 cellLocation.setX(table()->columnPositions()[table()->numEffCols()] - ta
ble()->columnPositions()[table()->colToEffCol(cell->col() + cell->colSpan())] +
horizontalBorderSpacing); |
1694 else | 1699 else |
1695 cellLocation.setX(table()->columnPositions()[effectiveColumn] + horizont
alBorderSpacing); | 1700 cellLocation.setX(table()->columnPositions()[effectiveColumn] + horizont
alBorderSpacing); |
1696 | 1701 |
1697 cell->setLogicalLocation(cellLocation); | 1702 cell->setLogicalLocation(cellLocation); |
1698 view()->addLayoutDelta(oldCellLocation - cell->location()); | 1703 view()->addLayoutDelta(oldCellLocation - cell->location()); |
1699 } | 1704 } |
1700 | 1705 |
1701 } // namespace WebCore | 1706 } // namespace WebCore |
OLD | NEW |