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 927 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
938 | 938 |
939 LayoutUnit firstLineBaseline = m_grid[0].baseline; | 939 LayoutUnit firstLineBaseline = m_grid[0].baseline; |
940 if (firstLineBaseline) | 940 if (firstLineBaseline) |
941 return firstLineBaseline + m_rowPos[0]; | 941 return firstLineBaseline + m_rowPos[0]; |
942 | 942 |
943 firstLineBaseline = -1; | 943 firstLineBaseline = -1; |
944 const Row& firstRow = m_grid[0].row; | 944 const Row& firstRow = m_grid[0].row; |
945 for (size_t i = 0; i < firstRow.size(); ++i) { | 945 for (size_t i = 0; i < firstRow.size(); ++i) { |
946 const CellStruct& cs = firstRow.at(i); | 946 const CellStruct& cs = firstRow.at(i); |
947 const RenderTableCell* cell = cs.primaryCell(); | 947 const RenderTableCell* cell = cs.primaryCell(); |
948 // Only cells with content have a baseline | 948 if (cell) |
949 if (cell && cell->contentLogicalHeight()) | |
950 firstLineBaseline = max(firstLineBaseline, cell->logicalTop() + cell
->paddingBefore() + cell->borderBefore() + cell->contentLogicalHeight()); | 949 firstLineBaseline = max(firstLineBaseline, cell->logicalTop() + cell
->paddingBefore() + cell->borderBefore() + cell->contentLogicalHeight()); |
951 } | 950 } |
952 | 951 |
953 return firstLineBaseline; | 952 return firstLineBaseline; |
954 } | 953 } |
955 | 954 |
956 void RenderTableSection::paint(PaintInfo& paintInfo, const LayoutPoint& paintOff
set) | 955 void RenderTableSection::paint(PaintInfo& paintInfo, const LayoutPoint& paintOff
set) |
957 { | 956 { |
958 // put this back in when all layout tests can handle it | 957 // put this back in when all layout tests can handle it |
959 // ASSERT(!needsLayout()); | 958 // ASSERT(!needsLayout()); |
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1491 if (!cell->styleForCellFlow()->isLeftToRightDirection()) | 1490 if (!cell->styleForCellFlow()->isLeftToRightDirection()) |
1492 cellLocation.setX(table()->columnPositions()[table()->numEffCols()] - ta
ble()->columnPositions()[table()->colToEffCol(cell->col() + cell->colSpan())] +
horizontalBorderSpacing); | 1491 cellLocation.setX(table()->columnPositions()[table()->numEffCols()] - ta
ble()->columnPositions()[table()->colToEffCol(cell->col() + cell->colSpan())] +
horizontalBorderSpacing); |
1493 else | 1492 else |
1494 cellLocation.setX(table()->columnPositions()[effectiveColumn] + horizont
alBorderSpacing); | 1493 cellLocation.setX(table()->columnPositions()[effectiveColumn] + horizont
alBorderSpacing); |
1495 | 1494 |
1496 cell->setLogicalLocation(cellLocation); | 1495 cell->setLogicalLocation(cellLocation); |
1497 view()->addLayoutDelta(oldCellLocation - cell->location()); | 1496 view()->addLayoutDelta(oldCellLocation - cell->location()); |
1498 } | 1497 } |
1499 | 1498 |
1500 } // namespace WebCore | 1499 } // namespace WebCore |
OLD | NEW |