| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights | 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights |
| 3 * reserved. | 3 * 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 1212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1223 return WebMediaPlayer::LoadTypeURL; | 1223 return WebMediaPlayer::LoadTypeURL; |
| 1224 } | 1224 } |
| 1225 | 1225 |
| 1226 bool HTMLMediaElement::textTracksAreReady() const { | 1226 bool HTMLMediaElement::textTracksAreReady() const { |
| 1227 // 4.8.10.12.1 Text track model | 1227 // 4.8.10.12.1 Text track model |
| 1228 // ... | 1228 // ... |
| 1229 // The text tracks of a media element are ready if all the text tracks whose | 1229 // The text tracks of a media element are ready if all the text tracks whose |
| 1230 // mode was not in the disabled state when the element's resource selection | 1230 // mode was not in the disabled state when the element's resource selection |
| 1231 // algorithm last started now have a text track readiness state of loaded or | 1231 // algorithm last started now have a text track readiness state of loaded or |
| 1232 // failed to load. | 1232 // failed to load. |
| 1233 for (unsigned i = 0; i < m_textTracksWhenResourceSelectionBegan.size(); ++i) { | 1233 for (const auto& textTrack : m_textTracksWhenResourceSelectionBegan) { |
| 1234 if (m_textTracksWhenResourceSelectionBegan[i]->getReadinessState() == | 1234 if (textTrack->getReadinessState() == TextTrack::Loading || |
| 1235 TextTrack::Loading || | 1235 textTrack->getReadinessState() == TextTrack::NotLoaded) |
| 1236 m_textTracksWhenResourceSelectionBegan[i]->getReadinessState() == | |
| 1237 TextTrack::NotLoaded) | |
| 1238 return false; | 1236 return false; |
| 1239 } | 1237 } |
| 1240 | 1238 |
| 1241 return true; | 1239 return true; |
| 1242 } | 1240 } |
| 1243 | 1241 |
| 1244 void HTMLMediaElement::textTrackReadyStateChanged(TextTrack* track) { | 1242 void HTMLMediaElement::textTrackReadyStateChanged(TextTrack* track) { |
| 1245 if (webMediaPlayer() && | 1243 if (webMediaPlayer() && |
| 1246 m_textTracksWhenResourceSelectionBegan.contains(track)) { | 1244 m_textTracksWhenResourceSelectionBegan.contains(track)) { |
| 1247 if (track->getReadinessState() != TextTrack::Loading) | 1245 if (track->getReadinessState() != TextTrack::Loading) |
| (...skipping 2807 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4055 kMostlyFillViewportBecomeStableSeconds, BLINK_FROM_HERE); | 4053 kMostlyFillViewportBecomeStableSeconds, BLINK_FROM_HERE); |
| 4056 } | 4054 } |
| 4057 | 4055 |
| 4058 void HTMLMediaElement::viewportFillDebouncerTimerFired(TimerBase*) { | 4056 void HTMLMediaElement::viewportFillDebouncerTimerFired(TimerBase*) { |
| 4059 m_mostlyFillingViewport = true; | 4057 m_mostlyFillingViewport = true; |
| 4060 if (m_webMediaPlayer) | 4058 if (m_webMediaPlayer) |
| 4061 m_webMediaPlayer->becameDominantVisibleContent(m_mostlyFillingViewport); | 4059 m_webMediaPlayer->becameDominantVisibleContent(m_mostlyFillingViewport); |
| 4062 } | 4060 } |
| 4063 | 4061 |
| 4064 } // namespace blink | 4062 } // namespace blink |
| OLD | NEW |