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 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 return toHTMLAnchorElement(m_innerURLElement)->isLiveLink(); | 340 return toHTMLAnchorElement(m_innerURLElement)->isLiveLink(); |
341 | 341 |
342 if (m_innerURLElement->hasTagName(SVGNames::aTag)) | 342 if (m_innerURLElement->hasTagName(SVGNames::aTag)) |
343 return m_innerURLElement->isLink(); | 343 return m_innerURLElement->isLink(); |
344 | 344 |
345 return false; | 345 return false; |
346 } | 346 } |
347 | 347 |
348 bool HitTestResult::isMisspelled() const | 348 bool HitTestResult::isMisspelled() const |
349 { | 349 { |
350 if (!targetNode()) | 350 if (!targetNode() || !targetNode()->renderer()) |
351 return false; | 351 return false; |
352 VisiblePosition pos(targetNode()->renderer()->positionForPoint(localPoint())
); | 352 VisiblePosition pos(targetNode()->renderer()->positionForPoint(localPoint())
); |
353 if (pos.isNull()) | 353 if (pos.isNull()) |
354 return false; | 354 return false; |
355 return m_innerNonSharedNode->document().markers().markersInRange( | 355 return m_innerNonSharedNode->document().markers().markersInRange( |
356 makeRange(pos, pos).get(), DocumentMarker::MisspellingMarkers()).size()
> 0; | 356 makeRange(pos, pos).get(), DocumentMarker::MisspellingMarkers()).size()
> 0; |
357 } | 357 } |
358 | 358 |
359 bool HitTestResult::isOverLink() const | 359 bool HitTestResult::isOverLink() const |
360 { | 360 { |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
492 { | 492 { |
493 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)) { |
494 if (node->isElementNode()) | 494 if (node->isElementNode()) |
495 return toElement(node); | 495 return toElement(node); |
496 } | 496 } |
497 | 497 |
498 return 0; | 498 return 0; |
499 } | 499 } |
500 | 500 |
501 } // namespace WebCore | 501 } // namespace WebCore |
OLD | NEW |