| 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 24 matching lines...) Expand all Loading... |
| 35 namespace blink { | 35 namespace blink { |
| 36 | 36 |
| 37 class CullRect; | 37 class CullRect; |
| 38 class LocalFrame; | 38 class LocalFrame; |
| 39 class GraphicsContext; | 39 class GraphicsContext; |
| 40 class LayoutBlock; | 40 class LayoutBlock; |
| 41 class LayoutView; | 41 class LayoutView; |
| 42 | 42 |
| 43 class CORE_EXPORT CaretBase { | 43 class CORE_EXPORT CaretBase { |
| 44 WTF_MAKE_NONCOPYABLE(CaretBase); | 44 WTF_MAKE_NONCOPYABLE(CaretBase); |
| 45 USING_FAST_MALLOC_WILL_BE_REMOVED(CaretBase); | |
| 46 protected: | 45 protected: |
| 47 enum CaretVisibility { Visible, Hidden }; | 46 enum CaretVisibility { Visible, Hidden }; |
| 48 explicit CaretBase(CaretVisibility = Hidden); | 47 explicit CaretBase(CaretVisibility = Hidden); |
| 49 | 48 |
| 50 void invalidateCaretRect(Node*, bool caretRectChanged = false); | 49 void invalidateCaretRect(Node*, bool caretRectChanged = false); |
| 51 void clearCaretRect(); | 50 void clearCaretRect(); |
| 52 // Creating VisiblePosition causes synchronous layout so we should use the | 51 // Creating VisiblePosition causes synchronous layout so we should use the |
| 53 // PositionWithAffinity version if possible. | 52 // PositionWithAffinity version if possible. |
| 54 // A position in HTMLTextFromControlElement is a typical example. | 53 // A position in HTMLTextFromControlElement is a typical example. |
| 55 bool updateCaretRect(const PositionWithAffinity& caretPosition); | 54 bool updateCaretRect(const PositionWithAffinity& caretPosition); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 69 static void invalidateLocalCaretRect(Node*, const LayoutRect&); | 68 static void invalidateLocalCaretRect(Node*, const LayoutRect&); |
| 70 | 69 |
| 71 private: | 70 private: |
| 72 LayoutRect m_caretLocalRect; // caret rect in coords local to the layoutObje
ct responsible for painting the caret | 71 LayoutRect m_caretLocalRect; // caret rect in coords local to the layoutObje
ct responsible for painting the caret |
| 73 CaretVisibility m_caretVisibility; | 72 CaretVisibility m_caretVisibility; |
| 74 }; | 73 }; |
| 75 | 74 |
| 76 } // namespace blink | 75 } // namespace blink |
| 77 | 76 |
| 78 #endif // CaretBase_h | 77 #endif // CaretBase_h |
| OLD | NEW |