OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 Apple Computer, Inc. | 2 * Copyright (C) 2006 Apple Computer, Inc. |
3 * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies) |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 29 matching lines...) Expand all Loading... |
40 class LocalFrame; | 40 class LocalFrame; |
41 class HTMLMediaElement; | 41 class HTMLMediaElement; |
42 class Image; | 42 class Image; |
43 class KURL; | 43 class KURL; |
44 class Node; | 44 class Node; |
45 class RenderObject; | 45 class RenderObject; |
46 class PositionWithAffinity; | 46 class PositionWithAffinity; |
47 class Scrollbar; | 47 class Scrollbar; |
48 | 48 |
49 class HitTestResult { | 49 class HitTestResult { |
| 50 DISALLOW_ALLOCATION(); |
50 public: | 51 public: |
51 typedef WillBeHeapListHashSet<RefPtrWillBeMember<Node> > NodeSet; | 52 typedef WillBeHeapListHashSet<RefPtrWillBeMember<Node> > NodeSet; |
52 | 53 |
53 HitTestResult(); | 54 HitTestResult(); |
54 HitTestResult(const LayoutPoint&); | 55 HitTestResult(const LayoutPoint&); |
55 // Pass non-negative padding values to perform a rect-based hit test. | 56 // Pass non-negative padding values to perform a rect-based hit test. |
56 HitTestResult(const LayoutPoint& centerPoint, unsigned topPadding, unsigned
rightPadding, unsigned bottomPadding, unsigned leftPadding); | 57 HitTestResult(const LayoutPoint& centerPoint, unsigned topPadding, unsigned
rightPadding, unsigned bottomPadding, unsigned leftPadding); |
57 HitTestResult(const HitTestLocation&); | 58 HitTestResult(const HitTestLocation&); |
58 HitTestResult(const HitTestResult&); | 59 HitTestResult(const HitTestResult&); |
59 ~HitTestResult(); | 60 ~HitTestResult(); |
60 HitTestResult& operator=(const HitTestResult&); | 61 HitTestResult& operator=(const HitTestResult&); |
| 62 void trace(Visitor*); |
61 | 63 |
62 Node* innerNode() const { return m_innerNode.get(); } | 64 Node* innerNode() const { return m_innerNode.get(); } |
63 Node* innerPossiblyPseudoNode() const { return m_innerPossiblyPseudoNode.get
(); } | 65 Node* innerPossiblyPseudoNode() const { return m_innerPossiblyPseudoNode.get
(); } |
64 Element* innerElement() const; | 66 Element* innerElement() const; |
65 Node* innerNonSharedNode() const { return m_innerNonSharedNode.get(); } | 67 Node* innerNonSharedNode() const { return m_innerNonSharedNode.get(); } |
66 Element* URLElement() const { return m_innerURLElement.get(); } | 68 Element* URLElement() const { return m_innerURLElement.get(); } |
67 Scrollbar* scrollbar() const { return m_scrollbar.get(); } | 69 Scrollbar* scrollbar() const { return m_scrollbar.get(); } |
68 bool isOverWidget() const { return m_isOverWidget; } | 70 bool isOverWidget() const { return m_isOverWidget; } |
69 | 71 |
70 // Forwarded from HitTestLocation | 72 // Forwarded from HitTestLocation |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 | 130 |
129 // FIXME: Remove this. | 131 // FIXME: Remove this. |
130 Node* targetNode() const { return innerNode(); } | 132 Node* targetNode() const { return innerNode(); } |
131 | 133 |
132 private: | 134 private: |
133 NodeSet& mutableRectBasedTestResult(); // See above. | 135 NodeSet& mutableRectBasedTestResult(); // See above. |
134 HTMLMediaElement* mediaElement() const; | 136 HTMLMediaElement* mediaElement() const; |
135 | 137 |
136 HitTestLocation m_hitTestLocation; | 138 HitTestLocation m_hitTestLocation; |
137 | 139 |
138 RefPtrWillBePersistent<Node> m_innerNode; | 140 RefPtrWillBeMember<Node> m_innerNode; |
139 RefPtrWillBePersistent<Node> m_innerPossiblyPseudoNode; | 141 RefPtrWillBeMember<Node> m_innerPossiblyPseudoNode; |
140 RefPtrWillBePersistent<Node> m_innerNonSharedNode; | 142 RefPtrWillBeMember<Node> m_innerNonSharedNode; |
141 // FIXME: Nothing changes this to a value different from m_hitTestLocation! | 143 // FIXME: Nothing changes this to a value different from m_hitTestLocation! |
142 LayoutPoint m_pointInInnerNodeFrame; // The hit-tested point in innerNode fr
ame coordinates. | 144 LayoutPoint m_pointInInnerNodeFrame; // The hit-tested point in innerNode fr
ame coordinates. |
143 LayoutPoint m_localPoint; // A point in the local coordinate space of m_inne
rNonSharedNode's renderer. Allows us to efficiently | 145 LayoutPoint m_localPoint; // A point in the local coordinate space of m_inne
rNonSharedNode's renderer. Allows us to efficiently |
144 // determine where inside the renderer we hit on s
ubsequent operations. | 146 // determine where inside the renderer we hit on s
ubsequent operations. |
145 RefPtrWillBePersistent<Element> m_innerURLElement; | 147 RefPtrWillBeMember<Element> m_innerURLElement; |
146 RefPtr<Scrollbar> m_scrollbar; | 148 RefPtr<Scrollbar> m_scrollbar; |
147 bool m_isOverWidget; // Returns true if we are over a widget (and not in the
border/padding area of a RenderWidget for example). | 149 bool m_isOverWidget; // Returns true if we are over a widget (and not in the
border/padding area of a RenderWidget for example). |
148 bool m_isFirstLetter; | 150 bool m_isFirstLetter; |
149 | 151 |
150 mutable OwnPtrWillBePersistent<NodeSet> m_rectBasedTestResult; | 152 mutable OwnPtrWillBeMember<NodeSet> m_rectBasedTestResult; |
151 }; | 153 }; |
152 | 154 |
153 } // namespace blink | 155 } // namespace blink |
154 | 156 |
155 #endif // HitTestResult_h | 157 #endif // HitTestResult_h |
OLD | NEW |