| 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/ObjectPainter.h" |
| 10 #include "core/paint/PaintInfo.h" | 11 #include "core/paint/PaintInfo.h" |
| 11 | 12 |
| 12 namespace blink { | 13 namespace blink { |
| 13 | 14 |
| 14 static Color borderStartEdgeColor() { | 15 static Color borderStartEdgeColor() { |
| 15 return Color(170, 170, 170); | 16 return Color(170, 170, 170); |
| 16 } | 17 } |
| 17 | 18 |
| 18 static Color borderEndEdgeColor() { | 19 static Color borderEndEdgeColor() { |
| 19 return Color::black; | 20 return Color::black; |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 child->paint(paintInfo, adjustedPaintOffset); | 144 child->paint(paintInfo, adjustedPaintOffset); |
| 144 child = child->nextSibling(); | 145 child = child->nextSibling(); |
| 145 if (!child) | 146 if (!child) |
| 146 return; | 147 return; |
| 147 } | 148 } |
| 148 } | 149 } |
| 149 } | 150 } |
| 150 | 151 |
| 151 void FrameSetPainter::paint(const PaintInfo& paintInfo, | 152 void FrameSetPainter::paint(const PaintInfo& paintInfo, |
| 152 const LayoutPoint& paintOffset) { | 153 const LayoutPoint& paintOffset) { |
| 154 ObjectPainter(m_layoutFrameSet).checkPaintOffset(paintInfo, paintOffset); |
| 153 if (paintInfo.phase != PaintPhaseForeground) | 155 if (paintInfo.phase != PaintPhaseForeground) |
| 154 return; | 156 return; |
| 155 | 157 |
| 156 LayoutObject* child = m_layoutFrameSet.firstChild(); | 158 LayoutObject* child = m_layoutFrameSet.firstChild(); |
| 157 if (!child) | 159 if (!child) |
| 158 return; | 160 return; |
| 159 | 161 |
| 160 LayoutPoint adjustedPaintOffset = paintOffset + m_layoutFrameSet.location(); | 162 LayoutPoint adjustedPaintOffset = paintOffset + m_layoutFrameSet.location(); |
| 161 paintChildren(paintInfo, adjustedPaintOffset); | 163 paintChildren(paintInfo, adjustedPaintOffset); |
| 162 paintBorders(paintInfo, adjustedPaintOffset); | 164 paintBorders(paintInfo, adjustedPaintOffset); |
| 163 } | 165 } |
| 164 | 166 |
| 165 } // namespace blink | 167 } // namespace blink |
| OLD | NEW |