| 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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 // enclosed by the boundaries of a node. | 119 // enclosed by the boundaries of a node. |
| 120 bool addNodeToRectBasedTestResult(Node*, const HitTestRequest&, const HitTes
tLocation& pointInContainer, const LayoutRect& = LayoutRect()); | 120 bool addNodeToRectBasedTestResult(Node*, const HitTestRequest&, const HitTes
tLocation& pointInContainer, const LayoutRect& = LayoutRect()); |
| 121 bool addNodeToRectBasedTestResult(Node*, const HitTestRequest&, const HitTes
tLocation& pointInContainer, const FloatRect&); | 121 bool addNodeToRectBasedTestResult(Node*, const HitTestRequest&, const HitTes
tLocation& pointInContainer, const FloatRect&); |
| 122 void append(const HitTestResult&); | 122 void append(const HitTestResult&); |
| 123 | 123 |
| 124 // If m_rectBasedTestResult is 0 then set it to a new NodeSet. Return *m_rec
tBasedTestResult. Lazy allocation makes | 124 // If m_rectBasedTestResult is 0 then set it to a new NodeSet. Return *m_rec
tBasedTestResult. Lazy allocation makes |
| 125 // sense because the NodeSet is seldom necessary, and it's somewhat expensiv
e to allocate and initialize. This method does | 125 // sense because the NodeSet is seldom necessary, and it's somewhat expensiv
e to allocate and initialize. This method does |
| 126 // the same thing as mutableRectBasedTestResult(), but here the return value
is const. | 126 // the same thing as mutableRectBasedTestResult(), but here the return value
is const. |
| 127 const NodeSet& rectBasedTestResult() const; | 127 const NodeSet& rectBasedTestResult() const; |
| 128 | 128 |
| 129 // Collapse the rect-based test result into a single target at the specified
location. |
| 130 void resolveRectBasedTest(Node* resolvedInnerNode, const LayoutPoint& resolv
edPointInMainFrame); |
| 131 |
| 129 Node* targetNode() const; | 132 Node* targetNode() const; |
| 130 | 133 |
| 131 private: | 134 private: |
| 132 NodeSet& mutableRectBasedTestResult(); // See above. | 135 NodeSet& mutableRectBasedTestResult(); // See above. |
| 133 HTMLMediaElement* mediaElement() const; | 136 HTMLMediaElement* mediaElement() const; |
| 134 | 137 |
| 135 HitTestLocation m_hitTestLocation; | 138 HitTestLocation m_hitTestLocation; |
| 136 | 139 |
| 137 RefPtrWillBeMember<Node> m_innerNode; | 140 RefPtrWillBeMember<Node> m_innerNode; |
| 138 RefPtrWillBeMember<Node> m_innerPossiblyPseudoNode; | 141 RefPtrWillBeMember<Node> m_innerPossiblyPseudoNode; |
| 139 RefPtrWillBeMember<Node> m_innerNonSharedNode; | 142 RefPtrWillBeMember<Node> m_innerNonSharedNode; |
| 143 // FIXME: Nothing changes this to a value different from m_hitTestLocation! |
| 140 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. |
| 141 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 |
| 142 // determine where inside the renderer we hit on s
ubsequent operations. | 146 // determine where inside the renderer we hit on s
ubsequent operations. |
| 143 RefPtrWillBeMember<Element> m_innerURLElement; | 147 RefPtrWillBeMember<Element> m_innerURLElement; |
| 144 RefPtr<Scrollbar> m_scrollbar; | 148 RefPtr<Scrollbar> m_scrollbar; |
| 145 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). |
| 146 bool m_isFirstLetter; | 150 bool m_isFirstLetter; |
| 147 | 151 |
| 148 mutable OwnPtrWillBeMember<NodeSet> m_rectBasedTestResult; | 152 mutable OwnPtrWillBeMember<NodeSet> m_rectBasedTestResult; |
| 149 }; | 153 }; |
| 150 | 154 |
| 151 } // namespace WebCore | 155 } // namespace WebCore |
| 152 | 156 |
| 153 #endif // HitTestResult_h | 157 #endif // HitTestResult_h |
| OLD | NEW |