| 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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 , m_readyStateMaximum(HAVE_NOTHING) | 268 , m_readyStateMaximum(HAVE_NOTHING) |
| 269 , m_volume(1.0f) | 269 , m_volume(1.0f) |
| 270 , m_lastSeekTime(0) | 270 , m_lastSeekTime(0) |
| 271 , m_previousProgressTime(numeric_limits<double>::max()) | 271 , m_previousProgressTime(numeric_limits<double>::max()) |
| 272 , m_duration(numeric_limits<double>::quiet_NaN()) | 272 , m_duration(numeric_limits<double>::quiet_NaN()) |
| 273 , m_lastTimeUpdateEventWallTime(0) | 273 , m_lastTimeUpdateEventWallTime(0) |
| 274 , m_lastTimeUpdateEventMovieTime(numeric_limits<double>::max()) | 274 , m_lastTimeUpdateEventMovieTime(numeric_limits<double>::max()) |
| 275 , m_loadState(WaitingForSource) | 275 , m_loadState(WaitingForSource) |
| 276 , m_webLayer(0) | 276 , m_webLayer(0) |
| 277 , m_opaque(false) | 277 , m_opaque(false) |
| 278 , m_restrictions(RequirePageConsentToLoadMediaRestriction) | 278 , m_restrictions(NoRestrictions) |
| 279 , m_preload(MediaPlayer::Auto) | 279 , m_preload(MediaPlayer::Auto) |
| 280 , m_displayMode(Unknown) | 280 , m_displayMode(Unknown) |
| 281 , m_cachedTime(MediaPlayer::invalidTime()) | 281 , m_cachedTime(MediaPlayer::invalidTime()) |
| 282 , m_cachedTimeWallClockUpdateTime(0) | 282 , m_cachedTimeWallClockUpdateTime(0) |
| 283 , m_minimumWallClockTimeToCacheMediaTime(0) | 283 , m_minimumWallClockTimeToCacheMediaTime(0) |
| 284 , m_fragmentStartTime(MediaPlayer::invalidTime()) | 284 , m_fragmentStartTime(MediaPlayer::invalidTime()) |
| 285 , m_fragmentEndTime(MediaPlayer::invalidTime()) | 285 , m_fragmentEndTime(MediaPlayer::invalidTime()) |
| 286 , m_pendingActionFlags(0) | 286 , m_pendingActionFlags(0) |
| 287 , m_playing(false) | 287 , m_playing(false) |
| 288 , m_shouldDelayLoadEvent(false) | 288 , m_shouldDelayLoadEvent(false) |
| (...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 705 configureMediaControls(); | 705 configureMediaControls(); |
| 706 } | 706 } |
| 707 | 707 |
| 708 void HTMLMediaElement::loadInternal() | 708 void HTMLMediaElement::loadInternal() |
| 709 { | 709 { |
| 710 // Some of the code paths below this function dispatch the BeforeLoad event.
This ASSERT helps | 710 // Some of the code paths below this function dispatch the BeforeLoad event.
This ASSERT helps |
| 711 // us catch those bugs more quickly without needing all the branches to alig
n to actually | 711 // us catch those bugs more quickly without needing all the branches to alig
n to actually |
| 712 // trigger the event. | 712 // trigger the event. |
| 713 ASSERT(!NoEventDispatchAssertion::isEventDispatchForbidden()); | 713 ASSERT(!NoEventDispatchAssertion::isEventDispatchForbidden()); |
| 714 | 714 |
| 715 // Once the page has allowed an element to load media, it is free to load at
will. This allows a | |
| 716 // playlist that starts in a foreground tab to continue automatically if the
tab is subsequently | |
| 717 // put in the the background. | |
| 718 removeBehaviorRestriction(RequirePageConsentToLoadMediaRestriction); | |
| 719 | |
| 720 // HTMLMediaElement::textTracksAreReady will need "... the text tracks whose
mode was not in the | 715 // HTMLMediaElement::textTracksAreReady will need "... the text tracks whose
mode was not in the |
| 721 // disabled state when the element's resource selection algorithm last start
ed". | 716 // disabled state when the element's resource selection algorithm last start
ed". |
| 722 if (RuntimeEnabledFeatures::videoTrackEnabled()) { | 717 if (RuntimeEnabledFeatures::videoTrackEnabled()) { |
| 723 m_textTracksWhenResourceSelectionBegan.clear(); | 718 m_textTracksWhenResourceSelectionBegan.clear(); |
| 724 if (m_textTracks) { | 719 if (m_textTracks) { |
| 725 for (unsigned i = 0; i < m_textTracks->length(); ++i) { | 720 for (unsigned i = 0; i < m_textTracks->length(); ++i) { |
| 726 TextTrack* track = m_textTracks->item(i); | 721 TextTrack* track = m_textTracks->item(i); |
| 727 if (track->mode() != TextTrack::disabledKeyword()) | 722 if (track->mode() != TextTrack::disabledKeyword()) |
| 728 m_textTracksWhenResourceSelectionBegan.append(track); | 723 m_textTracksWhenResourceSelectionBegan.append(track); |
| 729 } | 724 } |
| (...skipping 3197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3927 { | 3922 { |
| 3928 m_mediaSource->setWebMediaSourceAndOpen(adoptPtr(webMediaSource)); | 3923 m_mediaSource->setWebMediaSourceAndOpen(adoptPtr(webMediaSource)); |
| 3929 } | 3924 } |
| 3930 | 3925 |
| 3931 bool HTMLMediaElement::isInteractiveContent() const | 3926 bool HTMLMediaElement::isInteractiveContent() const |
| 3932 { | 3927 { |
| 3933 return fastHasAttribute(controlsAttr); | 3928 return fastHasAttribute(controlsAttr); |
| 3934 } | 3929 } |
| 3935 | 3930 |
| 3936 } | 3931 } |
| OLD | NEW |