| 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 683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 694 // yet another layer holding the text content. | 694 // yet another layer holding the text content. |
| 695 background_clip_state_saver.Save(); | 695 background_clip_state_saver.Save(); |
| 696 context.Clip(mask_rect); | 696 context.Clip(mask_rect); |
| 697 context.BeginLayer(); | 697 context.BeginLayer(); |
| 698 | 698 |
| 699 break; | 699 break; |
| 700 } | 700 } |
| 701 case kBorderFillBox: | 701 case kBorderFillBox: |
| 702 break; | 702 break; |
| 703 default: | 703 default: |
| 704 ASSERT_NOT_REACHED(); | 704 NOTREACHED(); |
| 705 break; | 705 break; |
| 706 } | 706 } |
| 707 | 707 |
| 708 // Paint the color first underneath all images, culled if background image | 708 // Paint the color first underneath all images, culled if background image |
| 709 // occludes it. | 709 // occludes it. |
| 710 // TODO(trchen): In the !bgLayer.hasRepeatXY() case, we could improve the | 710 // TODO(trchen): In the !bgLayer.hasRepeatXY() case, we could improve the |
| 711 // culling test by verifying whether the background image covers the entire | 711 // culling test by verifying whether the background image covers the entire |
| 712 // painting area. | 712 // painting area. |
| 713 if (info.is_bottom_layer && info.color.Alpha() && info.should_paint_color) { | 713 if (info.is_bottom_layer && info.color.Alpha() && info.should_paint_color) { |
| 714 IntRect background_rect(PixelSnappedIntRect(scrolled_paint_rect)); | 714 IntRect background_rect(PixelSnappedIntRect(scrolled_paint_rect)); |
| (...skipping 351 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 |