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 27 matching lines...) Expand all Loading... | |
38 | 38 |
39 class Element; | 39 class Element; |
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 Scrollbar; | 46 class Scrollbar; |
47 | 47 |
48 class HitTestResult { | 48 class HitTestResult { |
zerny-chromium
2014/06/18 05:33:05
Nit: FINAL
| |
49 DISALLOW_ALLOCATION(); | |
49 public: | 50 public: |
50 typedef WillBeHeapListHashSet<RefPtrWillBeMember<Node> > NodeSet; | 51 typedef WillBeHeapListHashSet<RefPtrWillBeMember<Node> > NodeSet; |
51 | 52 |
52 HitTestResult(); | 53 HitTestResult(); |
53 HitTestResult(const LayoutPoint&); | 54 HitTestResult(const LayoutPoint&); |
54 // Pass non-negative padding values to perform a rect-based hit test. | 55 // Pass non-negative padding values to perform a rect-based hit test. |
55 HitTestResult(const LayoutPoint& centerPoint, unsigned topPadding, unsigned rightPadding, unsigned bottomPadding, unsigned leftPadding); | 56 HitTestResult(const LayoutPoint& centerPoint, unsigned topPadding, unsigned rightPadding, unsigned bottomPadding, unsigned leftPadding); |
56 HitTestResult(const HitTestLocation&); | 57 HitTestResult(const HitTestLocation&); |
57 HitTestResult(const HitTestResult&); | 58 HitTestResult(const HitTestResult&); |
58 ~HitTestResult(); | 59 ~HitTestResult(); |
59 HitTestResult& operator=(const HitTestResult&); | 60 HitTestResult& operator=(const HitTestResult&); |
61 void trace(Visitor*); | |
60 | 62 |
61 Node* innerNode() const { return m_innerNode.get(); } | 63 Node* innerNode() const { return m_innerNode.get(); } |
62 Node* innerPossiblyPseudoNode() const { return m_innerPossiblyPseudoNode.get (); } | 64 Node* innerPossiblyPseudoNode() const { return m_innerPossiblyPseudoNode.get (); } |
63 Element* innerElement() const; | 65 Element* innerElement() const; |
64 Node* innerNonSharedNode() const { return m_innerNonSharedNode.get(); } | 66 Node* innerNonSharedNode() const { return m_innerNonSharedNode.get(); } |
65 Element* URLElement() const { return m_innerURLElement.get(); } | 67 Element* URLElement() const { return m_innerURLElement.get(); } |
66 Scrollbar* scrollbar() const { return m_scrollbar.get(); } | 68 Scrollbar* scrollbar() const { return m_scrollbar.get(); } |
67 bool isOverWidget() const { return m_isOverWidget; } | 69 bool isOverWidget() const { return m_isOverWidget; } |
68 | 70 |
69 // Forwarded from HitTestLocation | 71 // Forwarded from HitTestLocation |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
123 const NodeSet& rectBasedTestResult() const; | 125 const NodeSet& rectBasedTestResult() const; |
124 | 126 |
125 Node* targetNode() const; | 127 Node* targetNode() const; |
126 | 128 |
127 private: | 129 private: |
128 NodeSet& mutableRectBasedTestResult(); // See above. | 130 NodeSet& mutableRectBasedTestResult(); // See above. |
129 HTMLMediaElement* mediaElement() const; | 131 HTMLMediaElement* mediaElement() const; |
130 | 132 |
131 HitTestLocation m_hitTestLocation; | 133 HitTestLocation m_hitTestLocation; |
132 | 134 |
133 RefPtrWillBePersistent<Node> m_innerNode; | 135 RefPtrWillBeMember<Node> m_innerNode; |
134 RefPtrWillBePersistent<Node> m_innerPossiblyPseudoNode; | 136 RefPtrWillBeMember<Node> m_innerPossiblyPseudoNode; |
135 RefPtrWillBePersistent<Node> m_innerNonSharedNode; | 137 RefPtrWillBeMember<Node> m_innerNonSharedNode; |
136 LayoutPoint m_pointInInnerNodeFrame; // The hit-tested point in innerNode fr ame coordinates. | 138 LayoutPoint m_pointInInnerNodeFrame; // The hit-tested point in innerNode fr ame coordinates. |
137 LayoutPoint m_localPoint; // A point in the local coordinate space of m_inne rNonSharedNode's renderer. Allows us to efficiently | 139 LayoutPoint m_localPoint; // A point in the local coordinate space of m_inne rNonSharedNode's renderer. Allows us to efficiently |
138 // determine where inside the renderer we hit on s ubsequent operations. | 140 // determine where inside the renderer we hit on s ubsequent operations. |
139 RefPtrWillBePersistent<Element> m_innerURLElement; | 141 RefPtrWillBeMember<Element> m_innerURLElement; |
140 RefPtr<Scrollbar> m_scrollbar; | 142 RefPtr<Scrollbar> m_scrollbar; |
141 bool m_isOverWidget; // Returns true if we are over a widget (and not in the border/padding area of a RenderWidget for example). | 143 bool m_isOverWidget; // Returns true if we are over a widget (and not in the border/padding area of a RenderWidget for example). |
142 bool m_isFirstLetter; | 144 bool m_isFirstLetter; |
143 | 145 |
144 mutable OwnPtrWillBePersistent<NodeSet> m_rectBasedTestResult; | 146 mutable OwnPtrWillBeMember<NodeSet> m_rectBasedTestResult; |
145 }; | 147 }; |
146 | 148 |
147 } // namespace WebCore | 149 } // namespace WebCore |
148 | 150 |
149 #endif // HitTestResult_h | 151 #endif // HitTestResult_h |
OLD | NEW |