| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2011 Apple 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 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 } | 253 } |
| 254 | 254 |
| 255 void MediaController::setVolume(double level, ExceptionState& es) | 255 void MediaController::setVolume(double level, ExceptionState& es) |
| 256 { | 256 { |
| 257 if (m_volume == level) | 257 if (m_volume == level) |
| 258 return; | 258 return; |
| 259 | 259 |
| 260 // If the new value is outside the range 0.0 to 1.0 inclusive, then, on sett
ing, an | 260 // If the new value is outside the range 0.0 to 1.0 inclusive, then, on sett
ing, an |
| 261 // IndexSizeError exception must be raised instead. | 261 // IndexSizeError exception must be raised instead. |
| 262 if (level < 0 || level > 1) { | 262 if (level < 0 || level > 1) { |
| 263 es.throwDOMException(IndexSizeError); | 263 es.throwUninformativeAndGenericDOMException(IndexSizeError); |
| 264 return; | 264 return; |
| 265 } | 265 } |
| 266 | 266 |
| 267 // The volume attribute, on setting, if the new value is in the range 0.0 to
1.0 inclusive, | 267 // The volume attribute, on setting, if the new value is in the range 0.0 to
1.0 inclusive, |
| 268 // must set the MediaController's media controller volume multiplier to the
new value | 268 // must set the MediaController's media controller volume multiplier to the
new value |
| 269 m_volume = level; | 269 m_volume = level; |
| 270 | 270 |
| 271 // and queue a task to fire a simple event named volumechange at the MediaCo
ntroller. | 271 // and queue a task to fire a simple event named volumechange at the MediaCo
ntroller. |
| 272 scheduleEvent(eventNames().volumechangeEvent); | 272 scheduleEvent(eventNames().volumechangeEvent); |
| 273 | 273 |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 653 { | 653 { |
| 654 double now = WTF::currentTime(); | 654 double now = WTF::currentTime(); |
| 655 double timedelta = now - m_previousTimeupdateTime; | 655 double timedelta = now - m_previousTimeupdateTime; |
| 656 | 656 |
| 657 if (timedelta < maxTimeupdateEventFrequency) | 657 if (timedelta < maxTimeupdateEventFrequency) |
| 658 return; | 658 return; |
| 659 | 659 |
| 660 scheduleEvent(eventNames().timeupdateEvent); | 660 scheduleEvent(eventNames().timeupdateEvent); |
| 661 m_previousTimeupdateTime = now; | 661 m_previousTimeupdateTime = now; |
| 662 } | 662 } |
| OLD | NEW |