| 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 1617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1628 { | 1628 { |
| 1629 ASSERT(table()->collapseBorders()); | 1629 ASSERT(table()->collapseBorders()); |
| 1630 HashMap<pair<const RenderTableCell*, int>, CollapsedBorderValue>::iterator i
t = m_cellsCollapsedBorders.find(make_pair(cell, side)); | 1630 HashMap<pair<const RenderTableCell*, int>, CollapsedBorderValue>::iterator i
t = m_cellsCollapsedBorders.find(make_pair(cell, side)); |
| 1631 ASSERT(it != m_cellsCollapsedBorders.end()); | 1631 ASSERT(it != m_cellsCollapsedBorders.end()); |
| 1632 return it->value; | 1632 return it->value; |
| 1633 } | 1633 } |
| 1634 | 1634 |
| 1635 RenderTableSection* RenderTableSection::createAnonymousWithParentRenderer(const
RenderObject* parent) | 1635 RenderTableSection* RenderTableSection::createAnonymousWithParentRenderer(const
RenderObject* parent) |
| 1636 { | 1636 { |
| 1637 RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay(
parent->style(), TABLE_ROW_GROUP); | 1637 RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay(
parent->style(), TABLE_ROW_GROUP); |
| 1638 RenderTableSection* newSection = new (parent->renderArena()) RenderTableSect
ion(0); | 1638 RenderTableSection* newSection = new RenderTableSection(0); |
| 1639 newSection->setDocumentForAnonymous(parent->document()); | 1639 newSection->setDocumentForAnonymous(parent->document()); |
| 1640 newSection->setStyle(newStyle.release()); | 1640 newSection->setStyle(newStyle.release()); |
| 1641 return newSection; | 1641 return newSection; |
| 1642 } | 1642 } |
| 1643 | 1643 |
| 1644 void RenderTableSection::setLogicalPositionForCell(RenderTableCell* cell, unsign
ed effectiveColumn) const | 1644 void RenderTableSection::setLogicalPositionForCell(RenderTableCell* cell, unsign
ed effectiveColumn) const |
| 1645 { | 1645 { |
| 1646 LayoutPoint oldCellLocation = cell->location(); | 1646 LayoutPoint oldCellLocation = cell->location(); |
| 1647 | 1647 |
| 1648 LayoutPoint cellLocation(0, m_rowPos[cell->rowIndex()]); | 1648 LayoutPoint cellLocation(0, m_rowPos[cell->rowIndex()]); |
| 1649 int horizontalBorderSpacing = table()->hBorderSpacing(); | 1649 int horizontalBorderSpacing = table()->hBorderSpacing(); |
| 1650 | 1650 |
| 1651 // FIXME: The table's direction should determine our row's direction, not th
e section's (see bug 96691). | 1651 // FIXME: The table's direction should determine our row's direction, not th
e section's (see bug 96691). |
| 1652 if (!style()->isLeftToRightDirection()) | 1652 if (!style()->isLeftToRightDirection()) |
| 1653 cellLocation.setX(table()->columnPositions()[table()->numEffCols()] - ta
ble()->columnPositions()[table()->colToEffCol(cell->col() + cell->colSpan())] +
horizontalBorderSpacing); | 1653 cellLocation.setX(table()->columnPositions()[table()->numEffCols()] - ta
ble()->columnPositions()[table()->colToEffCol(cell->col() + cell->colSpan())] +
horizontalBorderSpacing); |
| 1654 else | 1654 else |
| 1655 cellLocation.setX(table()->columnPositions()[effectiveColumn] + horizont
alBorderSpacing); | 1655 cellLocation.setX(table()->columnPositions()[effectiveColumn] + horizont
alBorderSpacing); |
| 1656 | 1656 |
| 1657 cell->setLogicalLocation(cellLocation); | 1657 cell->setLogicalLocation(cellLocation); |
| 1658 view()->addLayoutDelta(oldCellLocation - cell->location()); | 1658 view()->addLayoutDelta(oldCellLocation - cell->location()); |
| 1659 } | 1659 } |
| 1660 | 1660 |
| 1661 } // namespace WebCore | 1661 } // namespace WebCore |
| OLD | NEW |