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/FieldsetPainter.h" | 6 #include "core/paint/FieldsetPainter.h" |
7 | 7 |
8 #include "core/layout/LayoutFieldset.h" | 8 #include "core/layout/LayoutFieldset.h" |
9 #include "core/paint/BoxDecorationData.h" | 9 #include "core/paint/BoxDecorationData.h" |
10 #include "core/paint/BoxPainter.h" | 10 #include "core/paint/BoxPainter.h" |
11 #include "core/paint/LayoutObjectDrawingRecorder.h" | 11 #include "core/paint/LayoutObjectDrawingRecorder.h" |
12 #include "core/paint/PaintInfo.h" | 12 #include "core/paint/PaintInfo.h" |
| 13 #include "platform/graphics/GraphicsContextStateSaver.h" |
13 | 14 |
14 namespace blink { | 15 namespace blink { |
15 | 16 |
16 void FieldsetPainter::paintBoxDecorationBackground(const PaintInfo& paintInfo, c
onst LayoutPoint& paintOffset) | 17 void FieldsetPainter::paintBoxDecorationBackground(const PaintInfo& paintInfo, c
onst LayoutPoint& paintOffset) |
17 { | 18 { |
18 if (!paintInfo.shouldPaintWithinRoot(&m_layoutFieldset)) | 19 if (!paintInfo.shouldPaintWithinRoot(&m_layoutFieldset)) |
19 return; | 20 return; |
20 | 21 |
21 LayoutRect paintRect(paintOffset, m_layoutFieldset.size()); | 22 LayoutRect paintRect(paintOffset, m_layoutFieldset.size()); |
22 LayoutBox* legend = m_layoutFieldset.findInFlowLegend(); | 23 LayoutBox* legend = m_layoutFieldset.findInFlowLegend(); |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 LayoutUnit xOff = (legend->location().x() > 0) ? LayoutUnit() : (legend-
>size().width() - m_layoutFieldset.borderLeft()) / 2; | 95 LayoutUnit xOff = (legend->location().x() > 0) ? LayoutUnit() : (legend-
>size().width() - m_layoutFieldset.borderLeft()) / 2; |
95 paintRect.expand(-xOff, 0); | 96 paintRect.expand(-xOff, 0); |
96 paintRect.move(xOff, 0); | 97 paintRect.move(xOff, 0); |
97 } | 98 } |
98 | 99 |
99 LayoutObjectDrawingRecorder recorder(*paintInfo.context, m_layoutFieldset, p
aintInfo.phase, paintRect); | 100 LayoutObjectDrawingRecorder recorder(*paintInfo.context, m_layoutFieldset, p
aintInfo.phase, paintRect); |
100 BoxPainter(m_layoutFieldset).paintMaskImages(paintInfo, paintRect); | 101 BoxPainter(m_layoutFieldset).paintMaskImages(paintInfo, paintRect); |
101 } | 102 } |
102 | 103 |
103 } // namespace blink | 104 } // namespace blink |
OLD | NEW |