| 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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 { | 187 { |
| 188 RefPtrWillBeRawPtr<TextTrack> track = prpTrack; | 188 RefPtrWillBeRawPtr<TextTrack> track = prpTrack; |
| 189 | 189 |
| 190 if (track->trackType() == TextTrack::AddTrack) { | 190 if (track->trackType() == TextTrack::AddTrack) { |
| 191 m_addTrackTracks.append(track); | 191 m_addTrackTracks.append(track); |
| 192 } else if (track->trackType() == TextTrack::TrackElement) { | 192 } else if (track->trackType() == TextTrack::TrackElement) { |
| 193 // Insert tracks added for <track> element in tree order. | 193 // Insert tracks added for <track> element in tree order. |
| 194 size_t index = static_cast<LoadableTextTrack*>(track.get())->trackElemen
tIndex(); | 194 size_t index = static_cast<LoadableTextTrack*>(track.get())->trackElemen
tIndex(); |
| 195 m_elementTracks.insert(index, track); | 195 m_elementTracks.insert(index, track); |
| 196 } else if (track->trackType() == TextTrack::InBand) { | 196 } else if (track->trackType() == TextTrack::InBand) { |
| 197 // Insert tracks added for in-band in the media file order. | 197 m_inbandTracks.append(track); |
| 198 size_t index = static_cast<InbandTextTrack*>(track.get())->inbandTrackIn
dex(); | |
| 199 m_inbandTracks.insert(index, track); | |
| 200 } else { | 198 } else { |
| 201 ASSERT_NOT_REACHED(); | 199 ASSERT_NOT_REACHED(); |
| 202 } | 200 } |
| 203 | 201 |
| 204 invalidateTrackIndexesAfterTrack(track.get()); | 202 invalidateTrackIndexesAfterTrack(track.get()); |
| 205 | 203 |
| 206 ASSERT(!track->trackList()); | 204 ASSERT(!track->trackList()); |
| 207 track->setTrackList(this); | 205 track->setTrackList(this); |
| 208 | 206 |
| 209 scheduleAddTrackEvent(track.release()); | 207 scheduleAddTrackEvent(track.release()); |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 | 331 |
| 334 void TextTrackList::trace(Visitor* visitor) | 332 void TextTrackList::trace(Visitor* visitor) |
| 335 { | 333 { |
| 336 visitor->trace(m_owner); | 334 visitor->trace(m_owner); |
| 337 visitor->trace(m_asyncEventQueue); | 335 visitor->trace(m_asyncEventQueue); |
| 338 visitor->trace(m_addTrackTracks); | 336 visitor->trace(m_addTrackTracks); |
| 339 visitor->trace(m_elementTracks); | 337 visitor->trace(m_elementTracks); |
| 340 visitor->trace(m_inbandTracks); | 338 visitor->trace(m_inbandTracks); |
| 341 EventTargetWithInlineData::trace(visitor); | 339 EventTargetWithInlineData::trace(visitor); |
| 342 } | 340 } |
| OLD | NEW |