Chromium Code Reviews| 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); |