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

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGBoolean.cpp

Issue 2748223002: Replace ASSERT_NOT_REACHED with NOTREACHED in core/svg/ (Closed)
Patch Set: 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 return SVGParseStatus::NoError; 44 return SVGParseStatus::NoError;
45 } 45 }
46 if (value == "false") { 46 if (value == "false") {
47 m_value = false; 47 m_value = false;
48 return SVGParseStatus::NoError; 48 return SVGParseStatus::NoError;
49 } 49 }
50 return SVGParseStatus::ExpectedBoolean; 50 return SVGParseStatus::ExpectedBoolean;
51 } 51 }
52 52
53 void SVGBoolean::add(SVGPropertyBase*, SVGElement*) { 53 void SVGBoolean::add(SVGPropertyBase*, SVGElement*) {
54 ASSERT_NOT_REACHED(); 54 NOTREACHED();
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 ASSERT(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/SVGAnimatedColor.cpp ('k') | third_party/WebKit/Source/core/svg/SVGEnumeration.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698