| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 class LayoutViewItem; | 43 class LayoutViewItem; |
| 44 | 44 |
| 45 enum class CaretVisibility { Visible, Hidden }; | 45 enum class CaretVisibility { Visible, Hidden }; |
| 46 | 46 |
| 47 class CORE_EXPORT CaretBase : public GarbageCollectedFinalized<CaretBase>, publi
c DisplayItemClient { | 47 class CORE_EXPORT CaretBase : public GarbageCollectedFinalized<CaretBase>, publi
c DisplayItemClient { |
| 48 WTF_MAKE_NONCOPYABLE(CaretBase); | 48 WTF_MAKE_NONCOPYABLE(CaretBase); |
| 49 public: | 49 public: |
| 50 explicit CaretBase(CaretVisibility = CaretVisibility::Hidden); | 50 explicit CaretBase(CaretVisibility = CaretVisibility::Hidden); |
| 51 virtual ~CaretBase(); | 51 virtual ~CaretBase(); |
| 52 | 52 |
| 53 void invalidateCaretRect(Node*, bool caretRectChanged = false); | 53 void invalidateCaretRect(Node*); |
| 54 void clearCaretRect(); | 54 void clearCaretRect(); |
| 55 // Creating VisiblePosition causes synchronous layout so we should use the | 55 // Creating VisiblePosition causes synchronous layout so we should use the |
| 56 // PositionWithAffinity version if possible. | 56 // PositionWithAffinity version if possible. |
| 57 // A position in HTMLTextFromControlElement is a typical example. | 57 // A position in HTMLTextFromControlElement is a typical example. |
| 58 bool updateCaretRect(const PositionWithAffinity& caretPosition); | 58 bool updateCaretRect(const PositionWithAffinity& caretPosition); |
| 59 bool updateCaretRect(const VisiblePosition& caretPosition); | 59 bool updateCaretRect(const VisiblePosition& caretPosition); |
| 60 IntRect absoluteBoundsForLocalRect(Node*, const LayoutRect&) const; | 60 IntRect absoluteBoundsForLocalRect(Node*, const LayoutRect&) const; |
| 61 bool shouldRepaintCaret(Node&) const; | 61 bool shouldRepaintCaret(Node&) const; |
| 62 bool shouldRepaintCaret(const LayoutViewItem) const; | 62 bool shouldRepaintCaret(const LayoutViewItem) const; |
| 63 void paintCaret(Node*, GraphicsContext&, const LayoutPoint&, DisplayItem::Ty
pe) const; | 63 void paintCaret(Node*, GraphicsContext&, const LayoutPoint&, DisplayItem::Ty
pe) const; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 79 | 79 |
| 80 private: | 80 private: |
| 81 LayoutRect m_caretLocalRect; // caret rect in coords local to the layoutObje
ct responsible for painting the caret | 81 LayoutRect m_caretLocalRect; // caret rect in coords local to the layoutObje
ct responsible for painting the caret |
| 82 CaretVisibility m_caretVisibility; | 82 CaretVisibility m_caretVisibility; |
| 83 LayoutRect m_visualRect; | 83 LayoutRect m_visualRect; |
| 84 }; | 84 }; |
| 85 | 85 |
| 86 } // namespace blink | 86 } // namespace blink |
| 87 | 87 |
| 88 #endif // CaretBase_h | 88 #endif // CaretBase_h |
| OLD | NEW |