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

Unified Diff: third_party/WebKit/Source/core/svg/SVGAnimationElement.cpp

Issue 2712343004: Tidy up instance time handling in SVGSMILElement (Closed)
Patch Set: Created 3 years, 10 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/SVGAnimationElement.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGAnimationElement.cpp b/third_party/WebKit/Source/core/svg/SVGAnimationElement.cpp
index a93258afa8a811d2cfe65c3f90397f1805a5575f..3f48d92b91eabd77418000f1bba3feb192ba7018 100644
--- a/third_party/WebKit/Source/core/svg/SVGAnimationElement.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGAnimationElement.cpp
@@ -253,24 +253,14 @@ float SVGAnimationElement::getSimpleDuration(
return clampTo<float>(duration.value());
}
-void SVGAnimationElement::beginElement() {
- beginElementAt(0);
-}
-
void SVGAnimationElement::beginElementAt(float offset) {
- ASSERT(std::isfinite(offset));
- SMILTime elapsed = this->elapsed();
- addBeginTime(elapsed, elapsed + offset, SMILTimeWithOrigin::ScriptOrigin);
-}
-
-void SVGAnimationElement::endElement() {
- endElementAt(0);
+ DCHECK(std::isfinite(offset));
+ addInstanceTime(Begin, elapsed() + offset, SMILTimeWithOrigin::ScriptOrigin);
}
void SVGAnimationElement::endElementAt(float offset) {
- ASSERT(std::isfinite(offset));
- SMILTime elapsed = this->elapsed();
- addEndTime(elapsed, elapsed + offset, SMILTimeWithOrigin::ScriptOrigin);
+ DCHECK(std::isfinite(offset));
+ addInstanceTime(End, elapsed() + offset, SMILTimeWithOrigin::ScriptOrigin);
}
void SVGAnimationElement::updateAnimationMode() {

Powered by Google App Engine
This is Rietveld 408576698