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

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

Issue 2430253003: Get rid of createVisibleSelection() to take EphemeralRange (Closed)
Patch Set: 2016-10-20T14:03:19 Created 4 years, 2 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/page/DragController.cpp
diff --git a/third_party/WebKit/Source/core/page/DragController.cpp b/third_party/WebKit/Source/core/page/DragController.cpp
index 25bb2766bf30cd9a58a8ece2b74f73aa08a7c43d..a6130344a3a4679027e8f724c31a4a26872a190b 100644
--- a/third_party/WebKit/Source/core/page/DragController.cpp
+++ b/third_party/WebKit/Source/core/page/DragController.cpp
@@ -838,10 +838,13 @@ static void prepareDataTransferForImageDrag(LocalFrame* source,
const String& label) {
node->document().updateStyleAndLayoutTree();
if (hasRichlyEditableStyle(*node)) {
+ // TODO(editing-dev): We should use |EphemeralRange| instead of |Range|.
Range* range = source->document()->createRange();
range->selectNode(node, ASSERT_NO_EXCEPTION);
source->selection().setSelection(
- createVisibleSelection(EphemeralRange(range)));
+ SelectionInDOMTree::Builder()
+ .setBaseAndExtent(EphemeralRange(range))
+ .build());
}
dataTransfer->declareAndWriteDragImage(
node, !linkURL.isEmpty() ? linkURL : imageURL, label);

Powered by Google App Engine
This is Rietveld 408576698