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

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

Issue 2450213002: Utilize EditCommand::setEndingSelection() taking SelectionInDOMTree (Closed)
Patch Set: 2016-10-28T14:44:14 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 6fcdd36c5dbb01a9cc65d41481bdbc18e3f90293..566650e1d35c4e1e433d66649f1216bf325e8989 100644
--- a/third_party/WebKit/Source/core/editing/commands/CreateLinkCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/CreateLinkCommand.cpp
@@ -54,13 +54,12 @@ void CreateLinkCommand::doApply(EditingState* editingState) {
appendNode(textNode, anchorElement, editingState);
if (editingState->isAborted())
return;
- document().updateStyleAndLayoutIgnorePendingStylesheets();
- setEndingSelection(createVisibleSelection(
+ setEndingSelection(
SelectionInDOMTree::Builder()
.collapse(Position::inParentBeforeNode(*anchorElement))
.extend(Position::inParentAfterNode(*anchorElement))
.setIsDirectional(endingSelection().isDirectional())
- .build()));
+ .build());
}
}

Powered by Google App Engine
This is Rietveld 408576698