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 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 return m_innerURLElement->hrefURL(); | 343 return m_innerURLElement->hrefURL(); |
344 } | 344 } |
345 | 345 |
346 bool HitTestResult::isLiveLink() const | 346 bool HitTestResult::isLiveLink() const |
347 { | 347 { |
348 return m_innerURLElement && m_innerURLElement->isLiveLink(); | 348 return m_innerURLElement && m_innerURLElement->isLiveLink(); |
349 } | 349 } |
350 | 350 |
351 bool HitTestResult::isMisspelled() const | 351 bool HitTestResult::isMisspelled() const |
352 { | 352 { |
353 if (!targetNode() || !targetNode()->renderer()) | 353 if (!innerNode() || !innerNode()->renderer()) |
354 return false; | 354 return false; |
355 VisiblePosition pos(targetNode()->renderer()->positionForPoint(localPoint())
); | 355 VisiblePosition pos(innerNode()->renderer()->positionForPoint(localPoint()))
; |
356 if (pos.isNull()) | 356 if (pos.isNull()) |
357 return false; | 357 return false; |
358 return m_innerNonSharedNode->document().markers().markersInRange( | 358 return m_innerNonSharedNode->document().markers().markersInRange( |
359 makeRange(pos, pos).get(), DocumentMarker::MisspellingMarkers()).size()
> 0; | 359 makeRange(pos, pos).get(), DocumentMarker::MisspellingMarkers()).size()
> 0; |
360 } | 360 } |
361 | 361 |
362 bool HitTestResult::isOverLink() const | 362 bool HitTestResult::isOverLink() const |
363 { | 363 { |
364 return m_innerURLElement && m_innerURLElement->isLink(); | 364 return m_innerURLElement && m_innerURLElement->isLink(); |
365 } | 365 } |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
480 { | 480 { |
481 for (Node* node = m_innerNode.get(); node; node = NodeRenderingTraversal::pa
rent(node)) { | 481 for (Node* node = m_innerNode.get(); node; node = NodeRenderingTraversal::pa
rent(node)) { |
482 if (node->isElementNode()) | 482 if (node->isElementNode()) |
483 return toElement(node); | 483 return toElement(node); |
484 } | 484 } |
485 | 485 |
486 return 0; | 486 return 0; |
487 } | 487 } |
488 | 488 |
489 } // namespace blink | 489 } // namespace blink |
OLD | NEW |