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 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
533 if (extraHeightToPropagate) { | 533 if (extraHeightToPropagate) { |
534 for (unsigned row = lastSpanningCellEndIndex + 1; row <= spanningCel lEndIndex; row++) | 534 for (unsigned row = lastSpanningCellEndIndex + 1; row <= spanningCel lEndIndex; row++) |
535 m_rowPos[row] += extraHeightToPropagate; | 535 m_rowPos[row] += extraHeightToPropagate; |
536 } | 536 } |
537 | 537 |
538 lastRowIndex = rowIndex; | 538 lastRowIndex = rowIndex; |
539 lastRowSpan = rowSpan; | 539 lastRowSpan = rowSpan; |
540 | 540 |
541 struct SpanningRowsHeight spanningRowsHeight; | 541 struct SpanningRowsHeight spanningRowsHeight; |
542 | 542 |
543 // Here we are handling only rows those have at least one visible cell w ithout rowspan value. | |
Julien - ping for review
2014/01/23 23:54:56
This comment really confuses me: it implies that p
a.suchit
2014/01/28 11:59:09
Sorry It is wrong comment here.
| |
543 populateSpanningRowsHeightFromCell(cell, spanningRowsHeight); | 544 populateSpanningRowsHeightFromCell(cell, spanningRowsHeight); |
544 | 545 |
546 // Here we are handling only rows those have only rowspanning cells and do not have any empty cell. | |
545 if (spanningRowsHeight.rowWithOnlySpanningCells) | 547 if (spanningRowsHeight.rowWithOnlySpanningCells) |
Julien - ping for review
2014/01/23 23:54:56
I was double-checking how we compute rowWithOnlySp
a.suchit
2014/01/28 11:59:09
Here, we are checking for any one row have only sp
| |
546 updateRowsHeightHavingOnlySpanningCells(cell, spanningRowsHeight); | 548 updateRowsHeightHavingOnlySpanningCells(cell, spanningRowsHeight); |
547 | 549 |
548 if (!spanningRowsHeight.totalRowsHeight || spanningRowsHeight.spanningCe llHeightIgnoringBorderSpacing <= spanningRowsHeight.totalRowsHeight) { | 550 // Here we are handling only rows those have rowspanning cell(s) and at least one empty cell. |
Julien - ping for review
2014/01/23 23:54:56
s/those/who/ or s/those/that/
How do you determin
a.suchit
2014/01/28 11:59:09
spanningRowsHeight.totalRowsHeight is spanning cel
| |
551 if (!spanningRowsHeight.totalRowsHeight) { | |
552 if (spanningRowsHeight.spanningCellHeightIgnoringBorderSpacing) | |
553 m_rowPos[rowIndex + rowSpan] += spanningRowsHeight.spanningCellH eightIgnoringBorderSpacing + borderSpacingForRow(rowIndex + rowSpan - 1); | |
554 | |
549 extraHeightToPropagate = m_rowPos[rowIndex + rowSpan] - originalBefo rePosition; | 555 extraHeightToPropagate = m_rowPos[rowIndex + rowSpan] - originalBefo rePosition; |
550 continue; | 556 continue; |
551 } | 557 } |
558 | |
559 if (spanningRowsHeight.spanningCellHeightIgnoringBorderSpacing <= spanni ngRowsHeight.totalRowsHeight) { | |
560 extraHeightToPropagate = m_rowPos[rowIndex + rowSpan] - originalBefo rePosition; | |
561 continue; | |
562 } | |
552 | 563 |
553 int totalPercent = 0; | 564 int totalPercent = 0; |
554 int totalAutoRowsHeight = 0; | 565 int totalAutoRowsHeight = 0; |
555 int totalRemainingRowsHeight = spanningRowsHeight.totalRowsHeight; | 566 int totalRemainingRowsHeight = spanningRowsHeight.totalRowsHeight; |
556 | 567 |
557 // FIXME: Inner spanning cell height should not change if it have fixed height when it's parent spanning cell | 568 // FIXME: Inner spanning cell height should not change if it have fixed height when it's parent spanning cell |
558 // is distributing it's extra height in rows. | 569 // is distributing it's extra height in rows. |
559 | 570 |
560 // Calculate total percentage, total auto rows height and total rows hei ght except percent rows. | 571 // Calculate total percentage, total auto rows height and total rows hei ght except percent rows. |
561 for (unsigned row = rowIndex; row < spanningCellEndIndex; row++) { | 572 for (unsigned row = rowIndex; row < spanningCellEndIndex; row++) { |
(...skipping 1253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1815 if (!style()->isLeftToRightDirection()) | 1826 if (!style()->isLeftToRightDirection()) |
1816 cellLocation.setX(table()->columnPositions()[table()->numEffCols()] - ta ble()->columnPositions()[table()->colToEffCol(cell->col() + cell->colSpan())] + horizontalBorderSpacing); | 1827 cellLocation.setX(table()->columnPositions()[table()->numEffCols()] - ta ble()->columnPositions()[table()->colToEffCol(cell->col() + cell->colSpan())] + horizontalBorderSpacing); |
1817 else | 1828 else |
1818 cellLocation.setX(table()->columnPositions()[effectiveColumn] + horizont alBorderSpacing); | 1829 cellLocation.setX(table()->columnPositions()[effectiveColumn] + horizont alBorderSpacing); |
1819 | 1830 |
1820 cell->setLogicalLocation(cellLocation); | 1831 cell->setLogicalLocation(cellLocation); |
1821 view()->addLayoutDelta(oldCellLocation - cell->location()); | 1832 view()->addLayoutDelta(oldCellLocation - cell->location()); |
1822 } | 1833 } |
1823 | 1834 |
1824 } // namespace WebCore | 1835 } // namespace WebCore |
OLD | NEW |