| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights
reserved. | 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 3083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3094 stopPeriodicTimers(); | 3094 stopPeriodicTimers(); |
| 3095 m_loadTimer.stop(); | 3095 m_loadTimer.stop(); |
| 3096 | 3096 |
| 3097 m_pendingActionFlags &= ~flags; | 3097 m_pendingActionFlags &= ~flags; |
| 3098 m_loadState = WaitingForSource; | 3098 m_loadState = WaitingForSource; |
| 3099 | 3099 |
| 3100 // We can't cast if we don't have a media player. | 3100 // We can't cast if we don't have a media player. |
| 3101 m_remoteRoutesAvailable = false; | 3101 m_remoteRoutesAvailable = false; |
| 3102 m_playingRemotely = false; | 3102 m_playingRemotely = false; |
| 3103 if (mediaControls()) | 3103 if (mediaControls()) |
| 3104 mediaControls()->refreshCastButtonVisibility(); | 3104 mediaControls()->refreshCastButtonVisibilityWithoutUpdate(); |
| 3105 | 3105 |
| 3106 if (layoutObject()) | 3106 if (layoutObject()) |
| 3107 layoutObject()->setShouldDoFullPaintInvalidation(); | 3107 layoutObject()->setShouldDoFullPaintInvalidation(); |
| 3108 } | 3108 } |
| 3109 | 3109 |
| 3110 void HTMLMediaElement::stop() | 3110 void HTMLMediaElement::stop() |
| 3111 { | 3111 { |
| 3112 WTF_LOG(Media, "HTMLMediaElement::stop(%p)", this); | 3112 WTF_LOG(Media, "HTMLMediaElement::stop(%p)", this); |
| 3113 | 3113 |
| 3114 if (m_playing && m_initialPlayWithoutUserGestures) | 3114 if (m_playing && m_initialPlayWithoutUserGestures) |
| (...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3612 // or if its media controller position is either before the media resource's
earliest possible | 3612 // or if its media controller position is either before the media resource's
earliest possible |
| 3613 // position relative to the MediaController's timeline or after the end of t
he media resource | 3613 // position relative to the MediaController's timeline or after the end of t
he media resource |
| 3614 // relative to the MediaController's timeline. | 3614 // relative to the MediaController's timeline. |
| 3615 double mediaControllerPosition = m_mediaController->currentTime(); | 3615 double mediaControllerPosition = m_mediaController->currentTime(); |
| 3616 if (mediaControllerPosition < 0 || mediaControllerPosition > duration()) | 3616 if (mediaControllerPosition < 0 || mediaControllerPosition > duration()) |
| 3617 return true; | 3617 return true; |
| 3618 | 3618 |
| 3619 return false; | 3619 return false; |
| 3620 } | 3620 } |
| 3621 | 3621 |
| 3622 void HTMLMediaElement::setAllowHiddenVolumeControls(bool allow) |
| 3623 { |
| 3624 ensureMediaControls(); |
| 3625 mediaControls()->setAllowHiddenVolumeControls(allow); |
| 3626 } |
| 3627 |
| 3622 WebMediaPlayer::CORSMode HTMLMediaElement::corsMode() const | 3628 WebMediaPlayer::CORSMode HTMLMediaElement::corsMode() const |
| 3623 { | 3629 { |
| 3624 const AtomicString& crossOriginMode = fastGetAttribute(crossoriginAttr); | 3630 const AtomicString& crossOriginMode = fastGetAttribute(crossoriginAttr); |
| 3625 if (crossOriginMode.isNull()) | 3631 if (crossOriginMode.isNull()) |
| 3626 return WebMediaPlayer::CORSModeUnspecified; | 3632 return WebMediaPlayer::CORSModeUnspecified; |
| 3627 if (equalIgnoringCase(crossOriginMode, "use-credentials")) | 3633 if (equalIgnoringCase(crossOriginMode, "use-credentials")) |
| 3628 return WebMediaPlayer::CORSModeUseCredentials; | 3634 return WebMediaPlayer::CORSModeUseCredentials; |
| 3629 return WebMediaPlayer::CORSModeAnonymous; | 3635 return WebMediaPlayer::CORSModeAnonymous; |
| 3630 } | 3636 } |
| 3631 | 3637 |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3783 visitor->trace(m_client); | 3789 visitor->trace(m_client); |
| 3784 } | 3790 } |
| 3785 | 3791 |
| 3786 DEFINE_TRACE(HTMLMediaElement::AudioSourceProviderImpl) | 3792 DEFINE_TRACE(HTMLMediaElement::AudioSourceProviderImpl) |
| 3787 { | 3793 { |
| 3788 visitor->trace(m_client); | 3794 visitor->trace(m_client); |
| 3789 } | 3795 } |
| 3790 #endif | 3796 #endif |
| 3791 | 3797 |
| 3792 } | 3798 } |
| OLD | NEW |