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

Side by Side Diff: third_party/WebKit/Source/core/paint/LayerClipRecorder.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/LayerClipRecorder.h" 5 #include "core/paint/LayerClipRecorder.h"
6 6
7 #include "core/layout/ClipRect.h" 7 #include "core/layout/ClipRect.h"
8 #include "core/layout/LayoutView.h" 8 #include "core/layout/LayoutView.h"
9 #include "core/paint/PaintLayer.h" 9 #include "core/paint/PaintLayer.h"
10 #include "platform/geometry/IntRect.h" 10 #include "platform/geometry/IntRect.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 inContainingBlockChain(&paintLayer, layer)) { 86 inContainingBlockChain(&paintLayer, layer)) {
87 LayoutPoint delta(fragmentOffset); 87 LayoutPoint delta(fragmentOffset);
88 layer->convertToLayerCoords(clipRoot, delta); 88 layer->convertToLayerCoords(clipRoot, delta);
89 89
90 // The PaintLayer's size is pixel-snapped if it is a LayoutBox. We can't 90 // The PaintLayer's size is pixel-snapped if it is a LayoutBox. We can't
91 // use a pre-snapped border rect for clipping, since 91 // use a pre-snapped border rect for clipping, since
92 // getRoundedInnerBorderFor assumes it has not been snapped yet. 92 // getRoundedInnerBorderFor assumes it has not been snapped yet.
93 LayoutSize size(layer->layoutBox() 93 LayoutSize size(layer->layoutBox()
94 ? toLayoutBox(layer->layoutObject())->size() 94 ? toLayoutBox(layer->layoutObject())->size()
95 : LayoutSize(layer->size())); 95 : LayoutSize(layer->size()));
96 roundedRectClips.append( 96 roundedRectClips.push_back(
97 layer->layoutObject()->style()->getRoundedInnerBorderFor( 97 layer->layoutObject()->style()->getRoundedInnerBorderFor(
98 LayoutRect(delta, size))); 98 LayoutRect(delta, size)));
99 } 99 }
100 100
101 if (layer == clipRoot) 101 if (layer == clipRoot)
102 break; 102 break;
103 } 103 }
104 } 104 }
105 105
106 LayerClipRecorder::~LayerClipRecorder() { 106 LayerClipRecorder::~LayerClipRecorder() {
107 m_graphicsContext.getPaintController().endItem<EndClipDisplayItem>( 107 m_graphicsContext.getPaintController().endItem<EndClipDisplayItem>(
108 m_layoutObject, DisplayItem::clipTypeToEndClipType(m_clipType)); 108 m_layoutObject, DisplayItem::clipTypeToEndClipType(m_clipType));
109 } 109 }
110 110
111 } // namespace blink 111 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/GridPainter.cpp ('k') | third_party/WebKit/Source/core/paint/ObjectPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698