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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 | 208 |
209 // 5. paint outline. | 209 // 5. paint outline. |
210 if ((paintPhase == PaintPhaseOutline || paintPhase == PaintPhaseSelfOutline)
&& m_renderBlock.style()->hasOutline() && m_renderBlock.style()->visibility() =
= VISIBLE) { | 210 if ((paintPhase == PaintPhaseOutline || paintPhase == PaintPhaseSelfOutline)
&& m_renderBlock.style()->hasOutline() && m_renderBlock.style()->visibility() =
= VISIBLE) { |
211 // Don't paint focus ring for anonymous block continuation because the | 211 // Don't paint focus ring for anonymous block continuation because the |
212 // inline element having outline-style:auto paints the whole focus ring. | 212 // inline element having outline-style:auto paints the whole focus ring. |
213 if (!m_renderBlock.style()->outlineStyleIsAuto() || !m_renderBlock.isAno
nymousBlockContinuation()) | 213 if (!m_renderBlock.style()->outlineStyleIsAuto() || !m_renderBlock.isAno
nymousBlockContinuation()) |
214 ObjectPainter(m_renderBlock).paintOutline(paintInfo, LayoutRect(pain
tOffset, m_renderBlock.size())); | 214 ObjectPainter(m_renderBlock).paintOutline(paintInfo, LayoutRect(pain
tOffset, m_renderBlock.size())); |
215 } | 215 } |
216 | 216 |
217 // 6. paint continuation outlines. | 217 // 6. paint continuation outlines. |
218 if ((paintPhase == PaintPhaseOutline || paintPhase == PaintPhaseChildOutline
s)) | 218 if (paintPhase == PaintPhaseOutline || paintPhase == PaintPhaseChildOutlines
) |
219 paintContinuationOutlines(paintInfo, paintOffset); | 219 paintContinuationOutlines(paintInfo, paintOffset); |
220 | 220 |
221 // 7. paint caret. | 221 // 7. paint caret. |
222 // If the caret's node's render object's containing block is this block, and
the paint action is PaintPhaseForeground, | 222 // If the caret's node's render object's containing block is this block, and
the paint action is PaintPhaseForeground, |
223 // then paint the caret. | 223 // then paint the caret. |
224 if (paintPhase == PaintPhaseForeground) { | 224 if (paintPhase == PaintPhaseForeground) { |
225 DrawingRecorder recorder(paintInfo.context, &m_renderBlock, paintPhase,
bounds); | 225 DrawingRecorder recorder(paintInfo.context, &m_renderBlock, paintPhase,
bounds); |
226 paintCarets(paintInfo, paintOffset); | 226 paintCarets(paintInfo, paintOffset); |
227 } | 227 } |
228 } | 228 } |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
482 RenderBlock* block = flow->containingBlock(); | 482 RenderBlock* block = flow->containingBlock(); |
483 for ( ; block && block != &m_renderBlock; block = block->containingBlock
()) | 483 for ( ; block && block != &m_renderBlock; block = block->containingBlock
()) |
484 accumulatedPaintOffset.moveBy(block->location()); | 484 accumulatedPaintOffset.moveBy(block->location()); |
485 ASSERT(block); | 485 ASSERT(block); |
486 InlinePainter(*flow).paintOutline(info, accumulatedPaintOffset); | 486 InlinePainter(*flow).paintOutline(info, accumulatedPaintOffset); |
487 } | 487 } |
488 } | 488 } |
489 | 489 |
490 | 490 |
491 } // namespace blink | 491 } // namespace blink |
OLD | NEW |