| 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/FrameSetPainter.h" | 5 #include "core/paint/FrameSetPainter.h" |
| 6 | 6 |
| 7 #include "core/html/HTMLFrameSetElement.h" | 7 #include "core/html/HTMLFrameSetElement.h" |
| 8 #include "core/layout/LayoutFrameSet.h" | 8 #include "core/layout/LayoutFrameSet.h" |
| 9 #include "core/paint/LayoutObjectDrawingRecorder.h" | 9 #include "core/paint/LayoutObjectDrawingRecorder.h" |
| 10 #include "core/paint/PaintInfo.h" | 10 #include "core/paint/PaintInfo.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 } | 68 } |
| 69 | 69 |
| 70 void FrameSetPainter::paintBorders(const PaintInfo& paintInfo, const LayoutPoint
& adjustedPaintOffset) | 70 void FrameSetPainter::paintBorders(const PaintInfo& paintInfo, const LayoutPoint
& adjustedPaintOffset) |
| 71 { | 71 { |
| 72 if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(paintInfo.contex
t, m_layoutFrameSet, paintInfo.phase, adjustedPaintOffset)) | 72 if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(paintInfo.contex
t, m_layoutFrameSet, paintInfo.phase, adjustedPaintOffset)) |
| 73 return; | 73 return; |
| 74 | 74 |
| 75 LayoutRect adjustedFrameRect(adjustedPaintOffset, m_layoutFrameSet.size()); | 75 LayoutRect adjustedFrameRect(adjustedPaintOffset, m_layoutFrameSet.size()); |
| 76 LayoutObjectDrawingRecorder recorder(paintInfo.context, m_layoutFrameSet, pa
intInfo.phase, adjustedFrameRect, adjustedPaintOffset); | 76 LayoutObjectDrawingRecorder recorder(paintInfo.context, m_layoutFrameSet, pa
intInfo.phase, adjustedFrameRect, adjustedPaintOffset); |
| 77 | 77 |
| 78 LayoutUnit borderThickness = m_layoutFrameSet.frameSet()->border(); | 78 LayoutUnit borderThickness(m_layoutFrameSet.frameSet()->border()); |
| 79 if (!borderThickness) | 79 if (!borderThickness) |
| 80 return; | 80 return; |
| 81 | 81 |
| 82 LayoutObject* child = m_layoutFrameSet.firstChild(); | 82 LayoutObject* child = m_layoutFrameSet.firstChild(); |
| 83 size_t rows = m_layoutFrameSet.rows().m_sizes.size(); | 83 size_t rows = m_layoutFrameSet.rows().m_sizes.size(); |
| 84 size_t cols = m_layoutFrameSet.columns().m_sizes.size(); | 84 size_t cols = m_layoutFrameSet.columns().m_sizes.size(); |
| 85 LayoutUnit yPos; | 85 LayoutUnit yPos; |
| 86 for (size_t r = 0; r < rows; r++) { | 86 for (size_t r = 0; r < rows; r++) { |
| 87 LayoutUnit xPos; | 87 LayoutUnit xPos; |
| 88 for (size_t c = 0; c < cols; c++) { | 88 for (size_t c = 0; c < cols; c++) { |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 LayoutObject* child = m_layoutFrameSet.firstChild(); | 133 LayoutObject* child = m_layoutFrameSet.firstChild(); |
| 134 if (!child) | 134 if (!child) |
| 135 return; | 135 return; |
| 136 | 136 |
| 137 LayoutPoint adjustedPaintOffset = paintOffset + m_layoutFrameSet.location(); | 137 LayoutPoint adjustedPaintOffset = paintOffset + m_layoutFrameSet.location(); |
| 138 paintChildren(paintInfo, adjustedPaintOffset); | 138 paintChildren(paintInfo, adjustedPaintOffset); |
| 139 paintBorders(paintInfo, adjustedPaintOffset); | 139 paintBorders(paintInfo, adjustedPaintOffset); |
| 140 } | 140 } |
| 141 | 141 |
| 142 } // namespace blink | 142 } // namespace blink |
| OLD | NEW |