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

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

Issue 2341053002: Mark the createVisiblePosition overloads as deprecated (Closed)
Patch Set: minor revision Created 4 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
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 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 } 354 }
355 355
356 bool HitTestResult::isLiveLink() const 356 bool HitTestResult::isLiveLink() const
357 { 357 {
358 return m_innerURLElement && m_innerURLElement->isLiveLink(); 358 return m_innerURLElement && m_innerURLElement->isLiveLink();
359 } 359 }
360 360
361 // TODO(yosin) We should move |HitTestResult::isMisspelled()| to 361 // TODO(yosin) We should move |HitTestResult::isMisspelled()| to
362 // "SelectionController.cpp" as static function. 362 // "SelectionController.cpp" as static function.
363 bool HitTestResult::isMisspelled() const 363 bool HitTestResult::isMisspelled() const
364 { 364 {
yosin_UTC9 2016/09/16 02:01:21 TODO: Since |HitTestResult::isMissspelled()| is ca
365 if (!innerNode() || !innerNode()->layoutObject()) 365 if (!innerNode() || !innerNode()->layoutObject())
366 return false; 366 return false;
367 VisiblePosition pos = createVisiblePosition(innerNode()->layoutObject()->pos itionForPoint(localPoint())); 367 VisiblePosition pos = createVisiblePositionDeprecated(innerNode()->layoutObj ect()->positionForPoint(localPoint()));
368 if (pos.isNull()) 368 if (pos.isNull())
369 return false; 369 return false;
370 return m_innerNode->document().markers().markersInRange( 370 return m_innerNode->document().markers().markersInRange(
371 EphemeralRange(pos.deepEquivalent().parentAnchoredEquivalent()), Documen tMarker::MisspellingMarkers()).size() > 0; 371 EphemeralRange(pos.deepEquivalent().parentAnchoredEquivalent()), Documen tMarker::MisspellingMarkers()).size() > 0;
372 } 372 }
373 373
374 bool HitTestResult::isOverLink() const 374 bool HitTestResult::isOverLink() const
375 { 375 {
376 return m_innerURLElement && m_innerURLElement->isLink(); 376 return m_innerURLElement && m_innerURLElement->isLink();
377 } 377 }
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 else if (isHTMLMapElement(m_innerNode)) 513 else if (isHTMLMapElement(m_innerNode))
514 imageMapImageElement = toHTMLMapElement(m_innerNode)->imageElement(); 514 imageMapImageElement = toHTMLMapElement(m_innerNode)->imageElement();
515 515
516 if (!imageMapImageElement) 516 if (!imageMapImageElement)
517 return m_innerNode.get(); 517 return m_innerNode.get();
518 518
519 return imageMapImageElement; 519 return imageMapImageElement;
520 } 520 }
521 521
522 } // namespace blink 522 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698