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

Unified Diff: Source/core/editing/VisibleSelection.h

Issue 1189963003: Templatize PendingSelection class (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « no previous file | Source/core/layout/PendingSelection.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/VisibleSelection.h
diff --git a/Source/core/editing/VisibleSelection.h b/Source/core/editing/VisibleSelection.h
index ba6938d8f1e23483d44b3b9860007737aba27e52..45a4d61281c2dd28cfe8003893ee4d131b11df7e 100644
--- a/Source/core/editing/VisibleSelection.h
+++ b/Source/core/editing/VisibleSelection.h
@@ -43,6 +43,16 @@ class CORE_EXPORT VisibleSelection {
DISALLOW_ALLOCATION();
DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(VisibleSelection);
public:
+ class InDOMTree {
tkent 2015/06/17 08:14:28 The name |InDOMTree| sounds weird though I have no
+ public:
+ using PositionType = Position;
+
+ static PositionType selectionBase(const VisibleSelection& selection) { return selection.base(); }
+ static PositionType selectionExtent(const VisibleSelection& selection) { return selection.extent(); }
+ static PositionType selectionStart(const VisibleSelection& selection) { return selection.start(); }
+ static PositionType selectionEnd(const VisibleSelection& selection) { return selection.end(); }
+ };
+
VisibleSelection();
VisibleSelection(const Position&, EAffinity, bool isDirectional = false);
« no previous file with comments | « no previous file | Source/core/layout/PendingSelection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698