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

Side by Side Diff: Source/WebCore/svg/SVGAnimatedNumberList.cpp

Issue 10445006: Merge 116458 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1132/
Patch Set: Created 8 years, 7 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) Research In Motion Limited 2011. All rights reserved. 2 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 86
87 const SVGNumberList& fromNumberList = m_animationElement->animationMode() == ToAnimation ? animated->numberList() : from->numberList(); 87 const SVGNumberList& fromNumberList = m_animationElement->animationMode() == ToAnimation ? animated->numberList() : from->numberList();
88 const SVGNumberList& toNumberList = to->numberList(); 88 const SVGNumberList& toNumberList = to->numberList();
89 const SVGNumberList& toAtEndOfDurationNumberList = toAtEndOfDuration->number List(); 89 const SVGNumberList& toAtEndOfDurationNumberList = toAtEndOfDuration->number List();
90 SVGNumberList& animatedNumberList = animated->numberList(); 90 SVGNumberList& animatedNumberList = animated->numberList();
91 if (!m_animationElement->adjustFromToListValues<SVGNumberList>(fromNumberLis t, toNumberList, animatedNumberList, percentage)) 91 if (!m_animationElement->adjustFromToListValues<SVGNumberList>(fromNumberLis t, toNumberList, animatedNumberList, percentage))
92 return; 92 return;
93 93
94 unsigned fromNumberListSize = fromNumberList.size(); 94 unsigned fromNumberListSize = fromNumberList.size();
95 unsigned toNumberListSize = toNumberList.size(); 95 unsigned toNumberListSize = toNumberList.size();
96 unsigned toAtEndOfDurationSize = toAtEndOfDurationNumberList.size();
96 97
97 for (unsigned i = 0; i < toNumberListSize; ++i) { 98 for (unsigned i = 0; i < toNumberListSize; ++i) {
98 float effectiveFrom = fromNumberListSize ? fromNumberList[i] : 0; 99 float effectiveFrom = fromNumberListSize ? fromNumberList[i] : 0;
99 m_animationElement->animateAdditiveNumber(percentage, repeatCount, effec tiveFrom, toNumberList[i], toAtEndOfDurationNumberList[i], animatedNumberList[i] ); 100 float effectiveToAtEnd = i < toAtEndOfDurationSize ? toAtEndOfDurationNu mberList[i] : 0;
101 m_animationElement->animateAdditiveNumber(percentage, repeatCount, effec tiveFrom, toNumberList[i], effectiveToAtEnd, animatedNumberList[i]);
100 } 102 }
101 } 103 }
102 104
103 float SVGAnimatedNumberListAnimator::calculateDistance(const String&, const Stri ng&) 105 float SVGAnimatedNumberListAnimator::calculateDistance(const String&, const Stri ng&)
104 { 106 {
105 // FIXME: Distance calculation is not possible for SVGNumberList right now. We need the distance for every single value. 107 // FIXME: Distance calculation is not possible for SVGNumberList right now. We need the distance for every single value.
106 return -1; 108 return -1;
107 } 109 }
108 110
109 } 111 }
110 112
111 #endif // ENABLE(SVG) 113 #endif // ENABLE(SVG)
OLDNEW
« no previous file with comments | « Source/WebCore/svg/SVGAnimatedLengthList.cpp ('k') | Source/WebCore/svg/SVGAnimatedPointList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698