| 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 paintColumnContents(paintInfo, scrolledOffset, true); | 204 paintColumnContents(paintInfo, scrolledOffset, true); |
| 205 else | 205 else |
| 206 m_renderBlock.paintFloats(paintInfo, scrolledOffset, paintPhase == P
aintPhaseSelection || paintPhase == PaintPhaseTextClip); | 206 m_renderBlock.paintFloats(paintInfo, scrolledOffset, paintPhase == P
aintPhaseSelection || paintPhase == PaintPhaseTextClip); |
| 207 } | 207 } |
| 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 m_renderBlock.paintOutline(paintInfo, LayoutRect(paintOffset, m_rend
erBlock.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 == PaintPhaseChildOutline
s)) |
| 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) { |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 506 RenderBlock* block = flow->containingBlock(); | 506 RenderBlock* block = flow->containingBlock(); |
| 507 for ( ; block && block != &m_renderBlock; block = block->containingBlock
()) | 507 for ( ; block && block != &m_renderBlock; block = block->containingBlock
()) |
| 508 accumulatedPaintOffset.moveBy(block->location()); | 508 accumulatedPaintOffset.moveBy(block->location()); |
| 509 ASSERT(block); | 509 ASSERT(block); |
| 510 InlinePainter(*flow).paintOutline(info, accumulatedPaintOffset); | 510 InlinePainter(*flow).paintOutline(info, accumulatedPaintOffset); |
| 511 } | 511 } |
| 512 } | 512 } |
| 513 | 513 |
| 514 | 514 |
| 515 } // namespace blink | 515 } // namespace blink |
| OLD | NEW |