OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
reserved. | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 21 matching lines...) Expand all Loading... |
32 | 32 |
33 class CullRect; | 33 class CullRect; |
34 | 34 |
35 class DragCaretController final : public NoBaseWillBeGarbageCollectedFinalized<D
ragCaretController>, private CaretBase { | 35 class DragCaretController final : public NoBaseWillBeGarbageCollectedFinalized<D
ragCaretController>, private CaretBase { |
36 WTF_MAKE_NONCOPYABLE(DragCaretController); | 36 WTF_MAKE_NONCOPYABLE(DragCaretController); |
37 USING_FAST_MALLOC_WILL_BE_REMOVED(DragCaretController); | 37 USING_FAST_MALLOC_WILL_BE_REMOVED(DragCaretController); |
38 public: | 38 public: |
39 static PassOwnPtrWillBeRawPtr<DragCaretController> create(); | 39 static PassOwnPtrWillBeRawPtr<DragCaretController> create(); |
40 | 40 |
41 LayoutBlock* caretLayoutObject() const; | 41 LayoutBlock* caretLayoutObject() const; |
42 void paintDragCaret(LocalFrame*, GraphicsContext*, const LayoutPoint&) const
; | 42 void paintDragCaret(LocalFrame*, GraphicsContext&, const LayoutPoint&) const
; |
43 | 43 |
44 bool isContentEditable() const; | 44 bool isContentEditable() const; |
45 bool isContentRichlyEditable() const; | 45 bool isContentRichlyEditable() const; |
46 | 46 |
47 bool hasCaret() const { return m_position.isNotNull(); } | 47 bool hasCaret() const { return m_position.isNotNull(); } |
48 const VisiblePosition& caretPosition() { return m_position; } | 48 const VisiblePosition& caretPosition() { return m_position; } |
49 void setCaretPosition(const PositionWithAffinity&); | 49 void setCaretPosition(const PositionWithAffinity&); |
50 void clear() { setCaretPosition(PositionWithAffinity()); } | 50 void clear() { setCaretPosition(PositionWithAffinity()); } |
51 | 51 |
52 void nodeWillBeRemoved(Node&); | 52 void nodeWillBeRemoved(Node&); |
53 | 53 |
54 DECLARE_TRACE(); | 54 DECLARE_TRACE(); |
55 | 55 |
56 private: | 56 private: |
57 DragCaretController(); | 57 DragCaretController(); |
58 | 58 |
59 VisiblePosition m_position; | 59 VisiblePosition m_position; |
60 }; | 60 }; |
61 | 61 |
62 } // namespace blink | 62 } // namespace blink |
63 | 63 |
64 #endif // DragCaretController_h | 64 #endif // DragCaretController_h |
OLD | NEW |