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