OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 ASSERT(iterationDuration > 0); | 183 ASSERT(iterationDuration > 0); |
184 ASSERT(isNull(iterationTime) || (iterationTime >= 0 && iterationTime <= iter
ationDuration)); | 184 ASSERT(isNull(iterationTime) || (iterationTime >= 0 && iterationTime <= iter
ationDuration)); |
185 | 185 |
186 double directedTime = calculateDirectedTime(currentIteration, iterationDurat
ion, iterationTime, specified); | 186 double directedTime = calculateDirectedTime(currentIteration, iterationDurat
ion, iterationTime, specified); |
187 if (isNull(directedTime)) | 187 if (isNull(directedTime)) |
188 return nullValue(); | 188 return nullValue(); |
189 if (!std::isfinite(iterationDuration)) | 189 if (!std::isfinite(iterationDuration)) |
190 return directedTime; | 190 return directedTime; |
191 double timeFraction = directedTime / iterationDuration; | 191 double timeFraction = directedTime / iterationDuration; |
192 ASSERT(timeFraction >= 0 && timeFraction <= 1); | 192 ASSERT(timeFraction >= 0 && timeFraction <= 1); |
193 return specified.timingFunction | 193 return multiplyZeroAlwaysGivesZero(iterationDuration, specified.timingFuncti
on->evaluate(timeFraction, accuracyForDuration(iterationDuration))); |
194 ? multiplyZeroAlwaysGivesZero(iterationDuration, specified.timingFunctio
n->evaluate(timeFraction, accuracyForDuration(iterationDuration))) | |
195 : directedTime; | |
196 } | 194 } |
197 | 195 |
198 } // namespace WebCore | 196 } // namespace WebCore |
199 | 197 |
200 #endif | 198 #endif |
OLD | NEW |