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

Side by Side Diff: third_party/WebKit/Source/core/paint/BoxClipper.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/BoxClipper.h" 5 #include "core/paint/BoxClipper.h"
6 6
7 #include "core/layout/LayoutBox.h" 7 #include "core/layout/LayoutBox.h"
8 #include "core/layout/svg/LayoutSVGRoot.h" 8 #include "core/layout/svg/LayoutSVGRoot.h"
9 #include "core/paint/ObjectPaintProperties.h" 9 #include "core/paint/ObjectPaintProperties.h"
10 #include "core/paint/PaintInfo.h" 10 #include "core/paint/PaintInfo.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 conservativeClipRect.move(m_box.scrolledContentOffset()); 82 conservativeClipRect.move(m_box.scrolledContentOffset());
83 if (conservativeClipRect.contains(contentsVisualOverflow)) 83 if (conservativeClipRect.contains(contentsVisualOverflow))
84 return; 84 return;
85 } 85 }
86 86
87 if (!m_paintInfo.context.getPaintController() 87 if (!m_paintInfo.context.getPaintController()
88 .displayItemConstructionIsDisabled()) { 88 .displayItemConstructionIsDisabled()) {
89 m_clipType = m_paintInfo.displayItemTypeForClipping(); 89 m_clipType = m_paintInfo.displayItemTypeForClipping();
90 Vector<FloatRoundedRect> roundedRects; 90 Vector<FloatRoundedRect> roundedRects;
91 if (hasBorderRadius) 91 if (hasBorderRadius)
92 roundedRects.append(clipRoundedRect); 92 roundedRects.push_back(clipRoundedRect);
93 m_paintInfo.context.getPaintController().createAndAppend<ClipDisplayItem>( 93 m_paintInfo.context.getPaintController().createAndAppend<ClipDisplayItem>(
94 m_box, m_clipType, pixelSnappedIntRect(clipRect), roundedRects); 94 m_box, m_clipType, pixelSnappedIntRect(clipRect), roundedRects);
95 } 95 }
96 } 96 }
97 97
98 BoxClipper::~BoxClipper() { 98 BoxClipper::~BoxClipper() {
99 if (m_clipType == DisplayItem::kUninitializedType) 99 if (m_clipType == DisplayItem::kUninitializedType)
100 return; 100 return;
101 101
102 DCHECK(boxNeedsClip(m_box)); 102 DCHECK(boxNeedsClip(m_box));
103 m_paintInfo.context.getPaintController().endItem<EndClipDisplayItem>( 103 m_paintInfo.context.getPaintController().endItem<EndClipDisplayItem>(
104 m_box, DisplayItem::clipTypeToEndClipType(m_clipType)); 104 m_box, DisplayItem::clipTypeToEndClipType(m_clipType));
105 } 105 }
106 106
107 } // namespace blink 107 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/BoxBorderPainter.cpp ('k') | third_party/WebKit/Source/core/paint/BoxPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698