| 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/BoxPainter.h" | 5 #include "core/paint/BoxPainter.h" |
| 6 | 6 |
| 7 #include "core/HTMLNames.h" | 7 #include "core/HTMLNames.h" |
| 8 #include "core/frame/Settings.h" | 8 #include "core/frame/Settings.h" |
| 9 #include "core/html/HTMLFrameOwnerElement.h" | 9 #include "core/html/HTMLFrameOwnerElement.h" |
| 10 #include "core/layout/ImageQualityController.h" | 10 #include "core/layout/ImageQualityController.h" |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 // For the case where we are painting the background into the scrolling | 70 // For the case where we are painting the background into the scrolling |
| 71 // contents layer of a composited scroller we need to include the entire | 71 // contents layer of a composited scroller we need to include the entire |
| 72 // overflow rect. | 72 // overflow rect. |
| 73 paint_rect = layout_box_.LayoutOverflowRect(); | 73 paint_rect = layout_box_.LayoutOverflowRect(); |
| 74 scroll_recorder.emplace(paint_info.context, layout_box_, paint_info.phase, | 74 scroll_recorder.emplace(paint_info.context, layout_box_, paint_info.phase, |
| 75 layout_box_.ScrolledContentOffset()); | 75 layout_box_.ScrolledContentOffset()); |
| 76 | 76 |
| 77 // The background painting code assumes that the borders are part of the | 77 // The background painting code assumes that the borders are part of the |
| 78 // paintRect so we expand the paintRect by the border size when painting the | 78 // paintRect so we expand the paintRect by the border size when painting the |
| 79 // background into the scrolling contents layer. | 79 // background into the scrolling contents layer. |
| 80 paint_rect.ExpandEdges(layout_box_.BorderTop(), layout_box_.BorderRight(), | 80 paint_rect.Expand(layout_box_.BorderBoxOutsets()); |
| 81 layout_box_.BorderBottom(), | |
| 82 layout_box_.BorderLeft()); | |
| 83 } else { | 81 } else { |
| 84 paint_rect = layout_box_.BorderBoxRect(); | 82 paint_rect = layout_box_.BorderBoxRect(); |
| 85 } | 83 } |
| 86 | 84 |
| 87 paint_rect.MoveBy(paint_offset); | 85 paint_rect.MoveBy(paint_offset); |
| 88 PaintBoxDecorationBackgroundWithRect(paint_info, paint_offset, paint_rect); | 86 PaintBoxDecorationBackgroundWithRect(paint_info, paint_offset, paint_rect); |
| 89 } | 87 } |
| 90 | 88 |
| 91 LayoutRect BoxPainter::BoundsForDrawingRecorder( | 89 LayoutRect BoxPainter::BoundsForDrawingRecorder( |
| 92 const PaintInfo& paint_info, | 90 const PaintInfo& paint_info, |
| (...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 869 if (PaintNinePieceImage(obj, info.context, rect, style, style.BorderImage())) | 867 if (PaintNinePieceImage(obj, info.context, rect, style, style.BorderImage())) |
| 870 return; | 868 return; |
| 871 | 869 |
| 872 const BoxBorderPainter border_painter(rect, style, bleed_avoidance, | 870 const BoxBorderPainter border_painter(rect, style, bleed_avoidance, |
| 873 include_logical_left_edge, | 871 include_logical_left_edge, |
| 874 include_logical_right_edge); | 872 include_logical_right_edge); |
| 875 border_painter.PaintBorder(info, rect); | 873 border_painter.PaintBorder(info, rect); |
| 876 } | 874 } |
| 877 | 875 |
| 878 } // namespace blink | 876 } // namespace blink |
| OLD | NEW |