| 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 "core/paint/BlockPainter.h" | 5 #include "core/paint/BlockPainter.h" |
| 6 | 6 |
| 7 #include "core/editing/DragCaretController.h" | 7 #include "core/editing/DragCaretController.h" |
| 8 #include "core/editing/FrameSelection.h" | 8 #include "core/editing/FrameSelection.h" |
| 9 #include "core/layout/LayoutFlexibleBox.h" | 9 #include "core/layout/LayoutFlexibleBox.h" |
| 10 #include "core/layout/LayoutInline.h" | 10 #include "core/layout/LayoutInline.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 #include "core/paint/ScrollRecorder.h" | 22 #include "core/paint/ScrollRecorder.h" |
| 23 #include "core/paint/ScrollableAreaPainter.h" | 23 #include "core/paint/ScrollableAreaPainter.h" |
| 24 #include "platform/graphics/GraphicsLayer.h" | 24 #include "platform/graphics/GraphicsLayer.h" |
| 25 #include "platform/graphics/paint/ClipRecorder.h" | 25 #include "platform/graphics/paint/ClipRecorder.h" |
| 26 #include "wtf/Optional.h" | 26 #include "wtf/Optional.h" |
| 27 | 27 |
| 28 namespace blink { | 28 namespace blink { |
| 29 | 29 |
| 30 void BlockPainter::paint(const PaintInfo& paintInfo, | 30 void BlockPainter::paint(const PaintInfo& paintInfo, |
| 31 const LayoutPoint& paintOffset) { | 31 const LayoutPoint& paintOffset) { |
| 32 ObjectPainter(m_layoutBlock).checkPaintOffset(paintInfo, paintOffset); |
| 32 LayoutPoint adjustedPaintOffset = paintOffset + m_layoutBlock.location(); | 33 LayoutPoint adjustedPaintOffset = paintOffset + m_layoutBlock.location(); |
| 33 if (!intersectsPaintRect(paintInfo, adjustedPaintOffset)) | 34 if (!intersectsPaintRect(paintInfo, adjustedPaintOffset)) |
| 34 return; | 35 return; |
| 35 | 36 |
| 36 PaintInfo localPaintInfo(paintInfo); | 37 PaintInfo localPaintInfo(paintInfo); |
| 37 PaintPhase originalPhase = localPaintInfo.phase; | 38 PaintPhase originalPhase = localPaintInfo.phase; |
| 38 | 39 |
| 39 // There are some cases where not all clipped visual overflow is accounted | 40 // There are some cases where not all clipped visual overflow is accounted |
| 40 // for. | 41 // for. |
| 41 // FIXME: reduce the number of such cases. | 42 // FIXME: reduce the number of such cases. |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 } | 299 } |
| 299 | 300 |
| 300 void BlockPainter::paintContents(const PaintInfo& paintInfo, | 301 void BlockPainter::paintContents(const PaintInfo& paintInfo, |
| 301 const LayoutPoint& paintOffset) { | 302 const LayoutPoint& paintOffset) { |
| 302 DCHECK(!m_layoutBlock.childrenInline()); | 303 DCHECK(!m_layoutBlock.childrenInline()); |
| 303 PaintInfo paintInfoForDescendants = paintInfo.forDescendants(); | 304 PaintInfo paintInfoForDescendants = paintInfo.forDescendants(); |
| 304 m_layoutBlock.paintChildren(paintInfoForDescendants, paintOffset); | 305 m_layoutBlock.paintChildren(paintInfoForDescendants, paintOffset); |
| 305 } | 306 } |
| 306 | 307 |
| 307 } // namespace blink | 308 } // namespace blink |
| OLD | NEW |