| 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 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 { | 255 { |
| 256 return EventTargetNames::TextTrackList; | 256 return EventTargetNames::TextTrackList; |
| 257 } | 257 } |
| 258 | 258 |
| 259 ExecutionContext* TextTrackList::executionContext() const | 259 ExecutionContext* TextTrackList::executionContext() const |
| 260 { | 260 { |
| 261 ASSERT(m_owner); | 261 ASSERT(m_owner); |
| 262 return m_owner->executionContext(); | 262 return m_owner->executionContext(); |
| 263 } | 263 } |
| 264 | 264 |
| 265 void TextTrackList::clearOwnerAndClients() | 265 void TextTrackList::clearOwner() |
| 266 { | 266 { |
| 267 m_owner = 0; | 267 m_owner = 0; |
| 268 | 268 |
| 269 for (unsigned i = 0; i < length(); ++i) | 269 for (unsigned i = 0; i < length(); ++i) |
| 270 item(i)->clearClient(); | 270 item(i)->setTrackList(0); |
| 271 } | 271 } |
| 272 | 272 |
| 273 void TextTrackList::scheduleTrackEvent(const AtomicString& eventName, PassRefPtr
<TextTrack> track) | 273 void TextTrackList::scheduleTrackEvent(const AtomicString& eventName, PassRefPtr
<TextTrack> track) |
| 274 { | 274 { |
| 275 TrackEventInit initializer; | 275 TrackEventInit initializer; |
| 276 initializer.track = track; | 276 initializer.track = track; |
| 277 initializer.bubbles = false; | 277 initializer.bubbles = false; |
| 278 initializer.cancelable = false; | 278 initializer.cancelable = false; |
| 279 | 279 |
| 280 m_asyncEventQueue->enqueueEvent(TrackEvent::create(eventName, initializer)); | 280 m_asyncEventQueue->enqueueEvent(TrackEvent::create(eventName, initializer)); |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 // interface, with the track attribute initialized to the text track's | 319 // interface, with the track attribute initialized to the text track's |
| 320 // TextTrack object, at the media element's textTracks attribute's | 320 // TextTrack object, at the media element's textTracks attribute's |
| 321 // TextTrackList object. | 321 // TextTrackList object. |
| 322 scheduleTrackEvent(EventTypeNames::removetrack, track); | 322 scheduleTrackEvent(EventTypeNames::removetrack, track); |
| 323 } | 323 } |
| 324 | 324 |
| 325 HTMLMediaElement* TextTrackList::owner() const | 325 HTMLMediaElement* TextTrackList::owner() const |
| 326 { | 326 { |
| 327 return m_owner; | 327 return m_owner; |
| 328 } | 328 } |
| OLD | NEW |