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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 { | 251 { |
252 return EventTargetNames::TextTrackList; | 252 return EventTargetNames::TextTrackList; |
253 } | 253 } |
254 | 254 |
255 ExecutionContext* TextTrackList::executionContext() const | 255 ExecutionContext* TextTrackList::executionContext() const |
256 { | 256 { |
257 ASSERT(m_owner); | 257 ASSERT(m_owner); |
258 return m_owner->executionContext(); | 258 return m_owner->executionContext(); |
259 } | 259 } |
260 | 260 |
261 void TextTrackList::clearOwnerAndClients() | |
262 { | |
263 m_owner = 0; | |
264 | |
265 for (unsigned i = 0; i < length(); ++i) | |
266 item(i)->clearClient(); | |
267 } | |
268 | |
269 void TextTrackList::scheduleTrackEvent(const AtomicString& eventName, PassRefPtr
<TextTrack> track) | 261 void TextTrackList::scheduleTrackEvent(const AtomicString& eventName, PassRefPtr
<TextTrack> track) |
270 { | 262 { |
271 TrackEventInit initializer; | 263 TrackEventInit initializer; |
272 initializer.track = track; | 264 initializer.track = track; |
273 initializer.bubbles = false; | 265 initializer.bubbles = false; |
274 initializer.cancelable = false; | 266 initializer.cancelable = false; |
275 | 267 |
276 m_asyncEventQueue->enqueueEvent(TrackEvent::create(eventName, initializer)); | 268 m_asyncEventQueue->enqueueEvent(TrackEvent::create(eventName, initializer)); |
277 } | 269 } |
278 | 270 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 // interface, with the track attribute initialized to the text track's | 307 // interface, with the track attribute initialized to the text track's |
316 // TextTrack object, at the media element's textTracks attribute's | 308 // TextTrack object, at the media element's textTracks attribute's |
317 // TextTrackList object. | 309 // TextTrackList object. |
318 scheduleTrackEvent(EventTypeNames::removetrack, track); | 310 scheduleTrackEvent(EventTypeNames::removetrack, track); |
319 } | 311 } |
320 | 312 |
321 Node* TextTrackList::owner() const | 313 Node* TextTrackList::owner() const |
322 { | 314 { |
323 return m_owner; | 315 return m_owner; |
324 } | 316 } |
OLD | NEW |