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

Unified Diff: Source/core/page/DragController.cpp

Issue 1316603002: Make DragController to use VisibleSelection::toNormalizedEphemeralRange() instead of toNormalizedRan (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-08-25T14:37:36 Created 5 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/DragController.cpp
diff --git a/Source/core/page/DragController.cpp b/Source/core/page/DragController.cpp
index cdf18316ae531ea2763829cbc36f0b5db7b6a042..78a23a16f795fa8343a04d85512c825351ebae5b 100644
--- a/Source/core/page/DragController.cpp
+++ b/Source/core/page/DragController.cpp
@@ -430,7 +430,7 @@ static bool setSelectionToDragCaret(LocalFrame* frame, VisibleSelection& dragCar
if (frame->selection().isNone()) {
dragCaret = VisibleSelection(frame->visiblePositionForPoint(point));
frame->selection().setSelection(dragCaret);
- range = dragCaret.toNormalizedRange();
+ range = createRange(dragCaret.toNormalizedEphemeralRange());
}
return !frame->selection().isNone() && frame->selection().isContentEditable();
}
@@ -483,7 +483,7 @@ bool DragController::concludeEditDrag(DragData* dragData)
VisibleSelection dragCaret(m_page->dragCaretController().caretPosition());
m_page->dragCaretController().clear();
- RefPtrWillBeRawPtr<Range> range = dragCaret.toNormalizedRange();
+ RefPtrWillBeRawPtr<Range> range = createRange(dragCaret.toNormalizedEphemeralRange());
RefPtrWillBeRawPtr<Element> rootEditableElement = innerFrame->selection().rootEditableElement();
// For range to be null a WebKit client must have done something bad while
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698