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

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGTransform.cpp

Issue 2748223002: Replace ASSERT_NOT_REACHED with NOTREACHED in core/svg/ (Closed)
Patch Set: Created 3 years, 9 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 /* 1 /*
2 * Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org>
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 m_matrix(matrix) {} 49 m_matrix(matrix) {}
50 50
51 SVGTransform::~SVGTransform() {} 51 SVGTransform::~SVGTransform() {}
52 52
53 SVGTransform* SVGTransform::clone() const { 53 SVGTransform* SVGTransform::clone() const {
54 return new SVGTransform(m_transformType, m_angle, m_center, m_matrix); 54 return new SVGTransform(m_transformType, m_angle, m_center, m_matrix);
55 } 55 }
56 56
57 SVGPropertyBase* SVGTransform::cloneForAnimation(const String&) const { 57 SVGPropertyBase* SVGTransform::cloneForAnimation(const String&) const {
58 // SVGTransform is never animated. 58 // SVGTransform is never animated.
59 ASSERT_NOT_REACHED(); 59 NOTREACHED();
60 return nullptr; 60 return nullptr;
61 } 61 }
62 62
63 void SVGTransform::setMatrix(const AffineTransform& matrix) { 63 void SVGTransform::setMatrix(const AffineTransform& matrix) {
64 onMatrixChange(); 64 onMatrixChange();
65 m_matrix = matrix; 65 m_matrix = matrix;
66 } 66 }
67 67
68 void SVGTransform::onMatrixChange() { 68 void SVGTransform::onMatrixChange() {
69 m_transformType = kSvgTransformMatrix; 69 m_transformType = kSvgTransformMatrix;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 return "translate("; 135 return "translate(";
136 case kSvgTransformScale: 136 case kSvgTransformScale:
137 return "scale("; 137 return "scale(";
138 case kSvgTransformRotate: 138 case kSvgTransformRotate:
139 return "rotate("; 139 return "rotate(";
140 case kSvgTransformSkewx: 140 case kSvgTransformSkewx:
141 return "skewX("; 141 return "skewX(";
142 case kSvgTransformSkewy: 142 case kSvgTransformSkewy:
143 return "skewY("; 143 return "skewY(";
144 } 144 }
145 ASSERT_NOT_REACHED(); 145 NOTREACHED();
146 return ""; 146 return "";
147 } 147 }
148 148
149 } // namespace 149 } // namespace
150 150
151 String SVGTransform::valueAsString() const { 151 String SVGTransform::valueAsString() const {
152 double arguments[6]; 152 double arguments[6];
153 size_t argumentCount = 0; 153 size_t argumentCount = 0;
154 switch (m_transformType) { 154 switch (m_transformType) {
155 case kSvgTransformUnknown: 155 case kSvgTransformUnknown:
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 if (i) 210 if (i)
211 builder.append(' '); 211 builder.append(' ');
212 builder.appendNumber(arguments[i]); 212 builder.appendNumber(arguments[i]);
213 } 213 }
214 builder.append(')'); 214 builder.append(')');
215 return builder.toString(); 215 return builder.toString();
216 } 216 }
217 217
218 void SVGTransform::add(SVGPropertyBase*, SVGElement*) { 218 void SVGTransform::add(SVGPropertyBase*, SVGElement*) {
219 // SVGTransform is not animated by itself. 219 // SVGTransform is not animated by itself.
220 ASSERT_NOT_REACHED(); 220 NOTREACHED();
221 } 221 }
222 222
223 void SVGTransform::calculateAnimatedValue(SVGAnimationElement*, 223 void SVGTransform::calculateAnimatedValue(SVGAnimationElement*,
224 float, 224 float,
225 unsigned, 225 unsigned,
226 SVGPropertyBase*, 226 SVGPropertyBase*,
227 SVGPropertyBase*, 227 SVGPropertyBase*,
228 SVGPropertyBase*, 228 SVGPropertyBase*,
229 SVGElement*) { 229 SVGElement*) {
230 // SVGTransform is not animated by itself. 230 // SVGTransform is not animated by itself.
231 ASSERT_NOT_REACHED(); 231 NOTREACHED();
232 } 232 }
233 233
234 float SVGTransform::calculateDistance(SVGPropertyBase*, SVGElement*) { 234 float SVGTransform::calculateDistance(SVGPropertyBase*, SVGElement*) {
235 // SVGTransform is not animated by itself. 235 // SVGTransform is not animated by itself.
236 ASSERT_NOT_REACHED(); 236 NOTREACHED();
237 237
238 return -1; 238 return -1;
239 } 239 }
240 240
241 } // namespace blink 241 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGStringList.cpp ('k') | third_party/WebKit/Source/core/svg/SVGTransformDistance.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698