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 1298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1309 | 1309 |
1310 void HTMLMediaElement::textTrackRemoveCue(TextTrack*, PassRefPtr<TextTrackCue> c
ue) | 1310 void HTMLMediaElement::textTrackRemoveCue(TextTrack*, PassRefPtr<TextTrackCue> c
ue) |
1311 { | 1311 { |
1312 // Negative duration cues need to be treated in the interval tree as | 1312 // Negative duration cues need to be treated in the interval tree as |
1313 // zero-length cues. | 1313 // zero-length cues. |
1314 double endTime = max(cue->startTime(), cue->endTime()); | 1314 double endTime = max(cue->startTime(), cue->endTime()); |
1315 | 1315 |
1316 CueInterval interval = m_cueTree.createInterval(cue->startTime(), endTime, c
ue.get()); | 1316 CueInterval interval = m_cueTree.createInterval(cue->startTime(), endTime, c
ue.get()); |
1317 m_cueTree.remove(interval); | 1317 m_cueTree.remove(interval); |
1318 | 1318 |
| 1319 // Since the cue will be removed from the media element and likely the |
| 1320 // TextTrack might also be destructed, notifying the region of the cue |
| 1321 // removal shouldn't be done. |
| 1322 cue->notifyRegionWhenRemovingDisplayTree(false); |
| 1323 |
1319 size_t index = m_currentlyActiveCues.find(interval); | 1324 size_t index = m_currentlyActiveCues.find(interval); |
1320 if (index != kNotFound) { | 1325 if (index != kNotFound) { |
1321 m_currentlyActiveCues.remove(index); | 1326 m_currentlyActiveCues.remove(index); |
1322 cue->setIsActive(false); | 1327 cue->setIsActive(false); |
1323 } | 1328 } |
1324 | |
1325 cue->removeDisplayTree(); | 1329 cue->removeDisplayTree(); |
1326 updateActiveTextTrackCues(currentTime()); | 1330 updateActiveTextTrackCues(currentTime()); |
| 1331 |
| 1332 cue->notifyRegionWhenRemovingDisplayTree(true); |
1327 } | 1333 } |
1328 | 1334 |
1329 | 1335 |
1330 bool HTMLMediaElement::isSafeToLoadURL(const KURL& url, InvalidURLAction actionI
fInvalid) | 1336 bool HTMLMediaElement::isSafeToLoadURL(const KURL& url, InvalidURLAction actionI
fInvalid) |
1331 { | 1337 { |
1332 if (!url.isValid()) { | 1338 if (!url.isValid()) { |
1333 LOG(Media, "HTMLMediaElement::isSafeToLoadURL(%s) -> FALSE because url i
s invalid", urlForLoggingMedia(url).utf8().data()); | 1339 LOG(Media, "HTMLMediaElement::isSafeToLoadURL(%s) -> FALSE because url i
s invalid", urlForLoggingMedia(url).utf8().data()); |
1334 return false; | 1340 return false; |
1335 } | 1341 } |
1336 | 1342 |
(...skipping 2582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3919 { | 3925 { |
3920 m_restrictions = NoRestrictions; | 3926 m_restrictions = NoRestrictions; |
3921 } | 3927 } |
3922 | 3928 |
3923 void HTMLMediaElement::mediaPlayerScheduleLayerUpdate() | 3929 void HTMLMediaElement::mediaPlayerScheduleLayerUpdate() |
3924 { | 3930 { |
3925 scheduleLayerUpdate(); | 3931 scheduleLayerUpdate(); |
3926 } | 3932 } |
3927 | 3933 |
3928 } | 3934 } |
OLD | NEW |