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/SVGRect.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 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org>
4 * Copyright (C) 2007 Apple Inc. All rights reserved. 4 * Copyright (C) 2007 Apple Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 m_value += toSVGRect(other)->value(); 93 m_value += toSVGRect(other)->value();
94 } 94 }
95 95
96 void SVGRect::calculateAnimatedValue(SVGAnimationElement* animationElement, 96 void SVGRect::calculateAnimatedValue(SVGAnimationElement* animationElement,
97 float percentage, 97 float percentage,
98 unsigned repeatCount, 98 unsigned repeatCount,
99 SVGPropertyBase* fromValue, 99 SVGPropertyBase* fromValue,
100 SVGPropertyBase* toValue, 100 SVGPropertyBase* toValue,
101 SVGPropertyBase* toAtEndOfDurationValue, 101 SVGPropertyBase* toAtEndOfDurationValue,
102 SVGElement*) { 102 SVGElement*) {
103 ASSERT(animationElement); 103 DCHECK(animationElement);
104 SVGRect* fromRect = animationElement->getAnimationMode() == ToAnimation 104 SVGRect* fromRect = animationElement->getAnimationMode() == ToAnimation
105 ? this 105 ? this
106 : toSVGRect(fromValue); 106 : toSVGRect(fromValue);
107 SVGRect* toRect = toSVGRect(toValue); 107 SVGRect* toRect = toSVGRect(toValue);
108 SVGRect* toAtEndOfDurationRect = toSVGRect(toAtEndOfDurationValue); 108 SVGRect* toAtEndOfDurationRect = toSVGRect(toAtEndOfDurationValue);
109 109
110 float animatedX = x(); 110 float animatedX = x();
111 float animatedY = y(); 111 float animatedY = y();
112 float animatedWidth = width(); 112 float animatedWidth = width();
113 float animatedHeight = height(); 113 float animatedHeight = height();
(...skipping 19 matching lines...) Expand all
133 // the distance for every single value. 133 // the distance for every single value.
134 return -1; 134 return -1;
135 } 135 }
136 136
137 void SVGRect::setInvalid() { 137 void SVGRect::setInvalid() {
138 m_value = FloatRect(0.0f, 0.0f, 0.0f, 0.0f); 138 m_value = FloatRect(0.0f, 0.0f, 0.0f, 0.0f);
139 m_isValid = false; 139 m_isValid = false;
140 } 140 }
141 141
142 } // namespace blink 142 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGPreserveAspectRatio.cpp ('k') | third_party/WebKit/Source/core/svg/SVGRectElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698