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 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
379 if (!m_innerURLElement) | 379 if (!m_innerURLElement) |
380 return KURL(); | 380 return KURL(); |
381 return m_innerURLElement->hrefURL(); | 381 return m_innerURLElement->hrefURL(); |
382 } | 382 } |
383 | 383 |
384 bool HitTestResult::isLiveLink() const | 384 bool HitTestResult::isLiveLink() const |
385 { | 385 { |
386 return m_innerURLElement && m_innerURLElement->isLiveLink(); | 386 return m_innerURLElement && m_innerURLElement->isLiveLink(); |
387 } | 387 } |
388 | 388 |
| 389 // TODO(yosin) We should move |HitTestResult::isMisspelled()| to |
| 390 // "SelectionController.cpp" as static function. |
389 bool HitTestResult::isMisspelled() const | 391 bool HitTestResult::isMisspelled() const |
390 { | 392 { |
391 if (!innerNode() || !innerNode()->layoutObject()) | 393 if (!innerNode() || !innerNode()->layoutObject()) |
392 return false; | 394 return false; |
393 VisiblePosition pos(innerNode()->layoutObject()->positionForPoint(localPoint
())); | 395 VisiblePosition pos = visiblePositionOf(innerNode()->layoutObject()->positio
nForPoint(localPoint())); |
394 if (pos.isNull()) | 396 if (pos.isNull()) |
395 return false; | 397 return false; |
396 return m_innerNode->document().markers().markersInRange( | 398 return m_innerNode->document().markers().markersInRange( |
397 EphemeralRange(pos.deepEquivalent().parentAnchoredEquivalent()), Documen
tMarker::MisspellingMarkers()).size() > 0; | 399 EphemeralRange(pos.deepEquivalent().parentAnchoredEquivalent()), Documen
tMarker::MisspellingMarkers()).size() > 0; |
398 } | 400 } |
399 | 401 |
400 bool HitTestResult::isOverLink() const | 402 bool HitTestResult::isOverLink() const |
401 { | 403 { |
402 return m_innerURLElement && m_innerURLElement->isLink(); | 404 return m_innerURLElement && m_innerURLElement->isLink(); |
403 } | 405 } |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
524 else if (isHTMLMapElement(m_innerNode)) | 526 else if (isHTMLMapElement(m_innerNode)) |
525 imageMapImageElement = toHTMLMapElement(m_innerNode)->imageElement(); | 527 imageMapImageElement = toHTMLMapElement(m_innerNode)->imageElement(); |
526 | 528 |
527 if (!imageMapImageElement) | 529 if (!imageMapImageElement) |
528 return m_innerNode.get(); | 530 return m_innerNode.get(); |
529 | 531 |
530 return imageMapImageElement; | 532 return imageMapImageElement; |
531 } | 533 } |
532 | 534 |
533 } // namespace blink | 535 } // namespace blink |
OLD | NEW |