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

Unified Diff: third_party/WebKit/Source/core/editing/SelectionTemplate.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/SelectionTemplate.cpp
diff --git a/third_party/WebKit/Source/core/editing/SelectionTemplate.cpp b/third_party/WebKit/Source/core/editing/SelectionTemplate.cpp
index 5dd8434137029d54dd351760a1e9d551959e2c45..c901ce77248dea86d74f08c3ab6b270f089a9d89 100644
--- a/third_party/WebKit/Source/core/editing/SelectionTemplate.cpp
+++ b/third_party/WebKit/Source/core/editing/SelectionTemplate.cpp
@@ -185,6 +185,14 @@ SelectionTemplate<Strategy>::Builder::extend(
template <typename Strategy>
typename SelectionTemplate<Strategy>::Builder&
+SelectionTemplate<Strategy>::Builder::selectAllChildren(const Node& node) {
+ DCHECK(node.canContainRangeEndPoint()) << node;
+ return setBaseAndExtent(
+ EphemeralRangeTemplate<Strategy>::rangeOfContents(node));
+}
+
+template <typename Strategy>
+typename SelectionTemplate<Strategy>::Builder&
SelectionTemplate<Strategy>::Builder::setAffinity(TextAffinity affinity) {
m_selection.m_affinity = affinity;
return *this;
« no previous file with comments | « third_party/WebKit/Source/core/editing/SelectionTemplate.h ('k') | third_party/WebKit/Source/core/editing/VisibleSelection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698