OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * Copyright (C) 2011, 2012, 2013 Apple Inc. All rights reserved. | 3 * Copyright (C) 2011, 2012, 2013 Apple Inc. All rights 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 are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
173 // because they will no longer be accessible from the cues() function. | 173 // because they will no longer be accessible from the cues() function. |
174 if (mode == disabledKeyword() && cueTimeline() && m_cues) | 174 if (mode == disabledKeyword() && cueTimeline() && m_cues) |
175 cueTimeline()->removeCues(this, m_cues.get()); | 175 cueTimeline()->removeCues(this, m_cues.get()); |
176 | 176 |
177 if (mode != showingKeyword() && m_cues) | 177 if (mode != showingKeyword() && m_cues) |
178 for (size_t i = 0; i < m_cues->length(); ++i) | 178 for (size_t i = 0; i < m_cues->length(); ++i) |
179 m_cues->item(i)->removeDisplayTree(); | 179 m_cues->item(i)->removeDisplayTree(); |
180 | 180 |
181 m_mode = mode; | 181 m_mode = mode; |
182 | 182 |
183 if (mode != disabledKeyword() && readinessState() == Loaded) { | |
philipj_slow
2015/02/25 15:52:14
This was just copied, but is there any reason Read
fs
2015/02/25 16:26:11
If Loading, then cues will make their way to the t
| |
184 if (m_cues && cueTimeline()) | |
185 cueTimeline()->addCues(this, m_cues.get()); | |
186 } | |
187 | |
183 if (mediaElement()) | 188 if (mediaElement()) |
184 mediaElement()->textTrackModeChanged(this); | 189 mediaElement()->textTrackModeChanged(this); |
185 } | 190 } |
186 | 191 |
187 TextTrackCueList* TextTrack::cues() | 192 TextTrackCueList* TextTrack::cues() |
188 { | 193 { |
189 // 4.8.10.12.5 If the text track mode ... is not the text track disabled mod e, | 194 // 4.8.10.12.5 If the text track mode ... is not the text track disabled mod e, |
190 // then the cues attribute must return a live TextTrackCueList object ... | 195 // then the cues attribute must return a live TextTrackCueList object ... |
191 // Otherwise, it must return null. When an object is returned, the | 196 // Otherwise, it must return null. When an object is returned, the |
192 // same object must be returned each time. | 197 // same object must be returned each time. |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
449 DEFINE_TRACE(TextTrack) | 454 DEFINE_TRACE(TextTrack) |
450 { | 455 { |
451 visitor->trace(m_cues); | 456 visitor->trace(m_cues); |
452 visitor->trace(m_regions); | 457 visitor->trace(m_regions); |
453 visitor->trace(m_trackList); | 458 visitor->trace(m_trackList); |
454 TrackBase::trace(visitor); | 459 TrackBase::trace(visitor); |
455 EventTargetWithInlineData::trace(visitor); | 460 EventTargetWithInlineData::trace(visitor); |
456 } | 461 } |
457 | 462 |
458 } // namespace blink | 463 } // namespace blink |
OLD | NEW |