OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2008, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2008, 2011 Apple Inc. All rights reserved. |
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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 | 181 |
182 Frame* HitTestResult::innerNodeFrame() const | 182 Frame* HitTestResult::innerNodeFrame() const |
183 { | 183 { |
184 if (m_innerNonSharedNode) | 184 if (m_innerNonSharedNode) |
185 return m_innerNonSharedNode->document().frame(); | 185 return m_innerNonSharedNode->document().frame(); |
186 if (m_innerNode) | 186 if (m_innerNode) |
187 return m_innerNode->document().frame(); | 187 return m_innerNode->document().frame(); |
188 return 0; | 188 return 0; |
189 } | 189 } |
190 | 190 |
191 Frame* HitTestResult::targetFrame() const | |
192 { | |
193 if (!m_innerURLElement) | |
194 return 0; | |
195 | |
196 Frame* frame = m_innerURLElement->document().frame(); | |
197 if (!frame) | |
198 return 0; | |
199 | |
200 return frame->tree().find(AtomicString(m_innerURLElement->target())); | |
201 } | |
202 | |
203 bool HitTestResult::isSelected() const | 191 bool HitTestResult::isSelected() const |
204 { | 192 { |
205 if (!m_innerNonSharedNode) | 193 if (!m_innerNonSharedNode) |
206 return false; | 194 return false; |
207 | 195 |
208 if (Frame* frame = m_innerNonSharedNode->document().frame()) | 196 if (Frame* frame = m_innerNonSharedNode->document().frame()) |
209 return frame->selection().contains(m_hitTestLocation.point()); | 197 return frame->selection().contains(m_hitTestLocation.point()); |
210 return false; | 198 return false; |
211 } | 199 } |
212 | 200 |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
504 { | 492 { |
505 for (Node* node = m_innerNode.get(); node; node = NodeRenderingTraversal::pa
rent(node)) { | 493 for (Node* node = m_innerNode.get(); node; node = NodeRenderingTraversal::pa
rent(node)) { |
506 if (node->isElementNode()) | 494 if (node->isElementNode()) |
507 return toElement(node); | 495 return toElement(node); |
508 } | 496 } |
509 | 497 |
510 return 0; | 498 return 0; |
511 } | 499 } |
512 | 500 |
513 } // namespace WebCore | 501 } // namespace WebCore |
OLD | NEW |