| 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 939 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 950 | 950 |
| 951 LayoutUnit firstLineBaseline = m_grid[0].baseline; | 951 LayoutUnit firstLineBaseline = m_grid[0].baseline; |
| 952 if (firstLineBaseline) | 952 if (firstLineBaseline) |
| 953 return firstLineBaseline + m_rowPos[0]; | 953 return firstLineBaseline + m_rowPos[0]; |
| 954 | 954 |
| 955 firstLineBaseline = -1; | 955 firstLineBaseline = -1; |
| 956 const Row& firstRow = m_grid[0].row; | 956 const Row& firstRow = m_grid[0].row; |
| 957 for (size_t i = 0; i < firstRow.size(); ++i) { | 957 for (size_t i = 0; i < firstRow.size(); ++i) { |
| 958 const CellStruct& cs = firstRow.at(i); | 958 const CellStruct& cs = firstRow.at(i); |
| 959 const RenderTableCell* cell = cs.primaryCell(); | 959 const RenderTableCell* cell = cs.primaryCell(); |
| 960 // Only cells with content have a baseline | 960 if (cell) |
| 961 if (cell && cell->contentLogicalHeight()) | |
| 962 firstLineBaseline = max(firstLineBaseline, cell->logicalTop() + cell
->paddingBefore() + cell->borderBefore() + cell->contentLogicalHeight()); | 961 firstLineBaseline = max(firstLineBaseline, cell->logicalTop() + cell
->paddingBefore() + cell->borderBefore() + cell->contentLogicalHeight()); |
| 963 } | 962 } |
| 964 | 963 |
| 965 return firstLineBaseline; | 964 return firstLineBaseline; |
| 966 } | 965 } |
| 967 | 966 |
| 968 void RenderTableSection::paint(PaintInfo& paintInfo, const LayoutPoint& paintOff
set) | 967 void RenderTableSection::paint(PaintInfo& paintInfo, const LayoutPoint& paintOff
set) |
| 969 { | 968 { |
| 970 // put this back in when all layout tests can handle it | 969 // put this back in when all layout tests can handle it |
| 971 // ASSERT(!needsLayout()); | 970 // ASSERT(!needsLayout()); |
| (...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1477 if (!cell->styleForCellFlow()->isLeftToRightDirection()) | 1476 if (!cell->styleForCellFlow()->isLeftToRightDirection()) |
| 1478 cellLocation.setX(table()->columnPositions()[table()->numEffCols()] - ta
ble()->columnPositions()[table()->colToEffCol(cell->col() + cell->colSpan())] +
horizontalBorderSpacing); | 1477 cellLocation.setX(table()->columnPositions()[table()->numEffCols()] - ta
ble()->columnPositions()[table()->colToEffCol(cell->col() + cell->colSpan())] +
horizontalBorderSpacing); |
| 1479 else | 1478 else |
| 1480 cellLocation.setX(table()->columnPositions()[effectiveColumn] + horizont
alBorderSpacing); | 1479 cellLocation.setX(table()->columnPositions()[effectiveColumn] + horizont
alBorderSpacing); |
| 1481 | 1480 |
| 1482 cell->setLogicalLocation(cellLocation); | 1481 cell->setLogicalLocation(cellLocation); |
| 1483 view()->addLayoutDelta(oldCellLocation - cell->location()); | 1482 view()->addLayoutDelta(oldCellLocation - cell->location()); |
| 1484 } | 1483 } |
| 1485 | 1484 |
| 1486 } // namespace WebCore | 1485 } // namespace WebCore |
| OLD | NEW |