OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights |
3 * reserved. | 3 * reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 void ClearPreviousVisualRect(const LayoutBlock&); | 61 void ClearPreviousVisualRect(const LayoutBlock&); |
62 | 62 |
63 // Called indirectly from LayoutBlock::willBeDestroyed(). | 63 // Called indirectly from LayoutBlock::willBeDestroyed(). |
64 void LayoutBlockWillBeDestroyed(const LayoutBlock&); | 64 void LayoutBlockWillBeDestroyed(const LayoutBlock&); |
65 | 65 |
66 // Called when a FrameView finishes layout. Updates style and geometry of the | 66 // Called when a FrameView finishes layout. Updates style and geometry of the |
67 // caret for paint invalidation and painting. | 67 // caret for paint invalidation and painting. |
68 void UpdateStyleAndLayoutIfNeeded(const PositionWithAffinity& caret_position); | 68 void UpdateStyleAndLayoutIfNeeded(const PositionWithAffinity& caret_position); |
69 | 69 |
70 // Called during LayoutBlock paint invalidation. | 70 // Called during LayoutBlock paint invalidation. |
71 void InvalidatePaintIfNeeded(const LayoutBlock&, | 71 void InvalidatePaint(const LayoutBlock&, const PaintInvalidatorContext&); |
72 const PaintInvalidatorContext&); | |
73 | 72 |
74 bool ShouldPaintCaret(const LayoutBlock& block) const { | 73 bool ShouldPaintCaret(const LayoutBlock& block) const { |
75 return &block == layout_block_; | 74 return &block == layout_block_; |
76 } | 75 } |
77 void PaintCaret(GraphicsContext&, | 76 void PaintCaret(GraphicsContext&, |
78 const LayoutPoint& paint_offset, | 77 const LayoutPoint& paint_offset, |
79 DisplayItem::Type) const; | 78 DisplayItem::Type) const; |
80 | 79 |
81 // DisplayItemClient methods. | 80 // DisplayItemClient methods. |
82 LayoutRect VisualRect() const final; | 81 LayoutRect VisualRect() const final; |
(...skipping 20 matching lines...) Expand all Loading... |
103 // to invalidate the caret in the previous layout block. | 102 // to invalidate the caret in the previous layout block. |
104 const LayoutBlock* previous_layout_block_ = nullptr; | 103 const LayoutBlock* previous_layout_block_ = nullptr; |
105 LayoutRect visual_rect_in_previous_layout_block_; | 104 LayoutRect visual_rect_in_previous_layout_block_; |
106 | 105 |
107 bool needs_paint_invalidation_ = false; | 106 bool needs_paint_invalidation_ = false; |
108 }; | 107 }; |
109 | 108 |
110 } // namespace blink | 109 } // namespace blink |
111 | 110 |
112 #endif // CaretDisplayItemClient_h | 111 #endif // CaretDisplayItemClient_h |
OLD | NEW |