| 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 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 #include "core/CoreExport.h" | 29 #include "core/CoreExport.h" |
| 30 #include "core/editing/VisiblePosition.h" | 30 #include "core/editing/VisiblePosition.h" |
| 31 #include "platform/geometry/IntRect.h" | 31 #include "platform/geometry/IntRect.h" |
| 32 #include "platform/geometry/LayoutRect.h" | 32 #include "platform/geometry/LayoutRect.h" |
| 33 #include "wtf/Noncopyable.h" | 33 #include "wtf/Noncopyable.h" |
| 34 | 34 |
| 35 namespace blink { | 35 namespace blink { |
| 36 | 36 |
| 37 class CullRect; | 37 class CullRect; |
| 38 class DisplayItemClient; |
| 38 class LocalFrame; | 39 class LocalFrame; |
| 39 class GraphicsContext; | 40 class GraphicsContext; |
| 40 class LayoutBlock; | 41 class LayoutBlock; |
| 41 class LayoutViewItem; | 42 class LayoutViewItem; |
| 42 | 43 |
| 43 enum class CaretVisibility { Visible, Hidden }; | 44 enum class CaretVisibility { Visible, Hidden }; |
| 44 | 45 |
| 45 class CORE_EXPORT CaretBase : public GarbageCollectedFinalized<CaretBase> { | 46 class CORE_EXPORT CaretBase : public GarbageCollectedFinalized<CaretBase> { |
| 46 WTF_MAKE_NONCOPYABLE(CaretBase); | 47 WTF_MAKE_NONCOPYABLE(CaretBase); |
| 47 public: | 48 public: |
| (...skipping 17 matching lines...) Expand all Loading... |
| 65 virtual void setCaretVisibility(CaretVisibility); | 66 virtual void setCaretVisibility(CaretVisibility); |
| 66 bool caretIsVisible() const { return m_caretVisibility == CaretVisibility::V
isible; } | 67 bool caretIsVisible() const { return m_caretVisibility == CaretVisibility::V
isible; } |
| 67 CaretVisibility getCaretVisibility() const { return m_caretVisibility; } | 68 CaretVisibility getCaretVisibility() const { return m_caretVisibility; } |
| 68 | 69 |
| 69 static LayoutBlock* caretLayoutObject(Node*); | 70 static LayoutBlock* caretLayoutObject(Node*); |
| 70 static void invalidateLocalCaretRect(Node*, const LayoutRect&); | 71 static void invalidateLocalCaretRect(Node*, const LayoutRect&); |
| 71 | 72 |
| 72 DECLARE_VIRTUAL_TRACE(); | 73 DECLARE_VIRTUAL_TRACE(); |
| 73 | 74 |
| 74 private: | 75 private: |
| 76 static DisplayItemClient* displayItemClientForCaret(Node*); |
| 77 |
| 75 LayoutRect m_caretLocalRect; // caret rect in coords local to the layoutObje
ct responsible for painting the caret | 78 LayoutRect m_caretLocalRect; // caret rect in coords local to the layoutObje
ct responsible for painting the caret |
| 76 CaretVisibility m_caretVisibility; | 79 CaretVisibility m_caretVisibility; |
| 77 }; | 80 }; |
| 78 | 81 |
| 79 } // namespace blink | 82 } // namespace blink |
| 80 | 83 |
| 81 #endif // CaretBase_h | 84 #endif // CaretBase_h |
| OLD | NEW |