| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights
reserved. | 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 1252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1263 } | 1263 } |
| 1264 | 1264 |
| 1265 void HTMLMediaElement::endIgnoringTrackDisplayUpdateRequests() | 1265 void HTMLMediaElement::endIgnoringTrackDisplayUpdateRequests() |
| 1266 { | 1266 { |
| 1267 ASSERT(m_ignoreTrackDisplayUpdate); | 1267 ASSERT(m_ignoreTrackDisplayUpdate); |
| 1268 --m_ignoreTrackDisplayUpdate; | 1268 --m_ignoreTrackDisplayUpdate; |
| 1269 if (!m_ignoreTrackDisplayUpdate && m_inActiveDocument) | 1269 if (!m_ignoreTrackDisplayUpdate && m_inActiveDocument) |
| 1270 updateActiveTextTrackCues(currentTime()); | 1270 updateActiveTextTrackCues(currentTime()); |
| 1271 } | 1271 } |
| 1272 | 1272 |
| 1273 void HTMLMediaElement::textTrackAddCues(TextTrack*, const TextTrackCueList* cues
) | 1273 void HTMLMediaElement::textTrackAddCues(TextTrack* track, const TextTrackCueList
* cues) |
| 1274 { | 1274 { |
| 1275 LOG(Media, "HTMLMediaElement::textTrackAddCues"); | 1275 LOG(Media, "HTMLMediaElement::textTrackAddCues"); |
| 1276 if (track->mode() == TextTrack::disabledKeyword()) |
| 1277 return; |
| 1276 | 1278 |
| 1277 TrackDisplayUpdateScope scope(this); | 1279 TrackDisplayUpdateScope scope(this); |
| 1278 for (size_t i = 0; i < cues->length(); ++i) | 1280 for (size_t i = 0; i < cues->length(); ++i) |
| 1279 textTrackAddCue(cues->item(i)->track(), cues->item(i)); | 1281 textTrackAddCue(cues->item(i)->track(), cues->item(i)); |
| 1280 } | 1282 } |
| 1281 | 1283 |
| 1282 void HTMLMediaElement::textTrackRemoveCues(TextTrack*, const TextTrackCueList* c
ues) | 1284 void HTMLMediaElement::textTrackRemoveCues(TextTrack*, const TextTrackCueList* c
ues) |
| 1283 { | 1285 { |
| 1284 LOG(Media, "HTMLMediaElement::textTrackRemoveCues"); | 1286 LOG(Media, "HTMLMediaElement::textTrackRemoveCues"); |
| 1285 | 1287 |
| 1286 TrackDisplayUpdateScope scope(this); | 1288 TrackDisplayUpdateScope scope(this); |
| 1287 for (size_t i = 0; i < cues->length(); ++i) | 1289 for (size_t i = 0; i < cues->length(); ++i) |
| 1288 textTrackRemoveCue(cues->item(i)->track(), cues->item(i)); | 1290 textTrackRemoveCue(cues->item(i)->track(), cues->item(i)); |
| 1289 } | 1291 } |
| 1290 | 1292 |
| 1291 void HTMLMediaElement::textTrackAddCue(TextTrack*, PassRefPtr<TextTrackCue> cue) | 1293 void HTMLMediaElement::textTrackAddCue(TextTrack* track, PassRefPtr<TextTrackCue
> cue) |
| 1292 { | 1294 { |
| 1295 if (track->mode() == TextTrack::disabledKeyword()) |
| 1296 return; |
| 1297 |
| 1293 // Negative duration cues need be treated in the interval tree as | 1298 // Negative duration cues need be treated in the interval tree as |
| 1294 // zero-length cues. | 1299 // zero-length cues. |
| 1295 double endTime = max(cue->startTime(), cue->endTime()); | 1300 double endTime = max(cue->startTime(), cue->endTime()); |
| 1296 | 1301 |
| 1297 CueInterval interval = m_cueTree.createInterval(cue->startTime(), endTime, c
ue.get()); | 1302 CueInterval interval = m_cueTree.createInterval(cue->startTime(), endTime, c
ue.get()); |
| 1298 if (!m_cueTree.contains(interval)) | 1303 if (!m_cueTree.contains(interval)) |
| 1299 m_cueTree.add(interval); | 1304 m_cueTree.add(interval); |
| 1300 updateActiveTextTrackCues(currentTime()); | 1305 updateActiveTextTrackCues(currentTime()); |
| 1301 } | 1306 } |
| 1302 | 1307 |
| (...skipping 2670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3973 info.addMember(m_mediaGroup, "mediaGroup"); | 3978 info.addMember(m_mediaGroup, "mediaGroup"); |
| 3974 info.addMember(m_mediaController, "mediaController"); | 3979 info.addMember(m_mediaController, "mediaController"); |
| 3975 | 3980 |
| 3976 #if ENABLE(WEB_AUDIO) | 3981 #if ENABLE(WEB_AUDIO) |
| 3977 info.addMember(m_audioSourceNode, "audioSourceNode"); | 3982 info.addMember(m_audioSourceNode, "audioSourceNode"); |
| 3978 #endif | 3983 #endif |
| 3979 | 3984 |
| 3980 } | 3985 } |
| 3981 | 3986 |
| 3982 } | 3987 } |
| OLD | NEW |