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

Unified Diff: third_party/WebKit/Source/core/svg/SVGAnimatedColor.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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/svg/SVGAnimatedColor.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGAnimatedColor.cpp b/third_party/WebKit/Source/core/svg/SVGAnimatedColor.cpp
index 875f7bfe9d19fa936e855c85c27c186df2478091..d1bb2dc222abd07e2e6063ab1a1747013bfd9943 100644
--- a/third_party/WebKit/Source/core/svg/SVGAnimatedColor.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGAnimatedColor.cpp
@@ -46,14 +46,14 @@ SVGPropertyBase* SVGColorProperty::cloneForAnimation(const String&) const {
}
static inline Color fallbackColorForCurrentColor(SVGElement* targetElement) {
- ASSERT(targetElement);
+ DCHECK(targetElement);
if (LayoutObject* targetLayoutObject = targetElement->layoutObject())
return targetLayoutObject->resolveColor(CSSPropertyColor);
return Color::transparent;
}
void SVGColorProperty::add(SVGPropertyBase* other, SVGElement* contextElement) {
- ASSERT(contextElement);
+ DCHECK(contextElement);
Color fallbackColor = fallbackColorForCurrentColor(contextElement);
Color fromColor =
@@ -76,7 +76,7 @@ void SVGColorProperty::calculateAnimatedValue(
toSVGColorProperty(toAtEndOfDurationValue)->m_styleColor;
// Apply currentColor rules.
- ASSERT(contextElement);
+ DCHECK(contextElement);
Color fallbackColor = fallbackColorForCurrentColor(contextElement);
Color fromColor = fromStyleColor.resolve(fallbackColor);
Color toColor = toStyleColor.resolve(fallbackColor);
@@ -84,7 +84,7 @@ void SVGColorProperty::calculateAnimatedValue(
toAtEndOfDurationStyleColor.resolve(fallbackColor);
Color animatedColor = m_styleColor.resolve(fallbackColor);
- ASSERT(animationElement);
+ DCHECK(animationElement);
float animatedRed = animatedColor.red();
animationElement->animateAdditiveNumber(
percentage, repeatCount, fromColor.red(), toColor.red(),
@@ -112,7 +112,7 @@ void SVGColorProperty::calculateAnimatedValue(
float SVGColorProperty::calculateDistance(SVGPropertyBase* toValue,
SVGElement* contextElement) {
- ASSERT(contextElement);
+ DCHECK(contextElement);
Color fallbackColor = fallbackColorForCurrentColor(contextElement);
Color fromColor = m_styleColor.resolve(fallbackColor);

Powered by Google App Engine
This is Rietveld 408576698