Chromium Code Reviews| Index: third_party/WebKit/Source/core/editing/SelectionEditor.h |
| diff --git a/third_party/WebKit/Source/core/editing/SelectionEditor.h b/third_party/WebKit/Source/core/editing/SelectionEditor.h |
| index cd1e2dafb5194f76847e1f55e337c58bd9b3b2e2..9b72a2be9e2f74bfd2ae2f26f1409359114aeac7 100644 |
| --- a/third_party/WebKit/Source/core/editing/SelectionEditor.h |
| +++ b/third_party/WebKit/Source/core/editing/SelectionEditor.h |
| @@ -82,6 +82,10 @@ class SelectionEditor final |
| // layout if needed. |
| void updateIfNeeded(); |
| + void cacheRangeOfDocument(Range* range) { m_cachedRange = range; } |
|
yosin_UTC9
2017/02/09 06:52:06
Let's move an implementation to "SelectionEdtior.c
yoichio
2017/02/09 09:31:19
Done.
|
| + Range* documentCachedRange() const { return m_cachedRange; } |
|
yosin_UTC9
2017/02/09 06:52:06
Let's move an implementation to "SelectionEdtior.c
yoichio
2017/02/09 09:31:19
Done.
|
| + void clearDocumentCachedRange(); |
| + |
| DECLARE_TRACE(); |
| private: |
| @@ -100,11 +104,15 @@ class SelectionEditor final |
| VisibleSelectionInFlatTree m_selectionInFlatTree; |
| bool m_observingVisibleSelection; |
| + // TODO(editing-dev): Removing |m_logicalRange| |
| // The range specified by the user, which may not be visually canonicalized |
| // (hence "logical"). This will be invalidated if the underlying |
| // |VisibleSelection| changes. If that happens, this variable will |
| // become |nullptr|, in which case logical positions == visible positions. |
| Member<Range> m_logicalRange; |
| + // If document is root, document.getSelection().addRange(range) is cached on |
| + // this. |
| + Member<Range> m_cachedRange; |
| }; |
| } // namespace blink |