| 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" |
| 11 #include "core/layout/LayoutBox.h" | 11 #include "core/layout/LayoutBox.h" |
| 12 #include "core/layout/LayoutBoxModelObject.h" | 12 #include "core/layout/LayoutBoxModelObject.h" |
| 13 #include "core/layout/LayoutObject.h" | 13 #include "core/layout/LayoutObject.h" |
| 14 #include "core/layout/LayoutTable.h" | 14 #include "core/layout/LayoutTable.h" |
| 15 #include "core/layout/LayoutTheme.h" | 15 #include "core/layout/LayoutTheme.h" |
| 16 #include "core/layout/compositing/CompositedLayerMapping.h" | 16 #include "core/layout/compositing/CompositedLayerMapping.h" |
| 17 #include "core/layout/line/RootInlineBox.h" | 17 #include "core/layout/line/RootInlineBox.h" |
| 18 #include "core/style/BorderEdge.h" | |
| 19 #include "core/style/ShadowList.h" | |
| 20 #include "core/paint/BackgroundImageGeometry.h" | 18 #include "core/paint/BackgroundImageGeometry.h" |
| 21 #include "core/paint/BoxBorderPainter.h" | 19 #include "core/paint/BoxBorderPainter.h" |
| 22 #include "core/paint/BoxDecorationData.h" | 20 #include "core/paint/BoxDecorationData.h" |
| 23 #include "core/paint/LayoutObjectDrawingRecorder.h" | 21 #include "core/paint/LayoutObjectDrawingRecorder.h" |
| 24 #include "core/paint/NinePieceImagePainter.h" | 22 #include "core/paint/NinePieceImagePainter.h" |
| 25 #include "core/paint/ObjectPainter.h" | 23 #include "core/paint/ObjectPainter.h" |
| 26 #include "core/paint/PaintInfo.h" | 24 #include "core/paint/PaintInfo.h" |
| 27 #include "core/paint/PaintLayer.h" | 25 #include "core/paint/PaintLayer.h" |
| 28 #include "core/paint/RoundedInnerRectClipper.h" | 26 #include "core/paint/RoundedInnerRectClipper.h" |
| 29 #include "core/paint/ScrollRecorder.h" | 27 #include "core/paint/ScrollRecorder.h" |
| 30 #include "core/paint/ThemePainter.h" | 28 #include "core/paint/ThemePainter.h" |
| 29 #include "core/style/BorderEdge.h" |
| 30 #include "core/style/ShadowList.h" |
| 31 #include "platform/LengthFunctions.h" | 31 #include "platform/LengthFunctions.h" |
| 32 #include "platform/geometry/LayoutPoint.h" | 32 #include "platform/geometry/LayoutPoint.h" |
| 33 #include "platform/geometry/LayoutRectOutsets.h" | 33 #include "platform/geometry/LayoutRectOutsets.h" |
| 34 #include "platform/graphics/GraphicsContextStateSaver.h" | 34 #include "platform/graphics/GraphicsContextStateSaver.h" |
| 35 #include "platform/graphics/paint/CompositingDisplayItem.h" | 35 #include "platform/graphics/paint/CompositingDisplayItem.h" |
| 36 #include "wtf/Optional.h" | 36 #include "platform/wtf/Optional.h" |
| 37 | 37 |
| 38 namespace blink { | 38 namespace blink { |
| 39 | 39 |
| 40 bool BoxPainter::IsPaintingBackgroundOfPaintContainerIntoScrollingContentsLayer( | 40 bool BoxPainter::IsPaintingBackgroundOfPaintContainerIntoScrollingContentsLayer( |
| 41 const LayoutBoxModelObject* obj, | 41 const LayoutBoxModelObject* obj, |
| 42 const PaintInfo& paint_info) { | 42 const PaintInfo& paint_info) { |
| 43 return paint_info.PaintFlags() & kPaintLayerPaintingOverflowContents && | 43 return paint_info.PaintFlags() & kPaintLayerPaintingOverflowContents && |
| 44 !(paint_info.PaintFlags() & | 44 !(paint_info.PaintFlags() & |
| 45 kPaintLayerPaintingCompositingBackgroundPhase) && | 45 kPaintLayerPaintingCompositingBackgroundPhase) && |
| 46 obj == paint_info.PaintContainer(); | 46 obj == paint_info.PaintContainer(); |
| (...skipping 1019 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 |