| 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/FrameSelection.h" | 8 #include "core/editing/FrameSelection.h" |
| 9 #include "core/frame/Settings.h" | 9 #include "core/frame/Settings.h" |
| 10 #include "core/layout/LayoutFlexibleBox.h" | 10 #include "core/layout/LayoutFlexibleBox.h" |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 return; | 179 return; |
| 180 } | 180 } |
| 181 | 181 |
| 182 if (paintPhase == PaintPhaseClippingMask && m_layoutBlock.style()->visibilit
y() == VISIBLE) { | 182 if (paintPhase == PaintPhaseClippingMask && m_layoutBlock.style()->visibilit
y() == VISIBLE) { |
| 183 BoxPainter(m_layoutBlock).paintClippingMask(paintInfo, paintOffset); | 183 BoxPainter(m_layoutBlock).paintClippingMask(paintInfo, paintOffset); |
| 184 return; | 184 return; |
| 185 } | 185 } |
| 186 | 186 |
| 187 { | 187 { |
| 188 PaintInfo scrolledPaintInfo(paintInfo); | 188 PaintInfo scrolledPaintInfo(paintInfo); |
| 189 OwnPtr<ScrollRecorder> scrollRecorder; | 189 ScrollRecorder scrollRecorder(*paintInfo.context, m_layoutBlock, paintPh
ase); |
| 190 if (m_layoutBlock.hasOverflowClip()) { | 190 if (m_layoutBlock.hasOverflowClip()) { |
| 191 IntSize scrollOffset = m_layoutBlock.scrolledContentOffset(); | 191 IntSize scrollOffset = m_layoutBlock.scrolledContentOffset(); |
| 192 if (m_layoutBlock.layer()->scrollsOverflow() || !scrollOffset.isZero
()) { | 192 if (m_layoutBlock.layer()->scrollsOverflow() || !scrollOffset.isZero
()) { |
| 193 scrollRecorder = adoptPtr(new ScrollRecorder(*paintInfo.context,
m_layoutBlock, paintPhase, scrollOffset)); | 193 scrollRecorder.begin(scrollOffset); |
| 194 scrolledPaintInfo.rect.move(scrollOffset); | 194 scrolledPaintInfo.rect.move(scrollOffset); |
| 195 } | 195 } |
| 196 } | 196 } |
| 197 | 197 |
| 198 if ((paintPhase == PaintPhaseBlockBackground || paintPhase == PaintPhase
ChildBlockBackground) | 198 if ((paintPhase == PaintPhaseBlockBackground || paintPhase == PaintPhase
ChildBlockBackground) |
| 199 && m_layoutBlock.style()->visibility() == VISIBLE | 199 && m_layoutBlock.style()->visibility() == VISIBLE |
| 200 && m_layoutBlock.hasColumns() | 200 && m_layoutBlock.hasColumns() |
| 201 && !paintInfo.paintRootBackgroundOnly()) { | 201 && !paintInfo.paintRootBackgroundOnly()) { |
| 202 LayoutObjectDrawingRecorder recorder(*paintInfo.context, m_layoutBlo
ck, DisplayItem::ColumnRules, bounds); | 202 LayoutObjectDrawingRecorder recorder(*paintInfo.context, m_layoutBlo
ck, DisplayItem::ColumnRules, bounds); |
| 203 if (!recorder.canUseCachedDrawing()) | 203 if (!recorder.canUseCachedDrawing()) |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 504 LayoutBlock* block = flow->containingBlock(); | 504 LayoutBlock* block = flow->containingBlock(); |
| 505 for ( ; block && block != &m_layoutBlock; block = block->containingBlock
()) | 505 for ( ; block && block != &m_layoutBlock; block = block->containingBlock
()) |
| 506 accumulatedPaintOffset.moveBy(block->location()); | 506 accumulatedPaintOffset.moveBy(block->location()); |
| 507 ASSERT(block); | 507 ASSERT(block); |
| 508 InlinePainter(*flow).paintOutline(info, accumulatedPaintOffset); | 508 InlinePainter(*flow).paintOutline(info, accumulatedPaintOffset); |
| 509 } | 509 } |
| 510 } | 510 } |
| 511 | 511 |
| 512 | 512 |
| 513 } // namespace blink | 513 } // namespace blink |
| OLD | NEW |