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

Side by Side Diff: third_party/WebKit/Source/core/css/CSSBasicShapeValues.h

Issue 2566403003: Migrate WTF::Vector::append() to ::push_back() [part 3 of N] (Closed)
Patch Set: Created 4 years 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 /* 1 /*
2 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. 2 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above 8 * 1. Redistributions of source code must retain the above
9 * copyright notice, this list of conditions and the following 9 * copyright notice, this list of conditions and the following
10 * disclaimer. 10 * disclaimer.
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 Member<CSSValue> m_radiusY; 99 Member<CSSValue> m_radiusY;
100 }; 100 };
101 101
102 class CSSBasicShapePolygonValue final : public CSSValue { 102 class CSSBasicShapePolygonValue final : public CSSValue {
103 public: 103 public:
104 static CSSBasicShapePolygonValue* create() { 104 static CSSBasicShapePolygonValue* create() {
105 return new CSSBasicShapePolygonValue; 105 return new CSSBasicShapePolygonValue;
106 } 106 }
107 107
108 void appendPoint(CSSPrimitiveValue* x, CSSPrimitiveValue* y) { 108 void appendPoint(CSSPrimitiveValue* x, CSSPrimitiveValue* y) {
109 m_values.append(x); 109 m_values.push_back(x);
110 m_values.append(y); 110 m_values.push_back(y);
111 } 111 }
112 112
113 CSSPrimitiveValue* getXAt(unsigned i) const { return m_values.at(i * 2); } 113 CSSPrimitiveValue* getXAt(unsigned i) const { return m_values.at(i * 2); }
114 CSSPrimitiveValue* getYAt(unsigned i) const { return m_values.at(i * 2 + 1); } 114 CSSPrimitiveValue* getYAt(unsigned i) const { return m_values.at(i * 2 + 1); }
115 const HeapVector<Member<CSSPrimitiveValue>>& values() const { 115 const HeapVector<Member<CSSPrimitiveValue>>& values() const {
116 return m_values; 116 return m_values;
117 } 117 }
118 118
119 // TODO(sashab): Remove this and pass it as an argument in the constructor. 119 // TODO(sashab): Remove this and pass it as an argument in the constructor.
120 void setWindRule(WindRule w) { m_windRule = w; } 120 void setWindRule(WindRule w) { m_windRule = w; }
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 isBasicShapeCircleValue()); 212 isBasicShapeCircleValue());
213 DEFINE_CSS_VALUE_TYPE_CASTS(CSSBasicShapeEllipseValue, 213 DEFINE_CSS_VALUE_TYPE_CASTS(CSSBasicShapeEllipseValue,
214 isBasicShapeEllipseValue()); 214 isBasicShapeEllipseValue());
215 DEFINE_CSS_VALUE_TYPE_CASTS(CSSBasicShapePolygonValue, 215 DEFINE_CSS_VALUE_TYPE_CASTS(CSSBasicShapePolygonValue,
216 isBasicShapePolygonValue()); 216 isBasicShapePolygonValue());
217 DEFINE_CSS_VALUE_TYPE_CASTS(CSSBasicShapeInsetValue, isBasicShapeInsetValue()); 217 DEFINE_CSS_VALUE_TYPE_CASTS(CSSBasicShapeInsetValue, isBasicShapeInsetValue());
218 218
219 } // namespace blink 219 } // namespace blink
220 220
221 #endif // CSSBasicShapeValues_h 221 #endif // CSSBasicShapeValues_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698