OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 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 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 // media element, then the user agent must remove the track element's | 312 // media element, then the user agent must remove the track element's |
313 // corresponding text track from the media element's list of text tracks, | 313 // corresponding text track from the media element's list of text tracks, |
314 // and then queue a task to fire a trusted event with the name removetrack, | 314 // and then queue a task to fire a trusted event with the name removetrack, |
315 // that does not bubble and is not cancelable, and that uses the TrackEvent | 315 // that does not bubble and is not cancelable, and that uses the TrackEvent |
316 // interface, with the track attribute initialized to the text track's | 316 // interface, with the track attribute initialized to the text track's |
317 // TextTrack object, at the media element's textTracks attribute's | 317 // TextTrack object, at the media element's textTracks attribute's |
318 // TextTrackList object. | 318 // TextTrackList object. |
319 scheduleTrackEvent(EventTypeNames::removetrack, track); | 319 scheduleTrackEvent(EventTypeNames::removetrack, track); |
320 } | 320 } |
321 | 321 |
| 322 bool TextTrackList::hasShowingTracks() |
| 323 { |
| 324 for (unsigned i = 0; i < length(); ++i) { |
| 325 if (item(i)->mode() == TextTrack::showingKeyword()) |
| 326 return true; |
| 327 } |
| 328 return false; |
| 329 } |
| 330 |
322 HTMLMediaElement* TextTrackList::owner() const | 331 HTMLMediaElement* TextTrackList::owner() const |
323 { | 332 { |
324 return m_owner; | 333 return m_owner; |
325 } | 334 } |
326 | 335 |
327 DEFINE_TRACE(TextTrackList) | 336 DEFINE_TRACE(TextTrackList) |
328 { | 337 { |
329 visitor->trace(m_owner); | 338 visitor->trace(m_owner); |
330 visitor->trace(m_asyncEventQueue); | 339 visitor->trace(m_asyncEventQueue); |
331 visitor->trace(m_addTrackTracks); | 340 visitor->trace(m_addTrackTracks); |
332 visitor->trace(m_elementTracks); | 341 visitor->trace(m_elementTracks); |
333 visitor->trace(m_inbandTracks); | 342 visitor->trace(m_inbandTracks); |
334 EventTargetWithInlineData::trace(visitor); | 343 EventTargetWithInlineData::trace(visitor); |
335 } | 344 } |
OLD | NEW |