| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 | 46 |
| 47 void BoxPainter::paintBoxDecorationBackground(const PaintInfo& paintInfo, const
LayoutPoint& paintOffset) | 47 void BoxPainter::paintBoxDecorationBackground(const PaintInfo& paintInfo, const
LayoutPoint& paintOffset) |
| 48 { | 48 { |
| 49 LayoutRect paintRect = m_layoutBox.borderBoxRect(); | 49 LayoutRect paintRect = m_layoutBox.borderBoxRect(); |
| 50 paintRect.moveBy(paintOffset); | 50 paintRect.moveBy(paintOffset); |
| 51 paintBoxDecorationBackgroundWithRect(paintInfo, paintOffset, paintRect); | 51 paintBoxDecorationBackgroundWithRect(paintInfo, paintOffset, paintRect); |
| 52 } | 52 } |
| 53 | 53 |
| 54 LayoutRect BoxPainter::boundsForDrawingRecorder(const LayoutPoint& adjustedPaint
Offset) | 54 LayoutRect BoxPainter::boundsForDrawingRecorder(const LayoutPoint& adjustedPaint
Offset) |
| 55 { | 55 { |
| 56 LayoutRect bounds = m_layoutBox.visualOverflowRect(); | 56 LayoutRect bounds = m_layoutBox.selfVisualOverflowRect(); |
| 57 bounds.moveBy(adjustedPaintOffset); | 57 bounds.moveBy(adjustedPaintOffset); |
| 58 return bounds; | 58 return bounds; |
| 59 } | 59 } |
| 60 | 60 |
| 61 namespace { | 61 namespace { |
| 62 | 62 |
| 63 bool bleedAvoidanceIsClipping(BackgroundBleedAvoidance bleedAvoidance) | 63 bool bleedAvoidanceIsClipping(BackgroundBleedAvoidance bleedAvoidance) |
| 64 { | 64 { |
| 65 return bleedAvoidance == BackgroundBleedClipOnly || bleedAvoidance == Backgr
oundBleedClipLayer; | 65 return bleedAvoidance == BackgroundBleedClipOnly || bleedAvoidance == Backgr
oundBleedClipLayer; |
| 66 } | 66 } |
| (...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 815 } | 815 } |
| 816 } | 816 } |
| 817 | 817 |
| 818 bool BoxPainter::shouldForceWhiteBackgroundForPrintEconomy(const ComputedStyle&
style, const Document& document) | 818 bool BoxPainter::shouldForceWhiteBackgroundForPrintEconomy(const ComputedStyle&
style, const Document& document) |
| 819 { | 819 { |
| 820 return document.printing() && style.getPrintColorAdjust() == PrintColorAdjus
tEconomy | 820 return document.printing() && style.getPrintColorAdjust() == PrintColorAdjus
tEconomy |
| 821 && (!document.settings() || !document.settings()->shouldPrintBackgrounds
()); | 821 && (!document.settings() || !document.settings()->shouldPrintBackgrounds
()); |
| 822 } | 822 } |
| 823 | 823 |
| 824 } // namespace blink | 824 } // namespace blink |
| OLD | NEW |