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

Side by Side Diff: Source/core/svg/SVGAnimateElement.cpp

Issue 133893005: [SVG] Handle non-SVGAnimateElement results in calculateAnimatedValue() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Patch for landing. Created 6 years, 11 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org>
4 * Copyright (C) 2008 Apple Inc. All rights reserved. 4 * Copyright (C) 2008 Apple Inc. All rights reserved.
5 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 5 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 } else if (propertyTypes.size() == 2) 92 } else if (propertyTypes.size() == 2)
93 ASSERT(propertyTypes[0] == propertyTypes[1]); 93 ASSERT(propertyTypes[0] == propertyTypes[1]);
94 94
95 return type; 95 return type;
96 } 96 }
97 97
98 void SVGAnimateElement::calculateAnimatedValue(float percentage, unsigned repeat Count, SVGSMILElement* resultElement) 98 void SVGAnimateElement::calculateAnimatedValue(float percentage, unsigned repeat Count, SVGSMILElement* resultElement)
99 { 99 {
100 ASSERT(resultElement); 100 ASSERT(resultElement);
101 SVGElement* targetElement = this->targetElement(); 101 SVGElement* targetElement = this->targetElement();
102 if (!targetElement) 102 if (!targetElement || !isSVGAnimateElement(*resultElement))
103 return; 103 return;
104 104
105 ASSERT(m_animatedPropertyType == determineAnimatedPropertyType(targetElement )); 105 ASSERT(m_animatedPropertyType == determineAnimatedPropertyType(targetElement ));
106 106
107 ASSERT(percentage >= 0 && percentage <= 1); 107 ASSERT(percentage >= 0 && percentage <= 1);
108 ASSERT(m_animatedPropertyType != AnimatedTransformList || hasTagName(SVGName s::animateTransformTag)); 108 ASSERT(m_animatedPropertyType != AnimatedTransformList || hasTagName(SVGName s::animateTransformTag));
109 ASSERT(m_animatedPropertyType != AnimatedUnknown); 109 ASSERT(m_animatedPropertyType != AnimatedUnknown);
110 ASSERT(m_animator); 110 ASSERT(m_animator);
111 ASSERT(m_animator->type() == m_animatedPropertyType); 111 ASSERT(m_animator->type() == m_animatedPropertyType);
112 ASSERT(m_fromType); 112 ASSERT(m_fromType);
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 433
434 SVGAnimatedTypeAnimator* SVGAnimateElement::ensureAnimator() 434 SVGAnimatedTypeAnimator* SVGAnimateElement::ensureAnimator()
435 { 435 {
436 if (!m_animator) 436 if (!m_animator)
437 m_animator = SVGAnimatorFactory::create(this, targetElement(), m_animate dPropertyType); 437 m_animator = SVGAnimatorFactory::create(this, targetElement(), m_animate dPropertyType);
438 ASSERT(m_animatedPropertyType == m_animator->type()); 438 ASSERT(m_animatedPropertyType == m_animator->type());
439 return m_animator.get(); 439 return m_animator.get();
440 } 440 }
441 441
442 } 442 }
OLDNEW
« no previous file with comments | « LayoutTests/svg/custom/animate-motion-crash-expected.txt ('k') | Source/core/svg/animation/SMILTimeContainer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698