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

Side by Side Diff: third_party/WebKit/Source/core/paint/ObjectPainter.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/ObjectPainter.h" 5 #include "core/paint/ObjectPainter.h"
6 6
7 #include "core/layout/LayoutBlock.h" 7 #include "core/layout/LayoutBlock.h"
8 #include "core/layout/LayoutInline.h" 8 #include "core/layout/LayoutInline.h"
9 #include "core/layout/LayoutObject.h" 9 #include "core/layout/LayoutObject.h"
10 #include "core/layout/LayoutTheme.h" 10 #include "core/layout/LayoutTheme.h"
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 if (container) { 251 if (container) {
252 m_layoutObject.localToAncestorRects(outlineRects, container, -paintOffset, 252 m_layoutObject.localToAncestorRects(outlineRects, container, -paintOffset,
253 paintOffset); 253 paintOffset);
254 if (outlineRects.isEmpty()) 254 if (outlineRects.isEmpty())
255 return; 255 return;
256 } 256 }
257 } 257 }
258 258
259 Vector<IntRect> pixelSnappedOutlineRects; 259 Vector<IntRect> pixelSnappedOutlineRects;
260 for (auto& r : outlineRects) 260 for (auto& r : outlineRects)
261 pixelSnappedOutlineRects.append(pixelSnappedIntRect(r)); 261 pixelSnappedOutlineRects.push_back(pixelSnappedIntRect(r));
262 262
263 IntRect unitedOutlineRect = unionRectEvenIfEmpty(pixelSnappedOutlineRects); 263 IntRect unitedOutlineRect = unionRectEvenIfEmpty(pixelSnappedOutlineRects);
264 IntRect bounds = unitedOutlineRect; 264 IntRect bounds = unitedOutlineRect;
265 bounds.inflate(m_layoutObject.styleRef().outlineOutsetExtent()); 265 bounds.inflate(m_layoutObject.styleRef().outlineOutsetExtent());
266 LayoutObjectDrawingRecorder recorder(paintInfo.context, m_layoutObject, 266 LayoutObjectDrawingRecorder recorder(paintInfo.context, m_layoutObject,
267 paintInfo.phase, bounds); 267 paintInfo.phase, bounds);
268 268
269 Color color = 269 Color color =
270 m_layoutObject.resolveColor(styleToUse, CSSPropertyOutlineColor); 270 m_layoutObject.resolveColor(styleToUse, CSSPropertyOutlineColor);
271 if (styleToUse.outlineStyleIsAuto()) { 271 if (styleToUse.outlineStyleIsAuto()) {
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
709 adjustedPaintOffset += toLayoutBox(m_layoutObject).location(); 709 adjustedPaintOffset += toLayoutBox(m_layoutObject).location();
710 DCHECK(m_layoutObject.paintOffset() == adjustedPaintOffset) 710 DCHECK(m_layoutObject.paintOffset() == adjustedPaintOffset)
711 << " Paint offset mismatch: " << m_layoutObject.debugName() 711 << " Paint offset mismatch: " << m_layoutObject.debugName()
712 << " from PaintPropertyTreeBuilder: " 712 << " from PaintPropertyTreeBuilder: "
713 << m_layoutObject.paintOffset().toString() 713 << m_layoutObject.paintOffset().toString()
714 << " from painter: " << adjustedPaintOffset.toString(); 714 << " from painter: " << adjustedPaintOffset.toString();
715 } 715 }
716 #endif 716 #endif
717 717
718 } // namespace blink 718 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/LayerClipRecorder.cpp ('k') | third_party/WebKit/Source/core/paint/PaintInvalidator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698