| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2008, 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 IntRect absoluteCaretBounds(); | 55 IntRect absoluteCaretBounds(); |
| 56 | 56 |
| 57 bool shouldShowBlockCursor() const { return m_shouldShowBlockCursor; } | 57 bool shouldShowBlockCursor() const { return m_shouldShowBlockCursor; } |
| 58 void setShouldShowBlockCursor(bool); | 58 void setShouldShowBlockCursor(bool); |
| 59 | 59 |
| 60 void paintCaret(GraphicsContext&, const LayoutPoint&); | 60 void paintCaret(GraphicsContext&, const LayoutPoint&); |
| 61 | 61 |
| 62 void dataWillChange(const CharacterData&); | 62 void dataWillChange(const CharacterData&); |
| 63 void nodeWillBeRemoved(Node&); | 63 void nodeWillBeRemoved(Node&); |
| 64 | 64 |
| 65 void prepareForDestruction(); | 65 void documentDetached(); |
| 66 | 66 |
| 67 // For unittests | 67 // For unittests |
| 68 bool shouldPaintCaretForTesting() const { return m_shouldPaintCaret; } | 68 bool shouldPaintCaretForTesting() const { return m_shouldPaintCaret; } |
| 69 bool isPreviousCaretDirtyForTesting() const { return m_previousCaretNode; } | 69 bool isPreviousCaretDirtyForTesting() const { return m_previousCaretNode; } |
| 70 | 70 |
| 71 DECLARE_VIRTUAL_TRACE(); | 71 DECLARE_VIRTUAL_TRACE(); |
| 72 | 72 |
| 73 private: | 73 private: |
| 74 bool shouldBlinkCaret() const; | 74 bool shouldBlinkCaret() const; |
| 75 void caretBlinkTimerFired(Timer<FrameCaret>*); | 75 void caretBlinkTimerFired(Timer<FrameCaret>*); |
| 76 bool caretPositionIsValidForDocument(const Document&) const; | 76 bool caretPositionIsValidForDocument(const Document&) const; |
| 77 | 77 |
| 78 PositionWithAffinity m_caretPosition; | 78 PositionWithAffinity m_caretPosition; |
| 79 const Member<LocalFrame> m_frame; | 79 const Member<LocalFrame> m_frame; |
| 80 // The last node which painted the caret. Retained for clearing the old | 80 // The last node which painted the caret. Retained for clearing the old |
| 81 // caret when it moves. | 81 // caret when it moves. |
| 82 Member<Node> m_previousCaretNode; | 82 Member<Node> m_previousCaretNode; |
| 83 LayoutRect m_previousCaretRect; | 83 LayoutRect m_previousCaretRect; |
| 84 CaretVisibility m_previousCaretVisibility; | 84 CaretVisibility m_previousCaretVisibility; |
| 85 Timer<FrameCaret> m_caretBlinkTimer; | 85 Timer<FrameCaret> m_caretBlinkTimer; |
| 86 bool m_caretRectDirty : 1; | 86 bool m_caretRectDirty : 1; |
| 87 bool m_shouldPaintCaret : 1; | 87 bool m_shouldPaintCaret : 1; |
| 88 bool m_isCaretBlinkingSuspended : 1; | 88 bool m_isCaretBlinkingSuspended : 1; |
| 89 bool m_shouldShowBlockCursor : 1; | 89 bool m_shouldShowBlockCursor : 1; |
| 90 }; | 90 }; |
| 91 | 91 |
| 92 } // namespace blink | 92 } // namespace blink |
| 93 | 93 |
| 94 #endif // FrameCaret_h | 94 #endif // FrameCaret_h |
| OLD | NEW |