| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/html/track/CueTimeline.h" | 5 #include "core/html/track/CueTimeline.h" |
| 6 | 6 |
| 7 #include "core/events/Event.h" | 7 #include "core/events/Event.h" |
| 8 #include "core/html/HTMLMediaElement.h" | 8 #include "core/html/HTMLMediaElement.h" |
| 9 #include "core/html/HTMLTrackElement.h" | 9 #include "core/html/HTMLTrackElement.h" |
| 10 #include "core/html/track/LoadableTextTrack.h" | 10 #include "core/html/track/LoadableTextTrack.h" |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 // https://html.spec.whatwg.org/#time-marches-on | 140 // https://html.spec.whatwg.org/#time-marches-on |
| 141 | 141 |
| 142 // 1 - Let current cues be a list of cues, initialized to contain all the | 142 // 1 - Let current cues be a list of cues, initialized to contain all the |
| 143 // cues of all the hidden, showing, or showing by default text tracks of the | 143 // cues of all the hidden, showing, or showing by default text tracks of the |
| 144 // media element (not the disabled ones) whose start times are less than or | 144 // media element (not the disabled ones) whose start times are less than or |
| 145 // equal to the current playback position and whose end times are greater | 145 // equal to the current playback position and whose end times are greater |
| 146 // than the current playback position. | 146 // than the current playback position. |
| 147 CueList currentCues; | 147 CueList currentCues; |
| 148 | 148 |
| 149 // The user agent must synchronously unset [the text track cue active] flag | 149 // The user agent must synchronously unset [the text track cue active] flag |
| 150 // whenever ... the media element's readyState is changed back to HAVE_NOTHI
NG. | 150 // whenever ... the media element's readyState is changed back to kHaveNothi
ng. |
| 151 if (mediaElement.getReadyState() != HTMLMediaElement::HAVE_NOTHING && mediaE
lement.webMediaPlayer()) | 151 if (mediaElement.getReadyState() != HTMLMediaElement::kHaveNothing && mediaE
lement.webMediaPlayer()) |
| 152 currentCues = m_cueTree.allOverlaps(m_cueTree.createInterval(movieTime,
movieTime)); | 152 currentCues = m_cueTree.allOverlaps(m_cueTree.createInterval(movieTime,
movieTime)); |
| 153 | 153 |
| 154 CueList previousCues; | 154 CueList previousCues; |
| 155 CueList missedCues; | 155 CueList missedCues; |
| 156 | 156 |
| 157 // 2 - Let other cues be a list of cues, initialized to contain all the cues | 157 // 2 - Let other cues be a list of cues, initialized to contain all the cues |
| 158 // of hidden, showing, and showing by default text tracks of the media | 158 // of hidden, showing, and showing by default text tracks of the media |
| 159 // element that are not present in current cues. | 159 // element that are not present in current cues. |
| 160 previousCues = m_currentlyActiveCues; | 160 previousCues = m_currentlyActiveCues; |
| 161 | 161 |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 if (!m_ignoreUpdate) | 356 if (!m_ignoreUpdate) |
| 357 updateActiveCues(mediaElement().currentTime()); | 357 updateActiveCues(mediaElement().currentTime()); |
| 358 } | 358 } |
| 359 | 359 |
| 360 DEFINE_TRACE(CueTimeline) | 360 DEFINE_TRACE(CueTimeline) |
| 361 { | 361 { |
| 362 visitor->trace(m_mediaElement); | 362 visitor->trace(m_mediaElement); |
| 363 } | 363 } |
| 364 | 364 |
| 365 } // namespace blink | 365 } // namespace blink |
| OLD | NEW |