| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 ? LayoutUnit() | 42 ? LayoutUnit() |
| 43 : (legend->Size().Width() - layout_fieldset_.BorderLeft()) / 2; | 43 : (legend->Size().Width() - layout_fieldset_.BorderLeft()) / 2; |
| 44 paint_rect.SetWidth(paint_rect.Width() - x_off); | 44 paint_rect.SetWidth(paint_rect.Width() - x_off); |
| 45 paint_rect.SetX(paint_rect.X() + x_off); | 45 paint_rect.SetX(paint_rect.X() + x_off); |
| 46 } | 46 } |
| 47 | 47 |
| 48 LayoutObjectDrawingRecorder recorder(paint_info.context, layout_fieldset_, | 48 LayoutObjectDrawingRecorder recorder(paint_info.context, layout_fieldset_, |
| 49 paint_info.phase, paint_rect); | 49 paint_info.phase, paint_rect); |
| 50 BoxDecorationData box_decoration_data(layout_fieldset_); | 50 BoxDecorationData box_decoration_data(layout_fieldset_); |
| 51 | 51 |
| 52 if (box_decoration_data.bleed_avoidance == kBackgroundBleedNone) { | 52 BoxPainter::PaintNormalBoxShadow(paint_info, paint_rect, |
| 53 BoxPainter::PaintNormalBoxShadow(paint_info, paint_rect, | 53 layout_fieldset_.StyleRef()); |
| 54 layout_fieldset_.StyleRef()); | |
| 55 } | |
| 56 BoxPainter(layout_fieldset_) | 54 BoxPainter(layout_fieldset_) |
| 57 .PaintFillLayers(paint_info, box_decoration_data.background_color, | 55 .PaintFillLayers(paint_info, box_decoration_data.background_color, |
| 58 layout_fieldset_.Style()->BackgroundLayers(), | 56 layout_fieldset_.Style()->BackgroundLayers(), |
| 59 paint_rect); | 57 paint_rect); |
| 60 BoxPainter::PaintInsetBoxShadow(paint_info, paint_rect, | 58 BoxPainter::PaintInsetBoxShadow(paint_info, paint_rect, |
| 61 layout_fieldset_.StyleRef()); | 59 layout_fieldset_.StyleRef()); |
| 62 | 60 |
| 63 if (!box_decoration_data.has_border_decoration) | 61 if (!box_decoration_data.has_border_decoration) |
| 64 return; | 62 return; |
| 65 | 63 |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 paint_rect.Expand(-x_off, LayoutUnit()); | 124 paint_rect.Expand(-x_off, LayoutUnit()); |
| 127 paint_rect.Move(x_off, LayoutUnit()); | 125 paint_rect.Move(x_off, LayoutUnit()); |
| 128 } | 126 } |
| 129 | 127 |
| 130 LayoutObjectDrawingRecorder recorder(paint_info.context, layout_fieldset_, | 128 LayoutObjectDrawingRecorder recorder(paint_info.context, layout_fieldset_, |
| 131 paint_info.phase, paint_rect); | 129 paint_info.phase, paint_rect); |
| 132 BoxPainter(layout_fieldset_).PaintMaskImages(paint_info, paint_rect); | 130 BoxPainter(layout_fieldset_).PaintMaskImages(paint_info, paint_rect); |
| 133 } | 131 } |
| 134 | 132 |
| 135 } // namespace blink | 133 } // namespace blink |
| OLD | NEW |