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

Unified Diff: third_party/WebKit/Source/core/editing/commands/CreateLinkCommand.cpp

Issue 2451613003: Get rid of createVisibleSelection() taking two Position (Closed)
Patch Set: 2016-10-26T15:09:55 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/editing/commands/CreateLinkCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/CreateLinkCommand.cpp b/third_party/WebKit/Source/core/editing/commands/CreateLinkCommand.cpp
index e132bf87ca80c8ba9b57dca7066a50736b401d1d..6fcdd36c5dbb01a9cc65d41481bdbc18e3f90293 100644
--- a/third_party/WebKit/Source/core/editing/commands/CreateLinkCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/CreateLinkCommand.cpp
@@ -56,9 +56,11 @@ void CreateLinkCommand::doApply(EditingState* editingState) {
return;
document().updateStyleAndLayoutIgnorePendingStylesheets();
setEndingSelection(createVisibleSelection(
- Position::inParentBeforeNode(*anchorElement),
- Position::inParentAfterNode(*anchorElement), TextAffinity::Downstream,
- endingSelection().isDirectional()));
+ SelectionInDOMTree::Builder()
+ .collapse(Position::inParentBeforeNode(*anchorElement))
+ .extend(Position::inParentAfterNode(*anchorElement))
+ .setIsDirectional(endingSelection().isDirectional())
+ .build()));
}
}

Powered by Google App Engine
This is Rietveld 408576698