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 1288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1299 | 1299 |
1300 LayoutPoint location = pointInContainer - toLayoutSize(adjustedLocation); | 1300 LayoutPoint location = pointInContainer - toLayoutSize(adjustedLocation); |
1301 if (style()->isFlippedBlocksWritingMode()) { | 1301 if (style()->isFlippedBlocksWritingMode()) { |
1302 if (style()->isHorizontalWritingMode()) | 1302 if (style()->isHorizontalWritingMode()) |
1303 location.setY(height() - location.y()); | 1303 location.setY(height() - location.y()); |
1304 else | 1304 else |
1305 location.setX(width() - location.x()); | 1305 location.setX(width() - location.x()); |
1306 } | 1306 } |
1307 | 1307 |
1308 LayoutUnit offsetInColumnDirection = style()->isHorizontalWritingMode() ? lo
cation.y() : location.x(); | 1308 LayoutUnit offsetInColumnDirection = style()->isHorizontalWritingMode() ? lo
cation.y() : location.x(); |
| 1309 |
| 1310 recalcCellsIfNeeded(); |
| 1311 |
1309 // Find the first row that starts after offsetInColumnDirection. | 1312 // Find the first row that starts after offsetInColumnDirection. |
1310 unsigned nextRow = std::upper_bound(m_rowPos.begin(), m_rowPos.end(), offset
InColumnDirection) - m_rowPos.begin(); | 1313 unsigned nextRow = std::upper_bound(m_rowPos.begin(), m_rowPos.end(), offset
InColumnDirection) - m_rowPos.begin(); |
1311 if (nextRow == m_rowPos.size()) | 1314 if (nextRow == m_rowPos.size()) |
1312 return false; | 1315 return false; |
1313 // Now set hitRow to the index of the hit row, or 0. | 1316 // Now set hitRow to the index of the hit row, or 0. |
1314 unsigned hitRow = nextRow > 0 ? nextRow - 1 : 0; | 1317 unsigned hitRow = nextRow > 0 ? nextRow - 1 : 0; |
1315 | 1318 |
1316 Vector<LayoutUnit>& columnPos = table()->columnPositions(); | 1319 Vector<LayoutUnit>& columnPos = table()->columnPositions(); |
1317 LayoutUnit offsetInRowDirection = style()->isHorizontalWritingMode() ? locat
ion.x() : location.y(); | 1320 LayoutUnit offsetInRowDirection = style()->isHorizontalWritingMode() ? locat
ion.x() : location.y(); |
1318 if (!style()->isLeftToRightDirection()) | 1321 if (!style()->isLeftToRightDirection()) |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1369 | 1372 |
1370 CollapsedBorderValue& RenderTableSection::cachedCollapsedBorder(const RenderTabl
eCell* cell, CollapsedBorderSide side) | 1373 CollapsedBorderValue& RenderTableSection::cachedCollapsedBorder(const RenderTabl
eCell* cell, CollapsedBorderSide side) |
1371 { | 1374 { |
1372 ASSERT(table()->collapseBorders()); | 1375 ASSERT(table()->collapseBorders()); |
1373 HashMap<pair<const RenderTableCell*, int>, CollapsedBorderValue>::iterator i
t = m_cellsCollapsedBorders.find(make_pair(cell, side)); | 1376 HashMap<pair<const RenderTableCell*, int>, CollapsedBorderValue>::iterator i
t = m_cellsCollapsedBorders.find(make_pair(cell, side)); |
1374 ASSERT(it != m_cellsCollapsedBorders.end()); | 1377 ASSERT(it != m_cellsCollapsedBorders.end()); |
1375 return it->second; | 1378 return it->second; |
1376 } | 1379 } |
1377 | 1380 |
1378 } // namespace WebCore | 1381 } // namespace WebCore |
OLD | NEW |