| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 475 float min = minValue(); | 475 float min = minValue(); |
| 476 float max = maxValue(); | 476 float max = maxValue(); |
| 477 | 477 |
| 478 // First, find any non-finite value in the curve and throw an exception if | 478 // First, find any non-finite value in the curve and throw an exception if |
| 479 // there are any. | 479 // there are any. |
| 480 for (unsigned k = 0; k < curve->length(); ++k) { | 480 for (unsigned k = 0; k < curve->length(); ++k) { |
| 481 float value = curveData[k]; | 481 float value = curveData[k]; |
| 482 | 482 |
| 483 if (!std::isfinite(value)) { | 483 if (!std::isfinite(value)) { |
| 484 exceptionState.throwDOMException( | 484 exceptionState.throwDOMException( |
| 485 V8TypeError, "The provided float value for the curve at element " + | 485 V8TypeError, |
| 486 String::number(k) + " is non-finite: " + | 486 "The provided float value for the curve at element " + |
| 487 String::number(value)); | 487 String::number(k) + " is non-finite: " + String::number(value)); |
| 488 return nullptr; | 488 return nullptr; |
| 489 } | 489 } |
| 490 } | 490 } |
| 491 | 491 |
| 492 // Second, find the first value in the curve (if any) that is outside the | 492 // Second, find the first value in the curve (if any) that is outside the |
| 493 // nominal range. It's probably not necessary to produce a warning on every | 493 // nominal range. It's probably not necessary to produce a warning on every |
| 494 // value outside the nominal range. | 494 // value outside the nominal range. |
| 495 for (unsigned k = 0; k < curve->length(); ++k) { | 495 for (unsigned k = 0; k < curve->length(); ++k) { |
| 496 float value = curveData[k]; | 496 float value = curveData[k]; |
| 497 | 497 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 517 return this; | 517 return this; |
| 518 } | 518 } |
| 519 | 519 |
| 520 AudioParam* AudioParam::cancelAndHoldAtTime(double startTime, | 520 AudioParam* AudioParam::cancelAndHoldAtTime(double startTime, |
| 521 ExceptionState& exceptionState) { | 521 ExceptionState& exceptionState) { |
| 522 handler().timeline().cancelAndHoldAtTime(startTime, exceptionState); | 522 handler().timeline().cancelAndHoldAtTime(startTime, exceptionState); |
| 523 return this; | 523 return this; |
| 524 } | 524 } |
| 525 | 525 |
| 526 } // namespace blink | 526 } // namespace blink |
| OLD | NEW |