| 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, 2007, 2008, 2009, 2010 Apple Inc. All r
ights reserved. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2013 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 |
| 11 * modify it under the terms of the GNU Library General Public | 11 * modify it under the terms of the GNU Library General Public |
| 12 * License as published by the Free Software Foundation; either | 12 * License as published by the Free Software Foundation; either |
| 13 * version 2 of the License, or (at your option) any later version. | 13 * version 2 of the License, or (at your option) any later version. |
| 14 * | 14 * |
| 15 * This library is distributed in the hope that it will be useful, | 15 * This library is distributed in the hope that it will be useful, |
| 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| (...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 595 // Collect all the unique border values that we want to paint in a sorted list. | 595 // Collect all the unique border values that we want to paint in a sorted list. |
| 596 void RenderTable::recalcCollapsedBorders() | 596 void RenderTable::recalcCollapsedBorders() |
| 597 { | 597 { |
| 598 if (m_collapsedBordersValid) | 598 if (m_collapsedBordersValid) |
| 599 return; | 599 return; |
| 600 m_collapsedBordersValid = true; | 600 m_collapsedBordersValid = true; |
| 601 m_collapsedBorders.clear(); | 601 m_collapsedBorders.clear(); |
| 602 for (RenderObject* section = firstChild(); section; section = section->nextS
ibling()) { | 602 for (RenderObject* section = firstChild(); section; section = section->nextS
ibling()) { |
| 603 if (!section->isTableSection()) | 603 if (!section->isTableSection()) |
| 604 continue; | 604 continue; |
| 605 for (RenderObject* row = toRenderTableSection(section)->firstChild(); ro
w; row = row->nextSibling()) { | 605 for (RenderTableRow* row = toRenderTableSection(section)->firstRow(); ro
w; row = row->nextRow()) { |
| 606 if (!row->isTableRow()) | 606 for (RenderTableCell* cell = row->firstCell(); cell; cell = cell->ne
xtCell()) { |
| 607 continue; | 607 ASSERT(cell->table() == this); |
| 608 for (RenderObject* cell = toRenderTableRow(row)->firstChild(); cell;
cell = cell->nextSibling()) { | 608 cell->collectBorderValues(m_collapsedBorders); |
| 609 if (!cell->isTableCell()) | |
| 610 continue; | |
| 611 ASSERT(toRenderTableCell(cell)->table() == this); | |
| 612 toRenderTableCell(cell)->collectBorderValues(m_collapsedBorders)
; | |
| 613 } | 609 } |
| 614 } | 610 } |
| 615 } | 611 } |
| 616 RenderTableCell::sortBorderValues(m_collapsedBorders); | 612 RenderTableCell::sortBorderValues(m_collapsedBorders); |
| 617 } | 613 } |
| 618 | 614 |
| 619 | 615 |
| 620 void RenderTable::addOverflowFromChildren() | 616 void RenderTable::addOverflowFromChildren() |
| 621 { | 617 { |
| 622 // Add overflow from borders. | 618 // Add overflow from borders. |
| (...skipping 834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1457 const BorderValue& RenderTable::tableEndBorderAdjoiningCell(const RenderTableCel
l* cell) const | 1453 const BorderValue& RenderTable::tableEndBorderAdjoiningCell(const RenderTableCel
l* cell) const |
| 1458 { | 1454 { |
| 1459 ASSERT(cell->isFirstOrLastCellInRow()); | 1455 ASSERT(cell->isFirstOrLastCellInRow()); |
| 1460 if (hasSameDirectionAs(cell->row())) | 1456 if (hasSameDirectionAs(cell->row())) |
| 1461 return style()->borderEnd(); | 1457 return style()->borderEnd(); |
| 1462 | 1458 |
| 1463 return style()->borderStart(); | 1459 return style()->borderStart(); |
| 1464 } | 1460 } |
| 1465 | 1461 |
| 1466 } | 1462 } |
| OLD | NEW |