OLD | NEW |
1 /** | 1 /** |
2 * Copyright (C) 2003, 2006 Apple Computer, Inc. | 2 * Copyright (C) 2003, 2006 Apple Computer, Inc. |
3 * | 3 * |
4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
8 * | 8 * |
9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 IntPoint(logicalLeft().toInt(), | 45 IntPoint(logicalLeft().toInt(), |
46 (logicalTop() + root().selectionTop()).toInt()), | 46 (logicalTop() + root().selectionTop()).toInt()), |
47 root().selectionHeight().toInt())); | 47 root().selectionHeight().toInt())); |
48 } | 48 } |
49 | 49 |
50 bool EllipsisBox::nodeAtPoint(HitTestResult& result, | 50 bool EllipsisBox::nodeAtPoint(HitTestResult& result, |
51 const HitTestLocation& locationInContainer, | 51 const HitTestLocation& locationInContainer, |
52 const LayoutPoint& accumulatedOffset, | 52 const LayoutPoint& accumulatedOffset, |
53 LayoutUnit lineTop, | 53 LayoutUnit lineTop, |
54 LayoutUnit lineBottom) { | 54 LayoutUnit lineBottom) { |
55 LayoutPoint adjustedLocation = accumulatedOffset + topLeft(); | 55 LayoutPoint adjustedLocation = accumulatedOffset + location(); |
56 | 56 |
57 LayoutPoint boxOrigin = locationIncludingFlipping(); | 57 LayoutPoint boxOrigin = physicalLocation(); |
58 boxOrigin.moveBy(accumulatedOffset); | 58 boxOrigin.moveBy(accumulatedOffset); |
59 LayoutRect boundsRect(boxOrigin, size()); | 59 LayoutRect boundsRect(boxOrigin, size()); |
60 if (visibleToHitTestRequest(result.hitTestRequest()) && | 60 if (visibleToHitTestRequest(result.hitTestRequest()) && |
61 boundsRect.intersects(LayoutRect(HitTestLocation::rectForPoint( | 61 boundsRect.intersects(LayoutRect(HitTestLocation::rectForPoint( |
62 locationInContainer.point(), 0, 0, 0, 0)))) { | 62 locationInContainer.point(), 0, 0, 0, 0)))) { |
63 getLineLayoutItem().updateHitTestResult( | 63 getLineLayoutItem().updateHitTestResult( |
64 result, locationInContainer.point() - toLayoutSize(adjustedLocation)); | 64 result, locationInContainer.point() - toLayoutSize(adjustedLocation)); |
65 if (result.addNodeToListBasedTestResult(getLineLayoutItem().node(), | 65 if (result.addNodeToListBasedTestResult(getLineLayoutItem().node(), |
66 locationInContainer, | 66 locationInContainer, |
67 boundsRect) == StopHitTesting) | 67 boundsRect) == StopHitTesting) |
68 return true; | 68 return true; |
69 } | 69 } |
70 | 70 |
71 return false; | 71 return false; |
72 } | 72 } |
73 | 73 |
74 const char* EllipsisBox::boxName() const { | 74 const char* EllipsisBox::boxName() const { |
75 return "EllipsisBox"; | 75 return "EllipsisBox"; |
76 } | 76 } |
77 | 77 |
78 } // namespace blink | 78 } // namespace blink |
OLD | NEW |