| 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 return; | 131 return; |
| 132 if (m_layoutBox.boxDecorationBackgroundIsKnownToBeObscured()) | 132 if (m_layoutBox.boxDecorationBackgroundIsKnownToBeObscured()) |
| 133 return; | 133 return; |
| 134 paintFillLayers(paintInfo, backgroundColor, m_layoutBox.style()->backgroundL
ayers(), paintRect, bleedAvoidance); | 134 paintFillLayers(paintInfo, backgroundColor, m_layoutBox.style()->backgroundL
ayers(), paintRect, bleedAvoidance); |
| 135 } | 135 } |
| 136 | 136 |
| 137 bool BoxPainter::isFillLayerOpaque(const FillLayer& layer, const LayoutObject& i
mageClient) | 137 bool BoxPainter::isFillLayerOpaque(const FillLayer& layer, const LayoutObject& i
mageClient) |
| 138 { | 138 { |
| 139 return layer.hasOpaqueImage(&imageClient) | 139 return layer.hasOpaqueImage(&imageClient) |
| 140 && layer.image()->canRender() | 140 && layer.image()->canRender() |
| 141 && !layer.image()->imageSize(&imageClient, imageClient.style()->effectiv
eZoom()).isEmpty() | 141 && !layer.image()->defaultConcreteObjectSize(&imageClient, imageClient.s
tyle()->effectiveZoom()).isEmpty() |
| 142 && layer.hasRepeatXY(); | 142 && layer.hasRepeatXY(); |
| 143 } | 143 } |
| 144 | 144 |
| 145 bool BoxPainter::calculateFillLayerOcclusionCulling(FillLayerOcclusionOutputList
&reversedPaintList, const FillLayer& fillLayer) | 145 bool BoxPainter::calculateFillLayerOcclusionCulling(FillLayerOcclusionOutputList
&reversedPaintList, const FillLayer& fillLayer) |
| 146 { | 146 { |
| 147 bool isNonAssociative = false; | 147 bool isNonAssociative = false; |
| 148 for (auto currentLayer = &fillLayer; currentLayer; currentLayer = currentLay
er->next()) { | 148 for (auto currentLayer = &fillLayer; currentLayer; currentLayer = currentLay
er->next()) { |
| 149 reversedPaintList.append(currentLayer); | 149 reversedPaintList.append(currentLayer); |
| 150 // Stop traversal when an opaque layer is encountered. | 150 // Stop traversal when an opaque layer is encountered. |
| 151 // FIXME : It would be possible for the following occlusion culling test
to be more aggressive | 151 // FIXME : It would be possible for the following occlusion culling test
to be more aggressive |
| (...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 690 } | 690 } |
| 691 } | 691 } |
| 692 | 692 |
| 693 bool BoxPainter::shouldForceWhiteBackgroundForPrintEconomy(const ComputedStyle&
style, const Document& document) | 693 bool BoxPainter::shouldForceWhiteBackgroundForPrintEconomy(const ComputedStyle&
style, const Document& document) |
| 694 { | 694 { |
| 695 return document.printing() && style.printColorAdjust() == PrintColorAdjustEc
onomy | 695 return document.printing() && style.printColorAdjust() == PrintColorAdjustEc
onomy |
| 696 && (!document.settings() || !document.settings()->shouldPrintBackgrounds
()); | 696 && (!document.settings() || !document.settings()->shouldPrintBackgrounds
()); |
| 697 } | 697 } |
| 698 | 698 |
| 699 } // namespace blink | 699 } // namespace blink |
| OLD | NEW |