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

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

Issue 2617783002: Migrate WTF::Vector::append() to ::push_back() [part 12 of N] (Closed)
Patch Set: rebase Created 3 years, 11 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 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 m_layoutBox.style()->backgroundLayers(), paintRect, 264 m_layoutBox.style()->backgroundLayers(), paintRect,
265 bleedAvoidance); 265 bleedAvoidance);
266 } 266 }
267 267
268 bool BoxPainter::calculateFillLayerOcclusionCulling( 268 bool BoxPainter::calculateFillLayerOcclusionCulling(
269 FillLayerOcclusionOutputList& reversedPaintList, 269 FillLayerOcclusionOutputList& reversedPaintList,
270 const FillLayer& fillLayer) { 270 const FillLayer& fillLayer) {
271 bool isNonAssociative = false; 271 bool isNonAssociative = false;
272 for (auto currentLayer = &fillLayer; currentLayer; 272 for (auto currentLayer = &fillLayer; currentLayer;
273 currentLayer = currentLayer->next()) { 273 currentLayer = currentLayer->next()) {
274 reversedPaintList.append(currentLayer); 274 reversedPaintList.push_back(currentLayer);
275 // Stop traversal when an opaque layer is encountered. 275 // Stop traversal when an opaque layer is encountered.
276 // FIXME : It would be possible for the following occlusion culling test to 276 // FIXME : It would be possible for the following occlusion culling test to
277 // be more aggressive on layers with no repeat by testing whether the image 277 // be more aggressive on layers with no repeat by testing whether the image
278 // covers the layout rect. Testing that here would imply duplicating a lot 278 // covers the layout rect. Testing that here would imply duplicating a lot
279 // of calculations that are currently done in 279 // of calculations that are currently done in
280 // LayoutBoxModelObject::paintFillLayer. A more efficient solution might be 280 // LayoutBoxModelObject::paintFillLayer. A more efficient solution might be
281 // to move the layer recursion into paintFillLayer, or to compute the layer 281 // to move the layer recursion into paintFillLayer, or to compute the layer
282 // geometry here and pass it down. 282 // geometry here and pass it down.
283 283
284 // TODO(trchen): Need to check compositing mode as well. 284 // TODO(trchen): Need to check compositing mode as well.
(...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after
1083 bool BoxPainter::shouldForceWhiteBackgroundForPrintEconomy( 1083 bool BoxPainter::shouldForceWhiteBackgroundForPrintEconomy(
1084 const ComputedStyle& style, 1084 const ComputedStyle& style,
1085 const Document& document) { 1085 const Document& document) {
1086 return document.printing() && 1086 return document.printing() &&
1087 style.printColorAdjust() == EPrintColorAdjust::kEconomy && 1087 style.printColorAdjust() == EPrintColorAdjust::kEconomy &&
1088 (!document.settings() || 1088 (!document.settings() ||
1089 !document.settings()->getShouldPrintBackgrounds()); 1089 !document.settings()->getShouldPrintBackgrounds());
1090 } 1090 }
1091 1091
1092 } // namespace blink 1092 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/BoxClipper.cpp ('k') | third_party/WebKit/Source/core/paint/FilterEffectBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698