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/FieldsetPainter.h" | 5 #include "core/paint/FieldsetPainter.h" |
6 | 6 |
7 #include "core/layout/LayoutFieldset.h" | 7 #include "core/layout/LayoutFieldset.h" |
8 #include "core/paint/BoxDecorationData.h" | 8 #include "core/paint/BoxDecorationData.h" |
9 #include "core/paint/BoxPainter.h" | 9 #include "core/paint/BoxPainter.h" |
10 #include "core/paint/LayoutObjectDrawingRecorder.h" | 10 #include "core/paint/LayoutObjectDrawingRecorder.h" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 pixelSnappedIntRect(clipLeft, paintRect.y() + legend->location().y(), | 87 pixelSnappedIntRect(clipLeft, paintRect.y() + legend->location().y(), |
88 clipWidth, legend->size().height())); | 88 clipWidth, legend->size().height())); |
89 } | 89 } |
90 | 90 |
91 BoxPainter::paintBorder(m_layoutFieldset, paintInfo, paintRect, | 91 BoxPainter::paintBorder(m_layoutFieldset, paintInfo, paintRect, |
92 m_layoutFieldset.styleRef()); | 92 m_layoutFieldset.styleRef()); |
93 } | 93 } |
94 | 94 |
95 void FieldsetPainter::paintMask(const PaintInfo& paintInfo, | 95 void FieldsetPainter::paintMask(const PaintInfo& paintInfo, |
96 const LayoutPoint& paintOffset) { | 96 const LayoutPoint& paintOffset) { |
97 if (m_layoutFieldset.style()->visibility() != EVisibility::Visible || | 97 if (m_layoutFieldset.style()->visibility() != EVisibility::kVisible || |
98 paintInfo.phase != PaintPhaseMask) | 98 paintInfo.phase != PaintPhaseMask) |
99 return; | 99 return; |
100 | 100 |
101 LayoutRect paintRect = LayoutRect(paintOffset, m_layoutFieldset.size()); | 101 LayoutRect paintRect = LayoutRect(paintOffset, m_layoutFieldset.size()); |
102 LayoutBox* legend = m_layoutFieldset.findInFlowLegend(); | 102 LayoutBox* legend = m_layoutFieldset.findInFlowLegend(); |
103 if (!legend) | 103 if (!legend) |
104 return BoxPainter(m_layoutFieldset).paintMask(paintInfo, paintOffset); | 104 return BoxPainter(m_layoutFieldset).paintMask(paintInfo, paintOffset); |
105 | 105 |
106 if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible( | 106 if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible( |
107 paintInfo.context, m_layoutFieldset, paintInfo.phase)) | 107 paintInfo.context, m_layoutFieldset, paintInfo.phase)) |
(...skipping 17 matching lines...) Expand all Loading... |
125 paintRect.expand(-xOff, LayoutUnit()); | 125 paintRect.expand(-xOff, LayoutUnit()); |
126 paintRect.move(xOff, LayoutUnit()); | 126 paintRect.move(xOff, LayoutUnit()); |
127 } | 127 } |
128 | 128 |
129 LayoutObjectDrawingRecorder recorder(paintInfo.context, m_layoutFieldset, | 129 LayoutObjectDrawingRecorder recorder(paintInfo.context, m_layoutFieldset, |
130 paintInfo.phase, paintRect); | 130 paintInfo.phase, paintRect); |
131 BoxPainter(m_layoutFieldset).paintMaskImages(paintInfo, paintRect); | 131 BoxPainter(m_layoutFieldset).paintMaskImages(paintInfo, paintRect); |
132 } | 132 } |
133 | 133 |
134 } // namespace blink | 134 } // namespace blink |
OLD | NEW |