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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 PaintInsetBoxShadow(paint_info, paint_rect, style); | 192 PaintInsetBoxShadow(paint_info, paint_rect, style); |
193 | 193 |
194 // The theme will tell us whether or not we should also paint the CSS | 194 // The theme will tell us whether or not we should also paint the CSS |
195 // border. | 195 // border. |
196 if (box_decoration_data.has_border_decoration && | 196 if (box_decoration_data.has_border_decoration && |
197 (!box_decoration_data.has_appearance || | 197 (!box_decoration_data.has_appearance || |
198 (!theme_painted && | 198 (!theme_painted && |
199 LayoutTheme::GetTheme().Painter().PaintBorderOnly( | 199 LayoutTheme::GetTheme().Painter().PaintBorderOnly( |
200 layout_box_, paint_info, snapped_paint_rect))) && | 200 layout_box_, paint_info, snapped_paint_rect))) && |
201 !(layout_box_.IsTable() && | 201 !(layout_box_.IsTable() && |
202 ToLayoutTable(&layout_box_)->CollapseBorders())) { | 202 ToLayoutTable(&layout_box_)->ShouldCollapseBorders())) { |
203 PaintBorder(layout_box_, paint_info, paint_rect, style, | 203 PaintBorder(layout_box_, paint_info, paint_rect, style, |
204 box_decoration_data.bleed_avoidance); | 204 box_decoration_data.bleed_avoidance); |
205 } | 205 } |
206 } | 206 } |
207 | 207 |
208 if (box_decoration_data.bleed_avoidance == kBackgroundBleedClipLayer) | 208 if (box_decoration_data.bleed_avoidance == kBackgroundBleedClipLayer) |
209 paint_info.context.EndLayer(); | 209 paint_info.context.EndLayer(); |
210 } | 210 } |
211 | 211 |
212 void BoxPainter::PaintBackground(const PaintInfo& paint_info, | 212 void BoxPainter::PaintBackground(const PaintInfo& paint_info, |
(...skipping 853 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1066 bool BoxPainter::ShouldForceWhiteBackgroundForPrintEconomy( | 1066 bool BoxPainter::ShouldForceWhiteBackgroundForPrintEconomy( |
1067 const ComputedStyle& style, | 1067 const ComputedStyle& style, |
1068 const Document& document) { | 1068 const Document& document) { |
1069 return document.Printing() && | 1069 return document.Printing() && |
1070 style.PrintColorAdjust() == EPrintColorAdjust::kEconomy && | 1070 style.PrintColorAdjust() == EPrintColorAdjust::kEconomy && |
1071 (!document.GetSettings() || | 1071 (!document.GetSettings() || |
1072 !document.GetSettings()->GetShouldPrintBackgrounds()); | 1072 !document.GetSettings()->GetShouldPrintBackgrounds()); |
1073 } | 1073 } |
1074 | 1074 |
1075 } // namespace blink | 1075 } // namespace blink |
OLD | NEW |