| 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 1637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1648 overflowBox.moveBy(adjustedLocation); | 1648 overflowBox.moveBy(adjustedLocation); |
| 1649 if (!locationInContainer.intersects(overflowBox)) | 1649 if (!locationInContainer.intersects(overflowBox)) |
| 1650 return false; | 1650 return false; |
| 1651 } | 1651 } |
| 1652 | 1652 |
| 1653 if ((hitTestAction == HitTestBlockBackground || hitTestAction == HitTestChil
dBlockBackground) | 1653 if ((hitTestAction == HitTestBlockBackground || hitTestAction == HitTestChil
dBlockBackground) |
| 1654 && visibleToHitTestRequest(result.hitTestRequest()) | 1654 && visibleToHitTestRequest(result.hitTestRequest()) |
| 1655 && isPointInOverflowControl(result, locationInContainer.point(), adjuste
dLocation)) { | 1655 && isPointInOverflowControl(result, locationInContainer.point(), adjuste
dLocation)) { |
| 1656 updateHitTestResult(result, locationInContainer.point() - localOffset); | 1656 updateHitTestResult(result, locationInContainer.point() - localOffset); |
| 1657 // FIXME: isPointInOverflowControl() doesn't handle rect-based tests yet
. | 1657 // FIXME: isPointInOverflowControl() doesn't handle rect-based tests yet
. |
| 1658 if (!result.addNodeToListBasedTestResult(nodeForHitTest(), locationInCon
tainer)) | 1658 if (result.addNodeToListBasedTestResult(nodeForHitTest(), locationInCont
ainer) == StopHitTesting) |
| 1659 return true; | 1659 return true; |
| 1660 } | 1660 } |
| 1661 | 1661 |
| 1662 // TODO(pdr): We should also include checks for hit testing border radius at | 1662 // TODO(pdr): We should also include checks for hit testing border radius at |
| 1663 // the layer level (see: crbug.com/568904). | 1663 // the layer level (see: crbug.com/568904). |
| 1664 | 1664 |
| 1665 if (hitTestChildren(result, locationInContainer, adjustedLocation, hitTestAc
tion)) | 1665 if (hitTestChildren(result, locationInContainer, adjustedLocation, hitTestAc
tion)) |
| 1666 return true; | 1666 return true; |
| 1667 | 1667 |
| 1668 if (hitTestClippedOutByRoundedBorder(locationInContainer, adjustedLocation)) | 1668 if (hitTestClippedOutByRoundedBorder(locationInContainer, adjustedLocation)) |
| 1669 return false; | 1669 return false; |
| 1670 | 1670 |
| 1671 // Now hit test our background | 1671 // Now hit test our background |
| 1672 if (hitTestAction == HitTestBlockBackground || hitTestAction == HitTestChild
BlockBackground) { | 1672 if (hitTestAction == HitTestBlockBackground || hitTestAction == HitTestChild
BlockBackground) { |
| 1673 LayoutRect boundsRect(adjustedLocation, size()); | 1673 LayoutRect boundsRect(adjustedLocation, size()); |
| 1674 if (visibleToHitTestRequest(result.hitTestRequest()) && locationInContai
ner.intersects(boundsRect)) { | 1674 if (visibleToHitTestRequest(result.hitTestRequest()) && locationInContai
ner.intersects(boundsRect)) { |
| 1675 updateHitTestResult(result, flipForWritingMode(locationInContainer.p
oint() - localOffset)); | 1675 updateHitTestResult(result, flipForWritingMode(locationInContainer.p
oint() - localOffset)); |
| 1676 if (!result.addNodeToListBasedTestResult(nodeForHitTest(), locationI
nContainer, boundsRect)) | 1676 if (result.addNodeToListBasedTestResult(nodeForHitTest(), locationIn
Container, boundsRect) == StopHitTesting) |
| 1677 return true; | 1677 return true; |
| 1678 } | 1678 } |
| 1679 } | 1679 } |
| 1680 | 1680 |
| 1681 return false; | 1681 return false; |
| 1682 } | 1682 } |
| 1683 | 1683 |
| 1684 bool LayoutBlock::hitTestChildren(HitTestResult& result, const HitTestLocation&
locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction hitTest
Action) | 1684 bool LayoutBlock::hitTestChildren(HitTestResult& result, const HitTestLocation&
locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction hitTest
Action) |
| 1685 { | 1685 { |
| 1686 // TODO(pdr): We should also check for css clip in the !isSelfPaintingLayer | 1686 // TODO(pdr): We should also check for css clip in the !isSelfPaintingLayer |
| (...skipping 1209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2896 void LayoutBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Layout
Object* obj) const | 2896 void LayoutBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Layout
Object* obj) const |
| 2897 { | 2897 { |
| 2898 showLayoutObject(); | 2898 showLayoutObject(); |
| 2899 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) | 2899 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) |
| 2900 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); | 2900 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); |
| 2901 } | 2901 } |
| 2902 | 2902 |
| 2903 #endif | 2903 #endif |
| 2904 | 2904 |
| 2905 } // namespace blink | 2905 } // namespace blink |
| OLD | NEW |