| 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 IntRect imageRect() const; | 110 IntRect imageRect() const; |
| 111 KURL absoluteImageURL() const; | 111 KURL absoluteImageURL() const; |
| 112 KURL absoluteMediaURL() const; | 112 KURL absoluteMediaURL() const; |
| 113 KURL absoluteLinkURL() const; | 113 KURL absoluteLinkURL() const; |
| 114 String textContent() const; | 114 String textContent() const; |
| 115 bool isLiveLink() const; | 115 bool isLiveLink() const; |
| 116 bool isMisspelled() const; | 116 bool isMisspelled() const; |
| 117 bool isContentEditable() const; | 117 bool isContentEditable() const; |
| 118 | 118 |
| 119 bool isOverLink() const; | 119 bool isOverLink() const; |
| 120 // Returns true if it is rect-based hit test and needs to continue until the
rect is fully | 120 |
| 121 // enclosed by the boundaries of a node. | 121 // Return true if the test is a list-based test and we should continue testi
ng. |
| 122 bool addNodeToRectBasedTestResult(Node*, const HitTestRequest&, const HitTes
tLocation& pointInContainer, const LayoutRect& = LayoutRect()); | 122 bool addNodeToListBasedTestResult(Node*, const HitTestRequest&, const HitTes
tLocation& pointInContainer, const LayoutRect& = LayoutRect()); |
| 123 bool addNodeToRectBasedTestResult(Node*, const HitTestRequest&, const HitTes
tLocation& pointInContainer, const FloatRect&); | 123 bool addNodeToListBasedTestResult(Node*, const HitTestRequest&, const HitTes
tLocation& pointInContainer, const FloatRect&); |
| 124 void append(const HitTestResult&); | 124 void append(const HitTestResult&); |
| 125 | 125 |
| 126 // If m_rectBasedTestResult is 0 then set it to a new NodeSet. Return *m_rec
tBasedTestResult. Lazy allocation makes | 126 // If m_listBasedTestResult is 0 then set it to a new NodeSet. Return *m_lis
tBasedTestResult. Lazy allocation makes |
| 127 // sense because the NodeSet is seldom necessary, and it's somewhat expensiv
e to allocate and initialize. This method does | 127 // sense because the NodeSet is seldom necessary, and it's somewhat expensiv
e to allocate and initialize. This method does |
| 128 // the same thing as mutableRectBasedTestResult(), but here the return value
is const. | 128 // the same thing as mutableListBasedTestResult(), but here the return value
is const. |
| 129 const NodeSet& rectBasedTestResult() const; | 129 const NodeSet& listBasedTestResult() const; |
| 130 | 130 |
| 131 // Collapse the rect-based test result into a single target at the specified
location. | 131 // Collapse the rect-based test result into a single target at the specified
location. |
| 132 void resolveRectBasedTest(Node* resolvedInnerNode, const LayoutPoint& resolv
edPointInMainFrame); | 132 void resolveRectBasedTest(Node* resolvedInnerNode, const LayoutPoint& resolv
edPointInMainFrame); |
| 133 | 133 |
| 134 private: | 134 private: |
| 135 NodeSet& mutableRectBasedTestResult(); // See above. | 135 NodeSet& mutableListBasedTestResult(); // See above. |
| 136 HTMLMediaElement* mediaElement() const; | 136 HTMLMediaElement* mediaElement() const; |
| 137 | 137 |
| 138 HitTestLocation m_hitTestLocation; | 138 HitTestLocation m_hitTestLocation; |
| 139 | 139 |
| 140 RefPtrWillBeMember<Node> m_innerNode; | 140 RefPtrWillBeMember<Node> m_innerNode; |
| 141 RefPtrWillBeMember<Node> m_innerPossiblyPseudoNode; | 141 RefPtrWillBeMember<Node> m_innerPossiblyPseudoNode; |
| 142 RefPtrWillBeMember<Node> m_innerNonSharedNode; | 142 RefPtrWillBeMember<Node> m_innerNonSharedNode; |
| 143 // FIXME: Nothing changes this to a value different from m_hitTestLocation! | 143 // FIXME: Nothing changes this to a value different from m_hitTestLocation! |
| 144 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. |
| 145 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 |
| 146 // determine where inside the renderer we hit on s
ubsequent operations. | 146 // determine where inside the renderer we hit on s
ubsequent operations. |
| 147 RefPtrWillBeMember<Element> m_innerURLElement; | 147 RefPtrWillBeMember<Element> m_innerURLElement; |
| 148 RefPtrWillBeMember<Scrollbar> m_scrollbar; | 148 RefPtrWillBeMember<Scrollbar> m_scrollbar; |
| 149 bool m_isOverWidget; // Returns true if we are over a widget (and not in the
border/padding area of a RenderPart for example). | 149 bool m_isOverWidget; // Returns true if we are over a widget (and not in the
border/padding area of a RenderPart for example). |
| 150 | 150 |
| 151 mutable OwnPtrWillBeMember<NodeSet> m_rectBasedTestResult; | 151 mutable OwnPtrWillBeMember<NodeSet> m_listBasedTestResult; |
| 152 }; | 152 }; |
| 153 | 153 |
| 154 } // namespace blink | 154 } // namespace blink |
| 155 | 155 |
| 156 #endif // HitTestResult_h | 156 #endif // HitTestResult_h |
| OLD | NEW |