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 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 | 317 |
318 int cellLogicalHeight = cell->logicalHeightForRowSizing(); | 318 int cellLogicalHeight = cell->logicalHeightForRowSizing(); |
319 m_rowPos[r + 1] = max(m_rowPos[r + 1], m_rowPos[cellStartRow] +
cellLogicalHeight); | 319 m_rowPos[r + 1] = max(m_rowPos[r + 1], m_rowPos[cellStartRow] +
cellLogicalHeight); |
320 | 320 |
321 // Find out the baseline. The baseline is set on the first row i
n a rowspan. | 321 // Find out the baseline. The baseline is set on the first row i
n a rowspan. |
322 if (cell->isBaselineAligned()) { | 322 if (cell->isBaselineAligned()) { |
323 LayoutUnit baselinePosition = cell->cellBaselinePosition(); | 323 LayoutUnit baselinePosition = cell->cellBaselinePosition(); |
324 if (baselinePosition > cell->borderBefore() + cell->paddingB
efore()) { | 324 if (baselinePosition > cell->borderBefore() + cell->paddingB
efore()) { |
325 m_grid[cellStartRow].baseline = max(m_grid[cellStartRow]
.baseline, baselinePosition); | 325 m_grid[cellStartRow].baseline = max(m_grid[cellStartRow]
.baseline, baselinePosition); |
326 // The descent of a cell that spans multiple rows does n
ot affect the height of the first row it spans, so don't let it | 326 // The descent of a cell that spans multiple rows does n
ot affect the height of the first row it spans, so don't let it |
327 // become the baseline descent applied to the rest of th
e row. | 327 // become the baseline descent applied to the rest of th
e row. Also we don't account for the baseline descent of |
328 if (cell->rowSpan() == 1) | 328 // non-spanning cells when computing a spanning cell's e
xtent. |
| 329 int cellStartRowBaselineDescent = 0; |
| 330 if (cell->rowSpan() == 1) { |
329 baselineDescent = max(baselineDescent, cellLogicalHe
ight - (baselinePosition - cell->intrinsicPaddingBefore())); | 331 baselineDescent = max(baselineDescent, cellLogicalHe
ight - (baselinePosition - cell->intrinsicPaddingBefore())); |
330 m_rowPos[cellStartRow + 1] = max<int>(m_rowPos[cellStart
Row + 1], m_rowPos[cellStartRow] + m_grid[cellStartRow].baseline + baselineDesce
nt); | 332 cellStartRowBaselineDescent = baselineDescent; |
| 333 } |
| 334 m_rowPos[cellStartRow + 1] = max<int>(m_rowPos[cellStart
Row + 1], m_rowPos[cellStartRow] + m_grid[cellStartRow].baseline + cellStartRowB
aselineDescent); |
331 } | 335 } |
332 } | 336 } |
333 } | 337 } |
334 } | 338 } |
335 | 339 |
336 // Add the border-spacing to our final position. | 340 // Add the border-spacing to our final position. |
337 m_rowPos[r + 1] += m_grid[r].rowRenderer ? spacing : 0; | 341 m_rowPos[r + 1] += m_grid[r].rowRenderer ? spacing : 0; |
338 m_rowPos[r + 1] = max(m_rowPos[r + 1], m_rowPos[r]); | 342 m_rowPos[r + 1] = max(m_rowPos[r + 1], m_rowPos[r]); |
339 } | 343 } |
340 | 344 |
(...skipping 1117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1458 info.addMember(logicalHeight, "logicalHeight"); | 1462 info.addMember(logicalHeight, "logicalHeight"); |
1459 } | 1463 } |
1460 | 1464 |
1461 void RenderTableSection::CellStruct::reportMemoryUsage(MemoryObjectInfo* memoryO
bjectInfo) const | 1465 void RenderTableSection::CellStruct::reportMemoryUsage(MemoryObjectInfo* memoryO
bjectInfo) const |
1462 { | 1466 { |
1463 MemoryClassInfo info(memoryObjectInfo, this, PlatformMemoryTypes::Rendering)
; | 1467 MemoryClassInfo info(memoryObjectInfo, this, PlatformMemoryTypes::Rendering)
; |
1464 info.addMember(cells, "cells"); | 1468 info.addMember(cells, "cells"); |
1465 } | 1469 } |
1466 | 1470 |
1467 } // namespace WebCore | 1471 } // namespace WebCore |
OLD | NEW |