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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 } | 120 } |
121 | 121 |
122 void RenderTableSection::addChild(RenderObject* child, RenderObject* beforeChild
) | 122 void RenderTableSection::addChild(RenderObject* child, RenderObject* beforeChild
) |
123 { | 123 { |
124 if (!child->isTableRow()) { | 124 if (!child->isTableRow()) { |
125 RenderObject* last = beforeChild; | 125 RenderObject* last = beforeChild; |
126 if (!last) | 126 if (!last) |
127 last = lastChild(); | 127 last = lastChild(); |
128 if (last && last->isAnonymous() && !last->isBeforeOrAfterContent()) { | 128 if (last && last->isAnonymous() && !last->isBeforeOrAfterContent()) { |
129 if (beforeChild == last) | 129 if (beforeChild == last) |
130 beforeChild = last->firstChild(); | 130 beforeChild = last->slowFirstChild(); |
131 last->addChild(child, beforeChild); | 131 last->addChild(child, beforeChild); |
132 return; | 132 return; |
133 } | 133 } |
134 | 134 |
135 if (beforeChild && !beforeChild->isAnonymous() && beforeChild->parent()
== this) { | 135 if (beforeChild && !beforeChild->isAnonymous() && beforeChild->parent()
== this) { |
136 RenderObject* row = beforeChild->previousSibling(); | 136 RenderObject* row = beforeChild->previousSibling(); |
137 if (row && row->isTableRow() && row->isAnonymous()) { | 137 if (row && row->isTableRow() && row->isAnonymous()) { |
138 row->addChild(child); | 138 row->addChild(child); |
139 return; | 139 return; |
140 } | 140 } |
(...skipping 1361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1502 unsigned insertionRow = m_cRow; | 1502 unsigned insertionRow = m_cRow; |
1503 m_cRow++; | 1503 m_cRow++; |
1504 m_cCol = 0; | 1504 m_cCol = 0; |
1505 ensureRows(m_cRow); | 1505 ensureRows(m_cRow); |
1506 | 1506 |
1507 RenderTableRow* tableRow = toRenderTableRow(row); | 1507 RenderTableRow* tableRow = toRenderTableRow(row); |
1508 m_grid[insertionRow].rowRenderer = tableRow; | 1508 m_grid[insertionRow].rowRenderer = tableRow; |
1509 tableRow->setRowIndex(insertionRow); | 1509 tableRow->setRowIndex(insertionRow); |
1510 setRowLogicalHeightToRowStyleLogicalHeight(m_grid[insertionRow]); | 1510 setRowLogicalHeightToRowStyleLogicalHeight(m_grid[insertionRow]); |
1511 | 1511 |
1512 for (RenderObject* cell = row->firstChild(); cell; cell = cell->next
Sibling()) { | 1512 for (RenderObject* cell = tableRow->firstChild(); cell; cell = cell-
>nextSibling()) { |
1513 if (!cell->isTableCell()) | 1513 if (!cell->isTableCell()) |
1514 continue; | 1514 continue; |
1515 | 1515 |
1516 RenderTableCell* tableCell = toRenderTableCell(cell); | 1516 RenderTableCell* tableCell = toRenderTableCell(cell); |
1517 addCell(tableCell, tableRow); | 1517 addCell(tableCell, tableRow); |
1518 } | 1518 } |
1519 } | 1519 } |
1520 } | 1520 } |
1521 | 1521 |
1522 m_grid.shrinkToFit(); | 1522 m_grid.shrinkToFit(); |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1731 else | 1731 else |
1732 cellLocation.setX(table()->columnPositions()[effectiveColumn] + horizont
alBorderSpacing); | 1732 cellLocation.setX(table()->columnPositions()[effectiveColumn] + horizont
alBorderSpacing); |
1733 | 1733 |
1734 cell->setLogicalLocation(cellLocation); | 1734 cell->setLogicalLocation(cellLocation); |
1735 | 1735 |
1736 if (!RuntimeEnabledFeatures::repaintAfterLayoutEnabled()) | 1736 if (!RuntimeEnabledFeatures::repaintAfterLayoutEnabled()) |
1737 view()->addLayoutDelta(oldCellLocation - cell->location()); | 1737 view()->addLayoutDelta(oldCellLocation - cell->location()); |
1738 } | 1738 } |
1739 | 1739 |
1740 } // namespace WebCore | 1740 } // namespace WebCore |
OLD | NEW |