Chromium Code Reviews| 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 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 376 static bool compareRowSpanCellsInHeightDistributionOrder(const RenderTableCell* cell2, const RenderTableCell* cell1) | 376 static bool compareRowSpanCellsInHeightDistributionOrder(const RenderTableCell* cell2, const RenderTableCell* cell1) |
| 377 { | 377 { |
| 378 unsigned cellRowIndex1 = cell1->rowIndex(); | 378 unsigned cellRowIndex1 = cell1->rowIndex(); |
| 379 unsigned cellRowSpan1 = cell1->rowSpan(); | 379 unsigned cellRowSpan1 = cell1->rowSpan(); |
| 380 unsigned cellRowIndex2 = cell2->rowIndex(); | 380 unsigned cellRowIndex2 = cell2->rowIndex(); |
| 381 unsigned cellRowSpan2 = cell2->rowSpan(); | 381 unsigned cellRowSpan2 = cell2->rowSpan(); |
| 382 | 382 |
| 383 if (cellRowIndex1 == cellRowIndex2 && cellRowSpan1 == cellRowSpan2) | 383 if (cellRowIndex1 == cellRowIndex2 && cellRowSpan1 == cellRowSpan2) |
| 384 return (cell2->logicalHeightForRowSizing() > cell1->logicalHeightForRowS izing()); | 384 return (cell2->logicalHeightForRowSizing() > cell1->logicalHeightForRowS izing()); |
| 385 | 385 |
| 386 return (cellRowIndex2 >= cellRowIndex1 && (cellRowIndex2 + cellRowSpan2) <= (cellRowIndex1 + cellRowSpan1)); | 386 bool ret = (cellRowIndex2 >= cellRowIndex1 && (cellRowIndex2 + cellRowSpan2) <= (cellRowIndex1 + cellRowSpan1)); |
|
Julien - ping for review
2013/08/21 19:27:02
If ret is true, you will return true (because !ret
a.suchit
2013/08/22 10:26:17
Done.
| |
| 387 | |
| 388 if (!ret && !(cellRowIndex1 >= cellRowIndex2 && (cellRowIndex1 + cellRowSpan 1) <= (cellRowIndex2 + cellRowSpan2))) | |
| 389 return (cellRowIndex2 < cellRowIndex1); | |
| 390 | |
| 391 return ret; | |
|
Julien - ping for review
2013/08/21 19:27:02
|ret| is not a great name for a variable really.
a.suchit
2013/08/22 10:26:17
Done.
| |
| 387 } | 392 } |
| 388 | 393 |
| 389 // Distribute rowSpan cell height in rows those comes in rowSpan cell based on t he ratio of row's height if | 394 // Distribute rowSpan cell height in rows those comes in rowSpan cell based on t he ratio of row's height if |
| 390 // 1. RowSpan cell height is greater then the total height of rows in rowSpan ce ll | 395 // 1. RowSpan cell height is greater then the total height of rows in rowSpan ce ll |
| 391 void RenderTableSection::distributeRowSpanHeightToRows(SpanningRenderTableCells& rowSpanCells) | 396 void RenderTableSection::distributeRowSpanHeightToRows(SpanningRenderTableCells& rowSpanCells) |
| 392 { | 397 { |
| 393 ASSERT(rowSpanCells.size()); | 398 ASSERT(rowSpanCells.size()); |
| 394 | 399 |
| 395 // 'rowSpanCells' list is already sorted based on the cells rowIndex in asce nding order | 400 // 'rowSpanCells' list is already sorted based on the cells rowIndex in asce nding order |
| 396 // Arrange row spanning cell in the order in which we need to process first. | 401 // Arrange row spanning cell in the order in which we need to process first. |
| (...skipping 1287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1684 if (!style()->isLeftToRightDirection()) | 1689 if (!style()->isLeftToRightDirection()) |
| 1685 cellLocation.setX(table()->columnPositions()[table()->numEffCols()] - ta ble()->columnPositions()[table()->colToEffCol(cell->col() + cell->colSpan())] + horizontalBorderSpacing); | 1690 cellLocation.setX(table()->columnPositions()[table()->numEffCols()] - ta ble()->columnPositions()[table()->colToEffCol(cell->col() + cell->colSpan())] + horizontalBorderSpacing); |
| 1686 else | 1691 else |
| 1687 cellLocation.setX(table()->columnPositions()[effectiveColumn] + horizont alBorderSpacing); | 1692 cellLocation.setX(table()->columnPositions()[effectiveColumn] + horizont alBorderSpacing); |
| 1688 | 1693 |
| 1689 cell->setLogicalLocation(cellLocation); | 1694 cell->setLogicalLocation(cellLocation); |
| 1690 view()->addLayoutDelta(oldCellLocation - cell->location()); | 1695 view()->addLayoutDelta(oldCellLocation - cell->location()); |
| 1691 } | 1696 } |
| 1692 | 1697 |
| 1693 } // namespace WebCore | 1698 } // namespace WebCore |
| OLD | NEW |