OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "config.h" | 5 #include "config.h" |
6 #include "core/paint/BlockPainter.h" | 6 #include "core/paint/BlockPainter.h" |
7 | 7 |
8 #include "core/editing/Caret.h" | 8 #include "core/editing/Caret.h" |
9 #include "core/editing/FrameSelection.h" | 9 #include "core/editing/FrameSelection.h" |
10 #include "core/frame/LocalFrame.h" | 10 #include "core/frame/LocalFrame.h" |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
218 if (!m_renderBlock.style()->outlineStyleIsAuto() || !m_renderBlock.isAno nymousBlockContinuation()) | 218 if (!m_renderBlock.style()->outlineStyleIsAuto() || !m_renderBlock.isAno nymousBlockContinuation()) |
219 ObjectPainter(m_renderBlock).paintOutline(paintInfo, LayoutRect(pain tOffset, m_renderBlock.size())); | 219 ObjectPainter(m_renderBlock).paintOutline(paintInfo, LayoutRect(pain tOffset, m_renderBlock.size())); |
220 } | 220 } |
221 | 221 |
222 if (paintPhase == PaintPhaseOutline || paintPhase == PaintPhaseChildOutlines ) | 222 if (paintPhase == PaintPhaseOutline || paintPhase == PaintPhaseChildOutlines ) |
223 paintContinuationOutlines(paintInfo, paintOffset); | 223 paintContinuationOutlines(paintInfo, paintOffset); |
224 | 224 |
225 // If the caret's node's render object's containing block is this block, and the paint action is PaintPhaseForeground, | 225 // If the caret's node's render object's containing block is this block, and the paint action is PaintPhaseForeground, |
226 // then paint the caret. | 226 // then paint the caret. |
227 if (paintPhase == PaintPhaseForeground) { | 227 if (paintPhase == PaintPhaseForeground) { |
228 RenderDrawingRecorder recorder(paintInfo.context, &m_renderBlock, paintP hase, bounds); | 228 RenderDrawingRecorder recorder(paintInfo.context, &m_renderBlock, paintP hase, bounds, DrawingRecorder::DisableCache); |
chrishtr
2014/12/12 00:18:01
Add a comment explaining the situation. Also, how
Xianzhu
2014/12/12 00:24:16
Actually we already invalidated carets within thei
| |
229 paintCarets(paintInfo, paintOffset); | 229 paintCarets(paintInfo, paintOffset); |
230 } | 230 } |
231 } | 231 } |
232 | 232 |
233 static inline bool caretBrowsingEnabled(const Frame* frame) | 233 static inline bool caretBrowsingEnabled(const Frame* frame) |
234 { | 234 { |
235 Settings* settings = frame->settings(); | 235 Settings* settings = frame->settings(); |
236 return settings && settings->caretBrowsingEnabled(); | 236 return settings && settings->caretBrowsingEnabled(); |
237 } | 237 } |
238 | 238 |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
485 RenderBlock* block = flow->containingBlock(); | 485 RenderBlock* block = flow->containingBlock(); |
486 for ( ; block && block != &m_renderBlock; block = block->containingBlock ()) | 486 for ( ; block && block != &m_renderBlock; block = block->containingBlock ()) |
487 accumulatedPaintOffset.moveBy(block->location()); | 487 accumulatedPaintOffset.moveBy(block->location()); |
488 ASSERT(block); | 488 ASSERT(block); |
489 InlinePainter(*flow).paintOutline(info, accumulatedPaintOffset); | 489 InlinePainter(*flow).paintOutline(info, accumulatedPaintOffset); |
490 } | 490 } |
491 } | 491 } |
492 | 492 |
493 | 493 |
494 } // namespace blink | 494 } // namespace blink |
OLD | NEW |