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 1232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1243 | 1243 |
1244 LayoutPoint location = pointInContainer - toLayoutSize(adjustedLocation); | 1244 LayoutPoint location = pointInContainer - toLayoutSize(adjustedLocation); |
1245 if (style()->isFlippedBlocksWritingMode()) { | 1245 if (style()->isFlippedBlocksWritingMode()) { |
1246 if (style()->isHorizontalWritingMode()) | 1246 if (style()->isHorizontalWritingMode()) |
1247 location.setY(height() - location.y()); | 1247 location.setY(height() - location.y()); |
1248 else | 1248 else |
1249 location.setX(width() - location.x()); | 1249 location.setX(width() - location.x()); |
1250 } | 1250 } |
1251 | 1251 |
1252 LayoutUnit offsetInColumnDirection = style()->isHorizontalWritingMode() ? lo
cation.y() : location.x(); | 1252 LayoutUnit offsetInColumnDirection = style()->isHorizontalWritingMode() ? lo
cation.y() : location.x(); |
| 1253 |
| 1254 recalcCellsIfNeeded(); |
| 1255 |
1253 // Find the first row that starts after offsetInColumnDirection. | 1256 // Find the first row that starts after offsetInColumnDirection. |
1254 unsigned nextRow = std::upper_bound(m_rowPos.begin(), m_rowPos.end(), offset
InColumnDirection) - m_rowPos.begin(); | 1257 unsigned nextRow = std::upper_bound(m_rowPos.begin(), m_rowPos.end(), offset
InColumnDirection) - m_rowPos.begin(); |
1255 if (nextRow == m_rowPos.size()) | 1258 if (nextRow == m_rowPos.size()) |
1256 return false; | 1259 return false; |
1257 // Now set hitRow to the index of the hit row, or 0. | 1260 // Now set hitRow to the index of the hit row, or 0. |
1258 unsigned hitRow = nextRow > 0 ? nextRow - 1 : 0; | 1261 unsigned hitRow = nextRow > 0 ? nextRow - 1 : 0; |
1259 | 1262 |
1260 Vector<LayoutUnit>& columnPos = table()->columnPositions(); | 1263 Vector<LayoutUnit>& columnPos = table()->columnPositions(); |
1261 LayoutUnit offsetInRowDirection = style()->isHorizontalWritingMode() ? locat
ion.x() : location.y(); | 1264 LayoutUnit offsetInRowDirection = style()->isHorizontalWritingMode() ? locat
ion.x() : location.y(); |
1262 if (!style()->isLeftToRightDirection()) | 1265 if (!style()->isLeftToRightDirection()) |
(...skipping 17 matching lines...) Expand all Loading... |
1280 if (static_cast<RenderObject*>(cell)->nodeAtPoint(request, result, point
InContainer, cellPoint, action)) { | 1283 if (static_cast<RenderObject*>(cell)->nodeAtPoint(request, result, point
InContainer, cellPoint, action)) { |
1281 updateHitTestResult(result, toLayoutPoint(pointInContainer - cellPoi
nt)); | 1284 updateHitTestResult(result, toLayoutPoint(pointInContainer - cellPoi
nt)); |
1282 return true; | 1285 return true; |
1283 } | 1286 } |
1284 } | 1287 } |
1285 return false; | 1288 return false; |
1286 | 1289 |
1287 } | 1290 } |
1288 | 1291 |
1289 } // namespace WebCore | 1292 } // namespace WebCore |
OLD | NEW |