Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(834)

Side by Side Diff: Source/core/layout/HitTestResult.cpp

Issue 1311853004: Rename visiblePositionOf() to createVisiblePosition() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-09-01T14:43:58 Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/frame/LocalFrame.cpp ('k') | Source/core/layout/PendingSelection.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/core/frame/LocalFrame.cpp ('k') | Source/core/layout/PendingSelection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698