Index: third_party/WebKit/Source/core/html/HTMLMediaElement.cpp |
diff --git a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp |
index a3a195c2fcc3b2a7ca372c8415f8bea99985f949..ee9fcef69378dead67b65cea6c7dc6d80c76c054 100644 |
--- a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp |
+++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp |
@@ -262,7 +262,7 @@ bool canLoadURL(const KURL& url, const ContentType& contentType) { |
if (contentMIMEType.isEmpty()) |
return true; |
- // 4.8.10.3 MIME types - In the absence of a specification to the contrary, |
+ // 4.8.12.3 MIME types - In the absence of a specification to the contrary, |
// the MIME type "application/octet-stream" when used with parameters, e.g. |
// "application/octet-stream;codecs=theora", is a type that the user agent |
// knows it cannot render. |
@@ -337,7 +337,7 @@ MIMETypeRegistry::SupportsType HTMLMediaElement::supportsType( |
if (type.isEmpty()) |
return MIMETypeRegistry::IsNotSupported; |
- // 4.8.10.3 MIME types - The canPlayType(type) method must return the empty |
+ // 4.8.12.3 MIME types - The canPlayType(type) method must return the empty |
// string if type is a type that the user agent knows it cannot render or is |
// the type "application/octet-stream" |
if (type == "application/octet-stream") |
@@ -739,7 +739,7 @@ String HTMLMediaElement::canPlayType(const String& mimeType) const { |
MIMETypeRegistry::SupportsType support = supportsType(ContentType(mimeType)); |
String canPlay; |
- // 4.8.10.3 |
+ // 4.8.12.3 |
switch (support) { |
case MIMETypeRegistry::IsNotSupported: |
canPlay = emptyString; |
@@ -1227,7 +1227,8 @@ bool HTMLMediaElement::loadIsDeferred() const { |
} |
void HTMLMediaElement::deferLoad() { |
- // This implements the "optional" step 3 from the resource fetch algorithm. |
+ // This implements the "optional" step 4 from the resource fetch algorithm |
+ // "If mode is remote". |
DCHECK(!m_deferredLoadTimer.isActive()); |
DCHECK_EQ(m_deferredLoadState, NotDeferred); |
// 1. Set the networkState to NETWORK_IDLE. |
@@ -1249,7 +1250,7 @@ void HTMLMediaElement::cancelDeferredLoad() { |
void HTMLMediaElement::executeDeferredLoad() { |
DCHECK_GE(m_deferredLoadState, WaitingForTrigger); |
- // resource fetch algorithm step 3 - continued from deferLoad(). |
+ // resource fetch algorithm step 4 - continued from deferLoad(). |
// 5. Wait for an implementation-defined event (e.g. the user requesting that |
// the media element begin playback). This is assumed to be whatever 'event' |
@@ -1300,7 +1301,7 @@ WebMediaPlayer::LoadType HTMLMediaElement::loadType() const { |
} |
bool HTMLMediaElement::textTracksAreReady() const { |
- // 4.8.10.12.1 Text track model |
+ // 4.8.12.11.1 Text track model |
// ... |
// The text tracks of a media element are ready if all the text tracks whose |
// mode was not in the disabled state when the element's resource selection |
@@ -1434,7 +1435,7 @@ void HTMLMediaElement::noneSupported() { |
m_loadState = WaitingForSource; |
m_currentSourceNode = nullptr; |
- // 4.8.13.5 |
+ // 4.8.12.5 |
// The dedicated media source failure steps are the following steps: |
// 1 - Set the error attribute to a new MediaError object whose code attribute |
@@ -1651,14 +1652,14 @@ void HTMLMediaElement::setReadyState(ReadyState state) { |
return; |
if (m_seeking) { |
- // 4.8.10.9, step 9 note: If the media element was potentially playing |
+ // 4.8.12.9, step 9 note: If the media element was potentially playing |
// immediately before it started seeking, but seeking caused its readyState |
// attribute to change to a value lower than kHaveFutureData, then a waiting |
// will be fired at the element. |
if (wasPotentiallyPlaying && m_readyState < kHaveFutureData) |
scheduleEvent(EventTypeNames::waiting); |
- // 4.8.10.9 steps 12-14 |
+ // 4.8.12.9 steps 12-14 |
if (m_readyState >= kHaveCurrentData) |
finishSeek(); |
} else { |
@@ -1670,7 +1671,7 @@ void HTMLMediaElement::setReadyState(ReadyState state) { |
// media time at the moment we ran out of data to play. |
setOfficialPlaybackPosition(currentPlaybackPosition()); |
- // 4.8.10.8 |
+ // 4.8.12.8 |
scheduleTimeupdateEvent(false); |
scheduleEvent(EventTypeNames::waiting); |
} |
@@ -2113,7 +2114,7 @@ void HTMLMediaElement::updatePlaybackRate() { |
} |
bool HTMLMediaElement::ended() const { |
- // 4.8.10.8 Playing the media resource |
+ // 4.8.12.8 Playing the media resource |
// The ended attribute must return true if the media element has ended |
// playback and the direction of playback is forwards, and false otherwise. |
return endedPlayback() && getDirectionOfPlayback() == Forward; |
@@ -2295,7 +2296,7 @@ void HTMLMediaElement::playInternal() { |
webMediaPlayer()->setBufferingStrategy( |
WebMediaPlayer::BufferingStrategy::Normal); |
- // 4.8.10.9. Playing the media resource |
+ // 4.8.12.8. Playing the media resource |
if (m_networkState == kNetworkEmpty) |
invokeResourceSelectionAlgorithm(); |
@@ -2681,7 +2682,7 @@ void HTMLMediaElement::removeVideoTrack(WebMediaPlayer::TrackId trackId) { |
} |
void HTMLMediaElement::addTextTrack(WebInbandTextTrack* webTrack) { |
- // 4.8.10.12.2 Sourcing in-band text tracks |
+ // 4.8.12.11.2 Sourcing in-band text tracks |
// 1. Associate the relevant data with a new text track and its corresponding |
// new TextTrack object. |
InbandTextTrack* textTrack = InbandTextTrack::create(webTrack); |
@@ -2792,7 +2793,7 @@ TextTrackList* HTMLMediaElement::textTracks() { |
} |
void HTMLMediaElement::didAddTrackElement(HTMLTrackElement* trackElement) { |
- // 4.8.10.12.3 Sourcing out-of-band text tracks |
+ // 4.8.12.11.3 Sourcing out-of-band text tracks |
// When a track element's parent element changes and the new parent is a media |
// element, then the user agent must add the track element's corresponding |
// text track to the media element's list of text tracks ... [continues in |
@@ -2823,7 +2824,7 @@ void HTMLMediaElement::didRemoveTrackElement(HTMLTrackElement* trackElement) { |
if (!m_textTracks) |
return; |
- // 4.8.10.12.3 Sourcing out-of-band text tracks |
+ // 4.8.12.11.3 Sourcing out-of-band text tracks |
// When a track element's parent element changes and the old parent was a |
// media element, then the user agent must remove the track element's |
// corresponding text track from the media element's list of text tracks. |
@@ -3060,7 +3061,7 @@ void HTMLMediaElement::timeChanged() { |
cueTimeline().updateActiveCues(currentTime()); |
- // 4.8.10.9 steps 12-14. Needed if no ReadyState change is associated with the |
+ // 4.8.12.9 steps 12-14. Needed if no ReadyState change is associated with the |
// seek. |
if (m_seeking && m_readyState >= kHaveCurrentData && |
!webMediaPlayer()->seeking()) |
@@ -3311,7 +3312,7 @@ bool HTMLMediaElement::endedPlayback(LoopCondition loopCondition) const { |
if (std::isnan(dur)) |
return false; |
- // 4.8.10.8 Playing the media resource |
+ // 4.8.12.8 Playing the media resource |
// A media element is said to have ended playback when the element's |
// readyState attribute is HAVE_METADATA or greater, |