| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights |
| 3 * reserved. | 3 * reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 22 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 25 */ | 25 */ |
| 26 | 26 |
| 27 #ifndef DragCaretController_h | 27 #ifndef DragCaretController_h |
| 28 #define DragCaretController_h | 28 #define DragCaretController_h |
| 29 | 29 |
| 30 #include "core/dom/SynchronousMutationObserver.h" | 30 #include "core/dom/SynchronousMutationObserver.h" |
| 31 #include "core/editing/CaretBase.h" | 31 #include "core/editing/CaretBase.h" |
| 32 #include <memory> |
| 32 | 33 |
| 33 namespace blink { | 34 namespace blink { |
| 34 | 35 |
| 35 class DragCaretController final | 36 class DragCaretController final |
| 36 : public GarbageCollectedFinalized<DragCaretController>, | 37 : public GarbageCollectedFinalized<DragCaretController>, |
| 37 public SynchronousMutationObserver { | 38 public SynchronousMutationObserver { |
| 38 WTF_MAKE_NONCOPYABLE(DragCaretController); | 39 WTF_MAKE_NONCOPYABLE(DragCaretController); |
| 39 USING_GARBAGE_COLLECTED_MIXIN(DragCaretController); | 40 USING_GARBAGE_COLLECTED_MIXIN(DragCaretController); |
| 40 | 41 |
| 41 public: | 42 public: |
| (...skipping 17 matching lines...) Expand all Loading... |
| 59 DragCaretController(); | 60 DragCaretController(); |
| 60 | 61 |
| 61 // Implementations of |SynchronousMutationObserver| | 62 // Implementations of |SynchronousMutationObserver| |
| 62 void nodeChildrenWillBeRemoved(ContainerNode&) final; | 63 void nodeChildrenWillBeRemoved(ContainerNode&) final; |
| 63 void nodeWillBeRemoved(Node&) final; | 64 void nodeWillBeRemoved(Node&) final; |
| 64 | 65 |
| 65 PositionWithAffinity m_position; | 66 PositionWithAffinity m_position; |
| 66 // caret rect in coords local to the layoutObject responsible for painting the | 67 // caret rect in coords local to the layoutObject responsible for painting the |
| 67 // caret | 68 // caret |
| 68 LayoutRect m_caretLocalRect; | 69 LayoutRect m_caretLocalRect; |
| 69 const Member<CaretBase> m_caretBase; | 70 const std::unique_ptr<CaretBase> m_caretBase; |
| 70 }; | 71 }; |
| 71 | 72 |
| 72 } // namespace blink | 73 } // namespace blink |
| 73 | 74 |
| 74 #endif // DragCaretController_h | 75 #endif // DragCaretController_h |
| OLD | NEW |