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

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

Issue 2432173005: Get rid of VisibleSelection::selectionFromContentsOfNode() (Closed)
Patch Set: 2016-10-20T17:14:18 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/CompositeEditCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp b/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
index 5cadbda9a7df38083c8a8cdac41f9362768599e2..c5c10be0b1a62c9f38c9696dba51d772d9379d0e 100644
--- a/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
@@ -1242,7 +1242,8 @@ void CompositeEditCommand::pushAnchorElementDown(Element* anchorNode,
DCHECK(anchorNode->isLink()) << anchorNode;
- setEndingSelection(VisibleSelection::selectionFromContentsOfNode(anchorNode));
+ setEndingSelection(createVisibleSelection(
+ SelectionInDOMTree::Builder().selectAllChildren(*anchorNode).build()));
applyStyledElement(anchorNode, editingState);
if (editingState->isAborted())
return;

Powered by Google App Engine
This is Rietveld 408576698