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/svg/SVGPath.cpp

Issue 2738863002: Replace ASSERT with DCHECK in core/svg/ (Closed)
Patch Set: Split DCHECKS wherever possible 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, 2006, 2007, 2008 Nikolas Zimmermann 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann
3 * <zimmermann@kde.org> 3 * <zimmermann@kde.org>
4 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> 4 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org>
5 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> 5 * Copyright (C) 2007 Eric Seidel <eric@webkit.org>
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 if (fromStream->isEmpty() || byStream.isEmpty()) 70 if (fromStream->isEmpty() || byStream.isEmpty())
71 return fromStream; 71 return fromStream;
72 return addPathByteStreams(*fromStream, byStream, repeatCount); 72 return addPathByteStreams(*fromStream, byStream, repeatCount);
73 } 73 }
74 74
75 } // namespace 75 } // namespace
76 76
77 SVGPath::SVGPath() : m_pathValue(CSSPathValue::emptyPathValue()) {} 77 SVGPath::SVGPath() : m_pathValue(CSSPathValue::emptyPathValue()) {}
78 78
79 SVGPath::SVGPath(CSSPathValue* pathValue) : m_pathValue(pathValue) { 79 SVGPath::SVGPath(CSSPathValue* pathValue) : m_pathValue(pathValue) {
80 ASSERT(m_pathValue); 80 DCHECK(m_pathValue);
81 } 81 }
82 82
83 SVGPath::~SVGPath() {} 83 SVGPath::~SVGPath() {}
84 84
85 String SVGPath::valueAsString() const { 85 String SVGPath::valueAsString() const {
86 return buildStringFromByteStream(byteStream()); 86 return buildStringFromByteStream(byteStream());
87 } 87 }
88 88
89 SVGPath* SVGPath::clone() const { 89 SVGPath* SVGPath::clone() const {
90 return SVGPath::create(m_pathValue); 90 return SVGPath::create(m_pathValue);
(...skipping 22 matching lines...) Expand all
113 addPathByteStreams(byteStream(), otherPathByteStream)); 113 addPathByteStreams(byteStream(), otherPathByteStream));
114 } 114 }
115 115
116 void SVGPath::calculateAnimatedValue(SVGAnimationElement* animationElement, 116 void SVGPath::calculateAnimatedValue(SVGAnimationElement* animationElement,
117 float percentage, 117 float percentage,
118 unsigned repeatCount, 118 unsigned repeatCount,
119 SVGPropertyBase* fromValue, 119 SVGPropertyBase* fromValue,
120 SVGPropertyBase* toValue, 120 SVGPropertyBase* toValue,
121 SVGPropertyBase* toAtEndOfDurationValue, 121 SVGPropertyBase* toAtEndOfDurationValue,
122 SVGElement*) { 122 SVGElement*) {
123 ASSERT(animationElement); 123 DCHECK(animationElement);
124 bool isToAnimation = animationElement->getAnimationMode() == ToAnimation; 124 bool isToAnimation = animationElement->getAnimationMode() == ToAnimation;
125 125
126 const SVGPath& to = toSVGPath(*toValue); 126 const SVGPath& to = toSVGPath(*toValue);
127 const SVGPathByteStream& toStream = to.byteStream(); 127 const SVGPathByteStream& toStream = to.byteStream();
128 128
129 // If no 'to' value is given, nothing to animate. 129 // If no 'to' value is given, nothing to animate.
130 if (!toStream.size()) 130 if (!toStream.size())
131 return; 131 return;
132 132
133 const SVGPath& from = toSVGPath(*fromValue); 133 const SVGPath& from = toSVGPath(*fromValue);
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 // FIXME: Support paced animations. 174 // FIXME: Support paced animations.
175 return -1; 175 return -1;
176 } 176 }
177 177
178 DEFINE_TRACE(SVGPath) { 178 DEFINE_TRACE(SVGPath) {
179 visitor->trace(m_pathValue); 179 visitor->trace(m_pathValue);
180 SVGPropertyBase::trace(visitor); 180 SVGPropertyBase::trace(visitor);
181 } 181 }
182 182
183 } // namespace blink 183 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGParsingError.cpp ('k') | third_party/WebKit/Source/core/svg/SVGPathBlender.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698