Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(101)

Side by Side Diff: third_party/WebKit/Source/core/paint/BoxPainter.cpp

Issue 1732563007: [NOT FOR COMMIT] Pass defaultObjectSize to get image size (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/page/DragController.cpp ('k') | third_party/WebKit/Source/core/paint/SVGImagePainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698