| 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 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 474 } | 474 } |
| 475 | 475 |
| 476 // Find out the baseline of the cell | 476 // Find out the baseline of the cell |
| 477 // If the cell's baseline is more then the row's baseline then the cell's baseli
ne become the row's baseline | 477 // If the cell's baseline is more then the row's baseline then the cell's baseli
ne become the row's baseline |
| 478 // and if the row's baseline goes out of the row's boundries then adjust row hei
ght accordingly. | 478 // and if the row's baseline goes out of the row's boundries then adjust row hei
ght accordingly. |
| 479 void RenderTableSection::updateBaselineForCell(RenderTableCell* cell, unsigned r
ow, LayoutUnit& baselineDescent) | 479 void RenderTableSection::updateBaselineForCell(RenderTableCell* cell, unsigned r
ow, LayoutUnit& baselineDescent) |
| 480 { | 480 { |
| 481 if (!cell->isBaselineAligned()) | 481 if (!cell->isBaselineAligned()) |
| 482 return; | 482 return; |
| 483 | 483 |
| 484 LayoutUnit baselinePosition = cell->cellBaselinePosition(); | 484 // Ignoring the intrinsic padding as it depends on knowing the row's baselin
e, which won't be accurate |
| 485 if (baselinePosition > cell->borderBefore() + cell->paddingBefore()) { | 485 // until the end of this function. |
| 486 LayoutUnit baselinePosition = cell->cellBaselinePosition() - cell->intrinsic
PaddingBefore(); |
| 487 if (baselinePosition > cell->borderBefore() + (cell->paddingBefore() - cell-
>intrinsicPaddingBefore())) { |
| 486 m_grid[row].baseline = max(m_grid[row].baseline, baselinePosition); | 488 m_grid[row].baseline = max(m_grid[row].baseline, baselinePosition); |
| 487 | 489 |
| 488 int cellStartRowBaselineDescent = 0; | 490 int cellStartRowBaselineDescent = 0; |
| 489 if (cell->rowSpan() == 1) { | 491 if (cell->rowSpan() == 1) { |
| 490 baselineDescent = max(baselineDescent, cell->logicalHeightForRowSizi
ng() - (baselinePosition - cell->intrinsicPaddingBefore())); | 492 baselineDescent = max(baselineDescent, cell->logicalHeightForRowSizi
ng() - baselinePosition); |
| 491 cellStartRowBaselineDescent = baselineDescent; | 493 cellStartRowBaselineDescent = baselineDescent; |
| 492 } | 494 } |
| 493 m_rowPos[row + 1] = max<int>(m_rowPos[row + 1], m_rowPos[row] + m_grid[r
ow].baseline + cellStartRowBaselineDescent); | 495 m_rowPos[row + 1] = max<int>(m_rowPos[row + 1], m_rowPos[row] + m_grid[r
ow].baseline + cellStartRowBaselineDescent); |
| 494 } | 496 } |
| 495 } | 497 } |
| 496 | 498 |
| 497 int RenderTableSection::calcRowLogicalHeight() | 499 int RenderTableSection::calcRowLogicalHeight() |
| 498 { | 500 { |
| 499 #ifndef NDEBUG | 501 #ifndef NDEBUG |
| 500 SetLayoutNeededForbiddenScope layoutForbiddenScope(this); | 502 SetLayoutNeededForbiddenScope layoutForbiddenScope(this); |
| (...skipping 1182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1683 if (!style()->isLeftToRightDirection()) | 1685 if (!style()->isLeftToRightDirection()) |
| 1684 cellLocation.setX(table()->columnPositions()[table()->numEffCols()] - ta
ble()->columnPositions()[table()->colToEffCol(cell->col() + cell->colSpan())] +
horizontalBorderSpacing); | 1686 cellLocation.setX(table()->columnPositions()[table()->numEffCols()] - ta
ble()->columnPositions()[table()->colToEffCol(cell->col() + cell->colSpan())] +
horizontalBorderSpacing); |
| 1685 else | 1687 else |
| 1686 cellLocation.setX(table()->columnPositions()[effectiveColumn] + horizont
alBorderSpacing); | 1688 cellLocation.setX(table()->columnPositions()[effectiveColumn] + horizont
alBorderSpacing); |
| 1687 | 1689 |
| 1688 cell->setLogicalLocation(cellLocation); | 1690 cell->setLogicalLocation(cellLocation); |
| 1689 view()->addLayoutDelta(oldCellLocation - cell->location()); | 1691 view()->addLayoutDelta(oldCellLocation - cell->location()); |
| 1690 } | 1692 } |
| 1691 | 1693 |
| 1692 } // namespace WebCore | 1694 } // namespace WebCore |
| OLD | NEW |