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

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

Issue 19263002: Get rid of special casing for SVGNumber in the bindings generator (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix style issues Created 7 years, 5 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) 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 const SVGNumberList& toAtEndOfDurationNumberList = toAtEndOfDuration->number List(); 88 const SVGNumberList& toAtEndOfDurationNumberList = toAtEndOfDuration->number List();
89 SVGNumberList& animatedNumberList = animated->numberList(); 89 SVGNumberList& animatedNumberList = animated->numberList();
90 if (!m_animationElement->adjustFromToListValues<SVGNumberList>(fromNumberLis t, toNumberList, animatedNumberList, percentage)) 90 if (!m_animationElement->adjustFromToListValues<SVGNumberList>(fromNumberLis t, toNumberList, animatedNumberList, percentage))
91 return; 91 return;
92 92
93 unsigned fromNumberListSize = fromNumberList.size(); 93 unsigned fromNumberListSize = fromNumberList.size();
94 unsigned toNumberListSize = toNumberList.size(); 94 unsigned toNumberListSize = toNumberList.size();
95 unsigned toAtEndOfDurationSize = toAtEndOfDurationNumberList.size(); 95 unsigned toAtEndOfDurationSize = toAtEndOfDurationNumberList.size();
96 96
97 for (unsigned i = 0; i < toNumberListSize; ++i) { 97 for (unsigned i = 0; i < toNumberListSize; ++i) {
98 float effectiveFrom = fromNumberListSize ? fromNumberList[i] : 0; 98 float effectiveFrom = fromNumberListSize ? fromNumberList[i].value() : 0 ;
99 float effectiveToAtEnd = i < toAtEndOfDurationSize ? toAtEndOfDurationNu mberList[i] : 0; 99 float effectiveToAtEnd = i < toAtEndOfDurationSize ? toAtEndOfDurationNu mberList[i].value() : 0;
100 m_animationElement->animateAdditiveNumber(percentage, repeatCount, effec tiveFrom, toNumberList[i], effectiveToAtEnd, animatedNumberList[i]); 100 m_animationElement->animateAdditiveNumber(percentage, repeatCount, effec tiveFrom, toNumberList[i].value(), effectiveToAtEnd, animatedNumberList[i].value Ref());
101 } 101 }
102 } 102 }
103 103
104 float SVGAnimatedNumberListAnimator::calculateDistance(const String&, const Stri ng&) 104 float SVGAnimatedNumberListAnimator::calculateDistance(const String&, const Stri ng&)
105 { 105 {
106 // FIXME: Distance calculation is not possible for SVGNumberList right now. We need the distance for every single value. 106 // FIXME: Distance calculation is not possible for SVGNumberList right now. We need the distance for every single value.
107 return -1; 107 return -1;
108 } 108 }
109 109
110 } 110 }
OLDNEW
« no previous file with comments | « Source/core/rendering/svg/SVGTextLayoutAttributesBuilder.cpp ('k') | Source/core/svg/SVGComponentTransferFunctionElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698