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, 2007, 2008, 2009, 2010, 2013 Apple Inc.
All rights reserved. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2013 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 1293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1304 rect.setY(location.y()); | 1304 rect.setY(location.y()); |
1305 } else { | 1305 } else { |
1306 rect.setWidth(size().width()); | 1306 rect.setWidth(size().width()); |
1307 rect.setX(location.x()); | 1307 rect.setX(location.x()); |
1308 } | 1308 } |
1309 } | 1309 } |
1310 | 1310 |
1311 return rect; | 1311 return rect; |
1312 } | 1312 } |
1313 | 1313 |
1314 bool LayoutTable::nodeAtPoint(const HitTestRequest& request, HitTestResult& resu
lt, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOf
fset, HitTestAction action) | 1314 bool LayoutTable::nodeAtPoint(HitTestResult& result, const HitTestLocation& loca
tionInContainer, const LayoutPoint& accumulatedOffset, HitTestAction action) |
1315 { | 1315 { |
1316 LayoutPoint adjustedLocation = accumulatedOffset + location(); | 1316 LayoutPoint adjustedLocation = accumulatedOffset + location(); |
1317 | 1317 |
1318 // Check kids first. | 1318 // Check kids first. |
1319 if (!hasOverflowClip() || locationInContainer.intersects(overflowClipRect(ad
justedLocation))) { | 1319 if (!hasOverflowClip() || locationInContainer.intersects(overflowClipRect(ad
justedLocation))) { |
1320 for (LayoutObject* child = lastChild(); child; child = child->previousSi
bling()) { | 1320 for (LayoutObject* child = lastChild(); child; child = child->previousSi
bling()) { |
1321 if (child->isBox() && !toLayoutBox(child)->hasSelfPaintingLayer() &&
(child->isTableSection() || child->isTableCaption())) { | 1321 if (child->isBox() && !toLayoutBox(child)->hasSelfPaintingLayer() &&
(child->isTableSection() || child->isTableCaption())) { |
1322 LayoutPoint childPoint = flipForWritingModeForChild(toLayoutBox(
child), adjustedLocation); | 1322 LayoutPoint childPoint = flipForWritingModeForChild(toLayoutBox(
child), adjustedLocation); |
1323 if (child->nodeAtPoint(request, result, locationInContainer, chi
ldPoint, action)) { | 1323 if (child->nodeAtPoint(result, locationInContainer, childPoint,
action)) { |
1324 updateHitTestResult(result, toLayoutPoint(locationInContaine
r.point() - childPoint)); | 1324 updateHitTestResult(result, toLayoutPoint(locationInContaine
r.point() - childPoint)); |
1325 return true; | 1325 return true; |
1326 } | 1326 } |
1327 } | 1327 } |
1328 } | 1328 } |
1329 } | 1329 } |
1330 | 1330 |
1331 // Check our bounds next. | 1331 // Check our bounds next. |
1332 LayoutRect boundsRect(adjustedLocation, size()); | 1332 LayoutRect boundsRect(adjustedLocation, size()); |
1333 if (visibleToHitTestRequest(request) && (action == HitTestBlockBackground ||
action == HitTestChildBlockBackground) && locationInContainer.intersects(bounds
Rect)) { | 1333 if (visibleToHitTestRequest(result.hitTestRequest()) && (action == HitTestBl
ockBackground || action == HitTestChildBlockBackground) && locationInContainer.i
ntersects(boundsRect)) { |
1334 updateHitTestResult(result, flipForWritingMode(locationInContainer.point
() - toLayoutSize(adjustedLocation))); | 1334 updateHitTestResult(result, flipForWritingMode(locationInContainer.point
() - toLayoutSize(adjustedLocation))); |
1335 if (!result.addNodeToListBasedTestResult(node(), request, locationInCont
ainer, boundsRect)) | 1335 if (!result.addNodeToListBasedTestResult(node(), locationInContainer, bo
undsRect)) |
1336 return true; | 1336 return true; |
1337 } | 1337 } |
1338 | 1338 |
1339 return false; | 1339 return false; |
1340 } | 1340 } |
1341 | 1341 |
1342 LayoutTable* LayoutTable::createAnonymousWithParentRenderer(const LayoutObject*
parent) | 1342 LayoutTable* LayoutTable::createAnonymousWithParentRenderer(const LayoutObject*
parent) |
1343 { | 1343 { |
1344 RefPtr<ComputedStyle> newStyle = ComputedStyle::createAnonymousStyleWithDisp
lay(parent->styleRef(), TABLE); | 1344 RefPtr<ComputedStyle> newStyle = ComputedStyle::createAnonymousStyleWithDisp
lay(parent->styleRef(), TABLE); |
1345 LayoutTable* newTable = new LayoutTable(0); | 1345 LayoutTable* newTable = new LayoutTable(0); |
(...skipping 14 matching lines...) Expand all Loading... |
1360 const BorderValue& LayoutTable::tableEndBorderAdjoiningCell(const LayoutTableCel
l* cell) const | 1360 const BorderValue& LayoutTable::tableEndBorderAdjoiningCell(const LayoutTableCel
l* cell) const |
1361 { | 1361 { |
1362 ASSERT(cell->isFirstOrLastCellInRow()); | 1362 ASSERT(cell->isFirstOrLastCellInRow()); |
1363 if (hasSameDirectionAs(cell->row())) | 1363 if (hasSameDirectionAs(cell->row())) |
1364 return style()->borderEnd(); | 1364 return style()->borderEnd(); |
1365 | 1365 |
1366 return style()->borderStart(); | 1366 return style()->borderStart(); |
1367 } | 1367 } |
1368 | 1368 |
1369 } | 1369 } |
OLD | NEW |