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

Unified Diff: third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.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/ReplaceSelectionCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp b/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp
index 89143181b1ed0c4af14094a4371065d10cb4b3f3..e2141461cfec85ff973897674e6afc3caae0ea83 100644
--- a/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp
@@ -233,7 +233,8 @@ ReplacementFragment::ReplacementFragment(Document* document,
}
const EphemeralRange range =
- VisibleSelection::selectionFromContentsOfNode(holder)
+ createVisibleSelection(
+ SelectionInDOMTree::Builder().selectAllChildren(*holder).build())
.toNormalizedEphemeralRange();
String text = plainText(range, static_cast<TextIteratorBehavior>(
TextIteratorEmitsOriginalText |

Powered by Google App Engine
This is Rietveld 408576698