| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2007 David Smith (catfish.man@gmail.com) | 4 * (C) 2007 David Smith (catfish.man@gmail.com) |
| 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. | 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. |
| 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 1463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1474 } | 1474 } |
| 1475 | 1475 |
| 1476 bool LayoutBlock::isPointInOverflowControl(HitTestResult& result, const LayoutPo
int& locationInContainer, const LayoutPoint& accumulatedOffset) const | 1476 bool LayoutBlock::isPointInOverflowControl(HitTestResult& result, const LayoutPo
int& locationInContainer, const LayoutPoint& accumulatedOffset) const |
| 1477 { | 1477 { |
| 1478 if (!scrollsOverflow()) | 1478 if (!scrollsOverflow()) |
| 1479 return false; | 1479 return false; |
| 1480 | 1480 |
| 1481 return layer()->getScrollableArea()->hitTestOverflowControls(result, rounded
IntPoint(locationInContainer - toLayoutSize(accumulatedOffset))); | 1481 return layer()->getScrollableArea()->hitTestOverflowControls(result, rounded
IntPoint(locationInContainer - toLayoutSize(accumulatedOffset))); |
| 1482 } | 1482 } |
| 1483 | 1483 |
| 1484 Node* LayoutBlock::nodeForHitTest() const | |
| 1485 { | |
| 1486 // If we are in the margins of block elements that are part of a | |
| 1487 // continuation we're actually still inside the enclosing element | |
| 1488 // that was split. Use the appropriate inner node. | |
| 1489 return isAnonymousBlockContinuation() ? continuation()->node() : node(); | |
| 1490 } | |
| 1491 | |
| 1492 bool LayoutBlock::hitTestOverflowControl(HitTestResult& result, const HitTestLoc
ation& locationInContainer, const LayoutPoint& adjustedLocation) | 1484 bool LayoutBlock::hitTestOverflowControl(HitTestResult& result, const HitTestLoc
ation& locationInContainer, const LayoutPoint& adjustedLocation) |
| 1493 { | 1485 { |
| 1494 if (visibleToHitTestRequest(result.hitTestRequest()) | 1486 if (visibleToHitTestRequest(result.hitTestRequest()) |
| 1495 && isPointInOverflowControl(result, locationInContainer.point(), adjuste
dLocation)) { | 1487 && isPointInOverflowControl(result, locationInContainer.point(), adjuste
dLocation)) { |
| 1496 updateHitTestResult(result, locationInContainer.point() - toLayoutSize(a
djustedLocation)); | 1488 updateHitTestResult(result, locationInContainer.point() - toLayoutSize(a
djustedLocation)); |
| 1497 // FIXME: isPointInOverflowControl() doesn't handle rect-based tests yet
. | 1489 // FIXME: isPointInOverflowControl() doesn't handle rect-based tests yet
. |
| 1498 if (result.addNodeToListBasedTestResult(nodeForHitTest(), locationInCont
ainer) == StopHitTesting) | 1490 if (result.addNodeToListBasedTestResult(nodeForHitTest(), locationInCont
ainer) == StopHitTesting) |
| 1499 return true; | 1491 return true; |
| 1500 } | 1492 } |
| 1501 return false; | 1493 return false; |
| (...skipping 861 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2363 for (TrackedLayoutBoxListHashSet::const_iterator it = positionedDescenda
ntSet->begin(); it != end; ++it) { | 2355 for (TrackedLayoutBoxListHashSet::const_iterator it = positionedDescenda
ntSet->begin(); it != end; ++it) { |
| 2364 LayoutBox* currBox = *it; | 2356 LayoutBox* currBox = *it; |
| 2365 ASSERT(!currBox->needsLayout()); | 2357 ASSERT(!currBox->needsLayout()); |
| 2366 } | 2358 } |
| 2367 } | 2359 } |
| 2368 } | 2360 } |
| 2369 | 2361 |
| 2370 #endif | 2362 #endif |
| 2371 | 2363 |
| 2372 } // namespace blink | 2364 } // namespace blink |
| OLD | NEW |