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 1564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1575 void RenderTableSection::splitColumn(unsigned pos, unsigned first) | 1575 void RenderTableSection::splitColumn(unsigned pos, unsigned first) |
1576 { | 1576 { |
1577 ASSERT(!m_needsCellRecalc); | 1577 ASSERT(!m_needsCellRecalc); |
1578 | 1578 |
1579 if (m_cCol > pos) | 1579 if (m_cCol > pos) |
1580 m_cCol++; | 1580 m_cCol++; |
1581 for (unsigned row = 0; row < m_grid.size(); ++row) { | 1581 for (unsigned row = 0; row < m_grid.size(); ++row) { |
1582 Row& r = m_grid[row].row; | 1582 Row& r = m_grid[row].row; |
1583 r.insert(pos + 1, CellStruct()); | 1583 r.insert(pos + 1, CellStruct()); |
1584 if (r[pos].hasCells()) { | 1584 if (r[pos].hasCells()) { |
1585 r[pos + 1].cells.append(r[pos].cells); | 1585 r[pos + 1].cells.appendVector(r[pos].cells); |
1586 RenderTableCell* cell = r[pos].primaryCell(); | 1586 RenderTableCell* cell = r[pos].primaryCell(); |
1587 ASSERT(cell); | 1587 ASSERT(cell); |
1588 ASSERT(cell->colSpan() >= (r[pos].inColSpan ? 1u : 0)); | 1588 ASSERT(cell->colSpan() >= (r[pos].inColSpan ? 1u : 0)); |
1589 unsigned colleft = cell->colSpan() - r[pos].inColSpan; | 1589 unsigned colleft = cell->colSpan() - r[pos].inColSpan; |
1590 if (first > colleft) | 1590 if (first > colleft) |
1591 r[pos + 1].inColSpan = 0; | 1591 r[pos + 1].inColSpan = 0; |
1592 else | 1592 else |
1593 r[pos + 1].inColSpan = first + r[pos].inColSpan; | 1593 r[pos + 1].inColSpan = first + r[pos].inColSpan; |
1594 } else { | 1594 } else { |
1595 r[pos + 1].inColSpan = 0; | 1595 r[pos + 1].inColSpan = 0; |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1710 else | 1710 else |
1711 cellLocation.setX(table()->columnPositions()[effectiveColumn] + horizont
alBorderSpacing); | 1711 cellLocation.setX(table()->columnPositions()[effectiveColumn] + horizont
alBorderSpacing); |
1712 | 1712 |
1713 cell->setLogicalLocation(cellLocation); | 1713 cell->setLogicalLocation(cellLocation); |
1714 | 1714 |
1715 if (!RuntimeEnabledFeatures::repaintAfterLayoutEnabled()) | 1715 if (!RuntimeEnabledFeatures::repaintAfterLayoutEnabled()) |
1716 view()->addLayoutDelta(oldCellLocation - cell->location()); | 1716 view()->addLayoutDelta(oldCellLocation - cell->location()); |
1717 } | 1717 } |
1718 | 1718 |
1719 } // namespace WebCore | 1719 } // namespace WebCore |
OLD | NEW |