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

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGBoolean.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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 ASSERT_NOT_REACHED(); 54 ASSERT_NOT_REACHED();
55 } 55 }
56 56
57 void SVGBoolean::calculateAnimatedValue(SVGAnimationElement* animationElement, 57 void SVGBoolean::calculateAnimatedValue(SVGAnimationElement* animationElement,
58 float percentage, 58 float percentage,
59 unsigned repeatCount, 59 unsigned repeatCount,
60 SVGPropertyBase* from, 60 SVGPropertyBase* from,
61 SVGPropertyBase* to, 61 SVGPropertyBase* to,
62 SVGPropertyBase*, 62 SVGPropertyBase*,
63 SVGElement*) { 63 SVGElement*) {
64 ASSERT(animationElement); 64 DCHECK(animationElement);
65 bool fromBoolean = animationElement->getAnimationMode() == ToAnimation 65 bool fromBoolean = animationElement->getAnimationMode() == ToAnimation
66 ? m_value 66 ? m_value
67 : toSVGBoolean(from)->value(); 67 : toSVGBoolean(from)->value();
68 bool toBoolean = toSVGBoolean(to)->value(); 68 bool toBoolean = toSVGBoolean(to)->value();
69 69
70 animationElement->animateDiscreteType<bool>(percentage, fromBoolean, 70 animationElement->animateDiscreteType<bool>(percentage, fromBoolean,
71 toBoolean, m_value); 71 toBoolean, m_value);
72 } 72 }
73 73
74 float SVGBoolean::calculateDistance(SVGPropertyBase*, SVGElement*) { 74 float SVGBoolean::calculateDistance(SVGPropertyBase*, SVGElement*) {
75 // No paced animations for boolean. 75 // No paced animations for boolean.
76 return -1; 76 return -1;
77 } 77 }
78 78
79 } // namespace blink 79 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGAnimationElement.cpp ('k') | third_party/WebKit/Source/core/svg/SVGCircleElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698