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())); |
} |
} |