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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 LayoutRect new_local_rect = ComputeCaretRect(caret_position); | 182 LayoutRect new_local_rect = ComputeCaretRect(caret_position); |
183 if (new_local_rect != local_rect_) { | 183 if (new_local_rect != local_rect_) { |
184 needs_paint_invalidation_ = true; | 184 needs_paint_invalidation_ = true; |
185 local_rect_ = new_local_rect; | 185 local_rect_ = new_local_rect; |
186 } | 186 } |
187 | 187 |
188 if (needs_paint_invalidation_) | 188 if (needs_paint_invalidation_) |
189 new_layout_block->SetMayNeedPaintInvalidation(); | 189 new_layout_block->SetMayNeedPaintInvalidation(); |
190 } | 190 } |
191 | 191 |
192 void CaretDisplayItemClient::InvalidatePaintIfNeeded( | 192 void CaretDisplayItemClient::InvalidatePaint( |
193 const LayoutBlock& block, | 193 const LayoutBlock& block, |
194 const PaintInvalidatorContext& context) { | 194 const PaintInvalidatorContext& context) { |
195 if (block == layout_block_) { | 195 if (block == layout_block_) { |
196 InvalidatePaintInCurrentLayoutBlock(context); | 196 InvalidatePaintInCurrentLayoutBlock(context); |
197 return; | 197 return; |
198 } | 198 } |
199 | 199 |
200 if (block == previous_layout_block_) | 200 if (block == previous_layout_block_) |
201 InvalidatePaintInPreviousLayoutBlock(context); | 201 InvalidatePaintInPreviousLayoutBlock(context); |
202 } | 202 } |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 | 301 |
302 String CaretDisplayItemClient::DebugName() const { | 302 String CaretDisplayItemClient::DebugName() const { |
303 return "Caret"; | 303 return "Caret"; |
304 } | 304 } |
305 | 305 |
306 LayoutRect CaretDisplayItemClient::VisualRect() const { | 306 LayoutRect CaretDisplayItemClient::VisualRect() const { |
307 return visual_rect_; | 307 return visual_rect_; |
308 } | 308 } |
309 | 309 |
310 } // namespace blink | 310 } // namespace blink |
OLD | NEW |