| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 // This is used to support fuzzy matching with rect-based hit tests as well as | 53 // This is used to support fuzzy matching with rect-based hit tests as well as |
| 54 // penetrating tests which collect all nodes (see: HitTestRequest::RequestType). | 54 // penetrating tests which collect all nodes (see: HitTestRequest::RequestType). |
| 55 enum ListBasedHitTestBehavior { | 55 enum ListBasedHitTestBehavior { |
| 56 ContinueHitTesting, | 56 ContinueHitTesting, |
| 57 StopHitTesting | 57 StopHitTesting |
| 58 }; | 58 }; |
| 59 | 59 |
| 60 class CORE_EXPORT HitTestResult { | 60 class CORE_EXPORT HitTestResult { |
| 61 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); | 61 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); |
| 62 public: | 62 public: |
| 63 typedef WillBeHeapListHashSet<RefPtrWillBeMember<Node>> NodeSet; | 63 typedef HeapListHashSet<Member<Node>> NodeSet; |
| 64 | 64 |
| 65 HitTestResult(); | 65 HitTestResult(); |
| 66 HitTestResult(const HitTestRequest&, const LayoutPoint&); | 66 HitTestResult(const HitTestRequest&, const LayoutPoint&); |
| 67 // Pass positive padding values to perform a rect-based hit test. | 67 // Pass positive padding values to perform a rect-based hit test. |
| 68 HitTestResult(const HitTestRequest&, const LayoutPoint& centerPoint, unsigne
d topPadding, unsigned rightPadding, unsigned bottomPadding, unsigned leftPaddin
g); | 68 HitTestResult(const HitTestRequest&, const LayoutPoint& centerPoint, unsigne
d topPadding, unsigned rightPadding, unsigned bottomPadding, unsigned leftPaddin
g); |
| 69 HitTestResult(const HitTestRequest&, const HitTestLocation&); | 69 HitTestResult(const HitTestRequest&, const HitTestLocation&); |
| 70 HitTestResult(const HitTestResult&); | 70 HitTestResult(const HitTestResult&); |
| 71 ~HitTestResult(); | 71 ~HitTestResult(); |
| 72 HitTestResult& operator=(const HitTestResult&); | 72 HitTestResult& operator=(const HitTestResult&); |
| 73 DECLARE_TRACE(); | 73 DECLARE_TRACE(); |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 void resolveRectBasedTest(Node* resolvedInnerNode, const LayoutPoint& resolv
edPointInMainFrame); | 162 void resolveRectBasedTest(Node* resolvedInnerNode, const LayoutPoint& resolv
edPointInMainFrame); |
| 163 | 163 |
| 164 private: | 164 private: |
| 165 NodeSet& mutableListBasedTestResult(); // See above. | 165 NodeSet& mutableListBasedTestResult(); // See above. |
| 166 HTMLMediaElement* mediaElement() const; | 166 HTMLMediaElement* mediaElement() const; |
| 167 | 167 |
| 168 HitTestLocation m_hitTestLocation; | 168 HitTestLocation m_hitTestLocation; |
| 169 HitTestRequest m_hitTestRequest; | 169 HitTestRequest m_hitTestRequest; |
| 170 bool m_cacheable; | 170 bool m_cacheable; |
| 171 | 171 |
| 172 RefPtrWillBeMember<Node> m_innerNode; | 172 Member<Node> m_innerNode; |
| 173 RefPtrWillBeMember<Node> m_innerPossiblyPseudoNode; | 173 Member<Node> m_innerPossiblyPseudoNode; |
| 174 // FIXME: Nothing changes this to a value different from m_hitTestLocation! | 174 // FIXME: Nothing changes this to a value different from m_hitTestLocation! |
| 175 LayoutPoint m_pointInInnerNodeFrame; // The hit-tested point in innerNode fr
ame coordinates. | 175 LayoutPoint m_pointInInnerNodeFrame; // The hit-tested point in innerNode fr
ame coordinates. |
| 176 LayoutPoint m_localPoint; // A point in the local coordinate space of m_inne
rNode's layoutObject. Allows us to efficiently | 176 LayoutPoint m_localPoint; // A point in the local coordinate space of m_inne
rNode's layoutObject. Allows us to efficiently |
| 177 // determine where inside the layoutObject we hit on subsequent operatio
ns. | 177 // determine where inside the layoutObject we hit on subsequent operatio
ns. |
| 178 RefPtrWillBeMember<Element> m_innerURLElement; | 178 Member<Element> m_innerURLElement; |
| 179 RefPtrWillBeMember<Scrollbar> m_scrollbar; | 179 Member<Scrollbar> m_scrollbar; |
| 180 bool m_isOverWidget; // Returns true if we are over a widget (and not in the
border/padding area of a LayoutPart for example). | 180 bool m_isOverWidget; // Returns true if we are over a widget (and not in the
border/padding area of a LayoutPart for example). |
| 181 | 181 |
| 182 mutable OwnPtrWillBeMember<NodeSet> m_listBasedTestResult; | 182 mutable Member<NodeSet> m_listBasedTestResult; |
| 183 }; | 183 }; |
| 184 | 184 |
| 185 } // namespace blink | 185 } // namespace blink |
| 186 | 186 |
| 187 WTF_ALLOW_CLEAR_UNUSED_SLOTS_WITH_MEM_FUNCTIONS(blink::HitTestResult); | 187 WTF_ALLOW_CLEAR_UNUSED_SLOTS_WITH_MEM_FUNCTIONS(blink::HitTestResult); |
| 188 | 188 |
| 189 #endif // HitTestResult_h | 189 #endif // HitTestResult_h |
| OLD | NEW |