| 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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 } | 127 } |
| 128 | 128 |
| 129 TextTrack* TextTrackList::getTrackById(const AtomicString& id) | 129 TextTrack* TextTrackList::getTrackById(const AtomicString& id) |
| 130 { | 130 { |
| 131 // 4.8.10.12.5 Text track API | 131 // 4.8.10.12.5 Text track API |
| 132 // The getTrackById(id) method must return the first TextTrack in the | 132 // The getTrackById(id) method must return the first TextTrack in the |
| 133 // TextTrackList object whose id IDL attribute would return a value equal | 133 // TextTrackList object whose id IDL attribute would return a value equal |
| 134 // to the value of the id argument. | 134 // to the value of the id argument. |
| 135 for (unsigned i = 0; i < length(); ++i) { | 135 for (unsigned i = 0; i < length(); ++i) { |
| 136 TextTrack* track = anonymousIndexedGetter(i); | 136 TextTrack* track = anonymousIndexedGetter(i); |
| 137 if (track->id() == id) | 137 if (String(track->id()) == id) |
| 138 return track; | 138 return track; |
| 139 } | 139 } |
| 140 | 140 |
| 141 // When no tracks match the given argument, the method must return null. | 141 // When no tracks match the given argument, the method must return null. |
| 142 return 0; | 142 return 0; |
| 143 } | 143 } |
| 144 | 144 |
| 145 void TextTrackList::invalidateTrackIndexesAfterTrack(TextTrack* track) | 145 void TextTrackList::invalidateTrackIndexesAfterTrack(TextTrack* track) |
| 146 { | 146 { |
| 147 HeapVector<Member<TextTrack>>* tracks = nullptr; | 147 HeapVector<Member<TextTrack>>* tracks = nullptr; |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 | 323 |
| 324 DEFINE_TRACE_WRAPPERS(TextTrackList) | 324 DEFINE_TRACE_WRAPPERS(TextTrackList) |
| 325 { | 325 { |
| 326 for (auto track : m_addTrackTracks) | 326 for (auto track : m_addTrackTracks) |
| 327 visitor->traceWrappers(track); | 327 visitor->traceWrappers(track); |
| 328 for (auto track : m_elementTracks) | 328 for (auto track : m_elementTracks) |
| 329 visitor->traceWrappers(track); | 329 visitor->traceWrappers(track); |
| 330 for (auto track : m_inbandTracks) | 330 for (auto track : m_inbandTracks) |
| 331 visitor->traceWrappers(track); | 331 visitor->traceWrappers(track); |
| 332 } | 332 } |
| OLD | NEW |