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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 void TextTrackList::scheduleChangeEvent() | 301 void TextTrackList::scheduleChangeEvent() |
302 { | 302 { |
303 // 4.8.10.12.1 Text track model | 303 // 4.8.10.12.1 Text track model |
304 // Whenever a text track that is in a media element's list of text tracks | 304 // Whenever a text track that is in a media element's list of text tracks |
305 // has its text track mode change value, the user agent must run the | 305 // has its text track mode change value, the user agent must run the |
306 // following steps for the media element: | 306 // following steps for the media element: |
307 // ... | 307 // ... |
308 // Fire a simple event named change at the media element's textTracks | 308 // Fire a simple event named change at the media element's textTracks |
309 // attribute's TextTrackList object. | 309 // attribute's TextTrackList object. |
310 | 310 |
311 EventInit initializer; | 311 m_asyncEventQueue->enqueueEvent(Event::create(EventTypeNames::change)); |
312 initializer.bubbles = false; | |
313 initializer.cancelable = false; | |
314 | |
315 m_asyncEventQueue->enqueueEvent(Event::create(EventTypeNames::change, initia
lizer)); | |
316 } | 312 } |
317 | 313 |
318 void TextTrackList::scheduleRemoveTrackEvent(PassRefPtrWillBeRawPtr<TextTrack> t
rack) | 314 void TextTrackList::scheduleRemoveTrackEvent(PassRefPtrWillBeRawPtr<TextTrack> t
rack) |
319 { | 315 { |
320 // 4.8.10.12.3 Sourcing out-of-band text tracks | 316 // 4.8.10.12.3 Sourcing out-of-band text tracks |
321 // When a track element's parent element changes and the old parent was a | 317 // When a track element's parent element changes and the old parent was a |
322 // media element, then the user agent must remove the track element's | 318 // media element, then the user agent must remove the track element's |
323 // corresponding text track from the media element's list of text tracks, | 319 // corresponding text track from the media element's list of text tracks, |
324 // and then queue a task to fire a trusted event with the name removetrack, | 320 // and then queue a task to fire a trusted event with the name removetrack, |
325 // that does not bubble and is not cancelable, and that uses the TrackEvent | 321 // that does not bubble and is not cancelable, and that uses the TrackEvent |
(...skipping 10 matching lines...) Expand all Loading... |
336 | 332 |
337 void TextTrackList::trace(Visitor* visitor) | 333 void TextTrackList::trace(Visitor* visitor) |
338 { | 334 { |
339 visitor->trace(m_owner); | 335 visitor->trace(m_owner); |
340 visitor->trace(m_asyncEventQueue); | 336 visitor->trace(m_asyncEventQueue); |
341 visitor->trace(m_addTrackTracks); | 337 visitor->trace(m_addTrackTracks); |
342 visitor->trace(m_elementTracks); | 338 visitor->trace(m_elementTracks); |
343 visitor->trace(m_inbandTracks); | 339 visitor->trace(m_inbandTracks); |
344 EventTargetWithInlineData::trace(visitor); | 340 EventTargetWithInlineData::trace(visitor); |
345 } | 341 } |
OLD | NEW |