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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 | 194 |
195 Frame* HitTestResult::targetFrame() const | 195 Frame* HitTestResult::targetFrame() const |
196 { | 196 { |
197 if (!m_innerURLElement) | 197 if (!m_innerURLElement) |
198 return 0; | 198 return 0; |
199 | 199 |
200 Frame* frame = m_innerURLElement->document().frame(); | 200 Frame* frame = m_innerURLElement->document().frame(); |
201 if (!frame) | 201 if (!frame) |
202 return 0; | 202 return 0; |
203 | 203 |
204 return frame->tree()->find(m_innerURLElement->target()); | 204 return frame->tree().find(m_innerURLElement->target()); |
205 } | 205 } |
206 | 206 |
207 bool HitTestResult::isSelected() const | 207 bool HitTestResult::isSelected() const |
208 { | 208 { |
209 if (!m_innerNonSharedNode) | 209 if (!m_innerNonSharedNode) |
210 return false; | 210 return false; |
211 | 211 |
212 if (Frame* frame = m_innerNonSharedNode->document().frame()) | 212 if (Frame* frame = m_innerNonSharedNode->document().frame()) |
213 return frame->selection().contains(m_hitTestLocation.point()); | 213 return frame->selection().contains(m_hitTestLocation.point()); |
214 return false; | 214 return false; |
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 { | 505 { |
506 for (Node* node = m_innerNode.get(); node; node = NodeRenderingTraversal::pa
rent(node)) { | 506 for (Node* node = m_innerNode.get(); node; node = NodeRenderingTraversal::pa
rent(node)) { |
507 if (node->isElementNode()) | 507 if (node->isElementNode()) |
508 return toElement(node); | 508 return toElement(node); |
509 } | 509 } |
510 | 510 |
511 return 0; | 511 return 0; |
512 } | 512 } |
513 | 513 |
514 } // namespace WebCore | 514 } // namespace WebCore |
OLD | NEW |