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 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 539 lastRowIndex = rowIndex; | 539 lastRowIndex = rowIndex; |
| 540 lastRowSpan = rowSpan; | 540 lastRowSpan = rowSpan; |
| 541 | 541 |
| 542 struct SpanningRowsHeight spanningRowsHeight; | 542 struct SpanningRowsHeight spanningRowsHeight; |
| 543 | 543 |
| 544 populateSpanningRowsHeightFromCell(cell, spanningRowsHeight); | 544 populateSpanningRowsHeightFromCell(cell, spanningRowsHeight); |
| 545 | 545 |
| 546 if (spanningRowsHeight.rowWithOnlySpanningCells) | 546 if (spanningRowsHeight.rowWithOnlySpanningCells) |
| 547 updateRowsHeightHavingOnlySpanningCells(cell, spanningRowsHeight); | 547 updateRowsHeightHavingOnlySpanningCells(cell, spanningRowsHeight); |
| 548 | 548 |
| 549 if (!spanningRowsHeight.totalRowsHeight || spanningRowsHeight.spanningCe llHeightIgnoringBorderSpacing <= spanningRowsHeight.totalRowsHeight) { | 549 |
| 550 if (!spanningRowsHeight.totalRowsHeight) { | |
| 551 if (spanningRowsHeight.spanningCellHeightIgnoringBorderSpacing) | |
|
Julien - ping for review
2013/11/13 07:13:17
Please add a comment as to why we do this, ideally
a.suchit
2013/11/19 11:59:56
Done.
| |
| 552 m_rowPos[rowIndex + rowSpan] += spanningRowsHeight.spanningCellH eightIgnoringBorderSpacing + borderSpacingForRow(rowIndex + rowSpan -1); | |
|
Julien - ping for review
2013/11/13 07:13:17
Coding style violation: there should be a space af
a.suchit
2013/11/19 11:59:56
Done.
| |
| 553 | |
| 550 extraHeightToPropagate = m_rowPos[rowIndex + rowSpan] - originalBefo rePosition; | 554 extraHeightToPropagate = m_rowPos[rowIndex + rowSpan] - originalBefo rePosition; |
| 551 continue; | 555 continue; |
| 552 } | 556 } |
| 557 | |
| 558 if (spanningRowsHeight.spanningCellHeightIgnoringBorderSpacing <= spanni ngRowsHeight.totalRowsHeight) { | |
| 559 extraHeightToPropagate = m_rowPos[rowIndex + rowSpan] - originalBefo rePosition; | |
| 560 continue; | |
| 561 } | |
| 553 | 562 |
| 554 int totalPercent = 0; | 563 int totalPercent = 0; |
| 555 int totalAutoRowsHeight = 0; | 564 int totalAutoRowsHeight = 0; |
| 556 int totalRemainingRowsHeight = spanningRowsHeight.totalRowsHeight; | 565 int totalRemainingRowsHeight = spanningRowsHeight.totalRowsHeight; |
| 557 | 566 |
| 558 // FIXME: Inner spanning cell height should not change if it have fixed height when it's parent spanning cell | 567 // FIXME: Inner spanning cell height should not change if it have fixed height when it's parent spanning cell |
| 559 // is distributing it's extra height in rows. | 568 // is distributing it's extra height in rows. |
| 560 | 569 |
| 561 // Calculate total percentage, total auto rows height and total rows hei ght except percent rows. | 570 // Calculate total percentage, total auto rows height and total rows hei ght except percent rows. |
| 562 for (unsigned row = rowIndex; row < spanningCellEndIndex; row++) { | 571 for (unsigned row = rowIndex; row < spanningCellEndIndex; row++) { |
| (...skipping 1249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1812 if (!style()->isLeftToRightDirection()) | 1821 if (!style()->isLeftToRightDirection()) |
| 1813 cellLocation.setX(table()->columnPositions()[table()->numEffCols()] - ta ble()->columnPositions()[table()->colToEffCol(cell->col() + cell->colSpan())] + horizontalBorderSpacing); | 1822 cellLocation.setX(table()->columnPositions()[table()->numEffCols()] - ta ble()->columnPositions()[table()->colToEffCol(cell->col() + cell->colSpan())] + horizontalBorderSpacing); |
| 1814 else | 1823 else |
| 1815 cellLocation.setX(table()->columnPositions()[effectiveColumn] + horizont alBorderSpacing); | 1824 cellLocation.setX(table()->columnPositions()[effectiveColumn] + horizont alBorderSpacing); |
| 1816 | 1825 |
| 1817 cell->setLogicalLocation(cellLocation); | 1826 cell->setLogicalLocation(cellLocation); |
| 1818 view()->addLayoutDelta(oldCellLocation - cell->location()); | 1827 view()->addLayoutDelta(oldCellLocation - cell->location()); |
| 1819 } | 1828 } |
| 1820 | 1829 |
| 1821 } // namespace WebCore | 1830 } // namespace WebCore |
| OLD | NEW |