| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 3 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 void MediaControls::reset() | 85 void MediaControls::reset() |
| 86 { | 86 { |
| 87 Page* page = document()->page(); | 87 Page* page = document()->page(); |
| 88 if (!page) | 88 if (!page) |
| 89 return; | 89 return; |
| 90 | 90 |
| 91 m_playButton->updateDisplayType(); | 91 m_playButton->updateDisplayType(); |
| 92 | 92 |
| 93 updateCurrentTimeDisplay(); | 93 updateCurrentTimeDisplay(); |
| 94 | 94 |
| 95 float duration = m_mediaController->duration(); | 95 double duration = m_mediaController->duration(); |
| 96 if (std::isfinite(duration) || page->theme()->hasOwnDisabledStateHandlingFor
(MediaSliderPart)) { | 96 if (std::isfinite(duration) || page->theme()->hasOwnDisabledStateHandlingFor
(MediaSliderPart)) { |
| 97 m_timeline->setDuration(duration); | 97 m_timeline->setDuration(duration); |
| 98 m_timeline->setPosition(m_mediaController->currentTime()); | 98 m_timeline->setPosition(m_mediaController->currentTime()); |
| 99 } | 99 } |
| 100 | 100 |
| 101 if (m_mediaController->hasAudio() || page->theme()->hasOwnDisabledStateHandl
ingFor(MediaMuteButtonPart)) | 101 if (m_mediaController->hasAudio() || page->theme()->hasOwnDisabledStateHandl
ingFor(MediaMuteButtonPart)) |
| 102 m_panelMuteButton->show(); | 102 m_panelMuteButton->show(); |
| 103 else | 103 else |
| 104 m_panelMuteButton->hide(); | 104 m_panelMuteButton->hide(); |
| 105 | 105 |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 m_playButton->updateDisplayType(); | 207 m_playButton->updateDisplayType(); |
| 208 m_timeline->setPosition(m_mediaController->currentTime()); | 208 m_timeline->setPosition(m_mediaController->currentTime()); |
| 209 updateCurrentTimeDisplay(); | 209 updateCurrentTimeDisplay(); |
| 210 makeOpaque(); | 210 makeOpaque(); |
| 211 | 211 |
| 212 stopHideFullscreenControlsTimer(); | 212 stopHideFullscreenControlsTimer(); |
| 213 } | 213 } |
| 214 | 214 |
| 215 void MediaControls::updateCurrentTimeDisplay() | 215 void MediaControls::updateCurrentTimeDisplay() |
| 216 { | 216 { |
| 217 float now = m_mediaController->currentTime(); | 217 double now = m_mediaController->currentTime(); |
| 218 | 218 |
| 219 Page* page = document()->page(); | 219 Page* page = document()->page(); |
| 220 if (!page) | 220 if (!page) |
| 221 return; | 221 return; |
| 222 | 222 |
| 223 m_currentTimeDisplay->setInnerText(page->theme()->formatMediaControlsTime(no
w), IGNORE_EXCEPTION); | 223 m_currentTimeDisplay->setInnerText(page->theme()->formatMediaControlsTime(no
w), IGNORE_EXCEPTION); |
| 224 m_currentTimeDisplay->setCurrentValue(now); | 224 m_currentTimeDisplay->setCurrentValue(now); |
| 225 } | 225 } |
| 226 | 226 |
| 227 void MediaControls::showVolumeSlider() | 227 void MediaControls::showVolumeSlider() |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 { | 411 { |
| 412 if (m_textDisplayContainer) | 412 if (m_textDisplayContainer) |
| 413 m_textDisplayContainer->updateSizes(true); | 413 m_textDisplayContainer->updateSizes(true); |
| 414 closedCaptionTracksChanged(); | 414 closedCaptionTracksChanged(); |
| 415 } | 415 } |
| 416 #endif | 416 #endif |
| 417 | 417 |
| 418 } | 418 } |
| 419 | 419 |
| 420 #endif | 420 #endif |
| OLD | NEW |