| 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 bool hasCaret() const { return m_position.isNotNull(); } | 52 bool hasCaret() const { return m_position.isNotNull(); } |
| 53 const PositionWithAffinity& caretPosition() { return m_position; } | 53 const PositionWithAffinity& caretPosition() { return m_position; } |
| 54 void setCaretPosition(const PositionWithAffinity&); | 54 void setCaretPosition(const PositionWithAffinity&); |
| 55 void clear() { setCaretPosition(PositionWithAffinity()); } | 55 void clear() { setCaretPosition(PositionWithAffinity()); } |
| 56 | 56 |
| 57 DECLARE_TRACE(); | 57 DECLARE_TRACE(); |
| 58 | 58 |
| 59 private: | 59 private: |
| 60 DragCaretController(); | 60 DragCaretController(); |
| 61 | 61 |
| 62 void invalidateCaretRect(Node*, const LayoutRect&); |
| 63 |
| 62 // Implementations of |SynchronousMutationObserver| | 64 // Implementations of |SynchronousMutationObserver| |
| 63 void nodeChildrenWillBeRemoved(ContainerNode&) final; | 65 void nodeChildrenWillBeRemoved(ContainerNode&) final; |
| 64 void nodeWillBeRemoved(Node&) final; | 66 void nodeWillBeRemoved(Node&) final; |
| 65 | 67 |
| 66 PositionWithAffinity m_position; | 68 PositionWithAffinity m_position; |
| 67 // caret rect in coords local to the layoutObject responsible for painting the | 69 // caret rect in coords local to the layoutObject responsible for painting the |
| 68 // caret | 70 // caret |
| 69 LayoutRect m_caretLocalRect; | 71 LayoutRect m_caretLocalRect; |
| 70 const std::unique_ptr<CaretBase> m_caretBase; | 72 const std::unique_ptr<CaretBase> m_caretBase; |
| 71 }; | 73 }; |
| 72 | 74 |
| 73 } // namespace blink | 75 } // namespace blink |
| 74 | 76 |
| 75 #endif // DragCaretController_h | 77 #endif // DragCaretController_h |
| OLD | NEW |