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

Unified Diff: third_party/WebKit/Source/core/editing/VisibleSelection.cpp

Issue 2022723002: Move VisibleSelection::positionRespectingEditingBoundary() to EditingUtilities.cpp (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-05-30T17:10:26 Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/editing/VisibleSelection.cpp
diff --git a/third_party/WebKit/Source/core/editing/VisibleSelection.cpp b/third_party/WebKit/Source/core/editing/VisibleSelection.cpp
index abfaeda96f861d85892fc11b1bf5c63034a33fb4..008e7310771fa339bef9157a29be92d8935aef26 100644
--- a/third_party/WebKit/Source/core/editing/VisibleSelection.cpp
+++ b/third_party/WebKit/Source/core/editing/VisibleSelection.cpp
@@ -734,33 +734,6 @@ void VisibleSelectionTemplate<Strategy>::adjustSelectionToAvoidCrossingEditingBo
}
template <typename Strategy>
-VisiblePositionTemplate<Strategy> VisibleSelectionTemplate<Strategy>::visiblePositionRespectingEditingBoundary(const LayoutPoint& localPoint, Node* targetNode) const
-{
- return createVisiblePosition(positionRespectingEditingBoundary(localPoint, targetNode));
-}
-
-template <typename Strategy>
-PositionWithAffinityTemplate<Strategy> VisibleSelectionTemplate<Strategy>::positionRespectingEditingBoundary(const LayoutPoint& localPoint, Node* targetNode) const
-{
- if (!targetNode->layoutObject())
- return PositionWithAffinityTemplate<Strategy>();
-
- LayoutPoint selectionEndPoint = localPoint;
- Element* editableElement = rootEditableElement();
-
- if (editableElement && !editableElement->contains(targetNode)) {
- if (!editableElement->layoutObject())
- return PositionWithAffinityTemplate<Strategy>();
-
- FloatPoint absolutePoint = targetNode->layoutObject()->localToAbsolute(FloatPoint(selectionEndPoint));
- selectionEndPoint = roundedLayoutPoint(editableElement->layoutObject()->absoluteToLocal(absolutePoint));
- targetNode = editableElement;
- }
-
- return fromPositionInDOMTree<Strategy>(targetNode->layoutObject()->positionForPoint(selectionEndPoint));
-}
-
-template <typename Strategy>
bool VisibleSelectionTemplate<Strategy>::isContentEditable() const
{
return isEditablePosition(start());
« no previous file with comments | « third_party/WebKit/Source/core/editing/VisibleSelection.h ('k') | third_party/WebKit/Source/core/editing/VisibleUnits.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698