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

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGNumber.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) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 Google Inc. 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 setValue(m_value + toSVGNumber(other)->value()); 77 setValue(m_value + toSVGNumber(other)->value());
78 } 78 }
79 79
80 void SVGNumber::calculateAnimatedValue(SVGAnimationElement* animationElement, 80 void SVGNumber::calculateAnimatedValue(SVGAnimationElement* animationElement,
81 float percentage, 81 float percentage,
82 unsigned repeatCount, 82 unsigned repeatCount,
83 SVGPropertyBase* from, 83 SVGPropertyBase* from,
84 SVGPropertyBase* to, 84 SVGPropertyBase* to,
85 SVGPropertyBase* toAtEndOfDuration, 85 SVGPropertyBase* toAtEndOfDuration,
86 SVGElement*) { 86 SVGElement*) {
87 ASSERT(animationElement); 87 DCHECK(animationElement);
88 88
89 SVGNumber* fromNumber = toSVGNumber(from); 89 SVGNumber* fromNumber = toSVGNumber(from);
90 SVGNumber* toNumber = toSVGNumber(to); 90 SVGNumber* toNumber = toSVGNumber(to);
91 SVGNumber* toAtEndOfDurationNumber = toSVGNumber(toAtEndOfDuration); 91 SVGNumber* toAtEndOfDurationNumber = toSVGNumber(toAtEndOfDuration);
92 92
93 animationElement->animateAdditiveNumber( 93 animationElement->animateAdditiveNumber(
94 percentage, repeatCount, fromNumber->value(), toNumber->value(), 94 percentage, repeatCount, fromNumber->value(), toNumber->value(),
95 toAtEndOfDurationNumber->value(), m_value); 95 toAtEndOfDurationNumber->value(), m_value);
96 } 96 }
97 97
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 } 140 }
141 if (error == SVGParseStatus::NoError) 141 if (error == SVGParseStatus::NoError)
142 m_value = number; 142 m_value = number;
143 return error; 143 return error;
144 } 144 }
145 145
146 SVGNumberAcceptPercentage::SVGNumberAcceptPercentage(float value) 146 SVGNumberAcceptPercentage::SVGNumberAcceptPercentage(float value)
147 : SVGNumber(value) {} 147 : SVGNumber(value) {}
148 148
149 } // namespace blink 149 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698