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 1300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1311 | 1311 |
1312 void HTMLMediaElement::textTrackRemoveCue(TextTrack*, PassRefPtr<TextTrackCue> c
ue) | 1312 void HTMLMediaElement::textTrackRemoveCue(TextTrack*, PassRefPtr<TextTrackCue> c
ue) |
1313 { | 1313 { |
1314 // Negative duration cues need to be treated in the interval tree as | 1314 // Negative duration cues need to be treated in the interval tree as |
1315 // zero-length cues. | 1315 // zero-length cues. |
1316 double endTime = max(cue->startTime(), cue->endTime()); | 1316 double endTime = max(cue->startTime(), cue->endTime()); |
1317 | 1317 |
1318 CueInterval interval = m_cueTree.createInterval(cue->startTime(), endTime, c
ue.get()); | 1318 CueInterval interval = m_cueTree.createInterval(cue->startTime(), endTime, c
ue.get()); |
1319 m_cueTree.remove(interval); | 1319 m_cueTree.remove(interval); |
1320 | 1320 |
| 1321 // Since the cue will be removed from the media element and likely the |
| 1322 // TextTrack might also be destructed, notifying the region of the cue |
| 1323 // removal shouldn't be done. |
| 1324 cue->notifyRegionWhenRemovingDisplayTree(false); |
| 1325 |
1321 size_t index = m_currentlyActiveCues.find(interval); | 1326 size_t index = m_currentlyActiveCues.find(interval); |
1322 if (index != kNotFound) { | 1327 if (index != kNotFound) { |
1323 m_currentlyActiveCues.remove(index); | 1328 m_currentlyActiveCues.remove(index); |
1324 cue->setIsActive(false); | 1329 cue->setIsActive(false); |
1325 } | 1330 } |
1326 | |
1327 cue->removeDisplayTree(); | 1331 cue->removeDisplayTree(); |
1328 updateActiveTextTrackCues(currentTime()); | 1332 updateActiveTextTrackCues(currentTime()); |
| 1333 |
| 1334 cue->notifyRegionWhenRemovingDisplayTree(true); |
1329 } | 1335 } |
1330 | 1336 |
1331 | 1337 |
1332 bool HTMLMediaElement::isSafeToLoadURL(const KURL& url, InvalidURLAction actionI
fInvalid) | 1338 bool HTMLMediaElement::isSafeToLoadURL(const KURL& url, InvalidURLAction actionI
fInvalid) |
1333 { | 1339 { |
1334 if (!url.isValid()) { | 1340 if (!url.isValid()) { |
1335 LOG(Media, "HTMLMediaElement::isSafeToLoadURL(%s) -> FALSE because url i
s invalid", urlForLoggingMedia(url).utf8().data()); | 1341 LOG(Media, "HTMLMediaElement::isSafeToLoadURL(%s) -> FALSE because url i
s invalid", urlForLoggingMedia(url).utf8().data()); |
1336 return false; | 1342 return false; |
1337 } | 1343 } |
1338 | 1344 |
(...skipping 2652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3991 { | 3997 { |
3992 m_restrictions = NoRestrictions; | 3998 m_restrictions = NoRestrictions; |
3993 } | 3999 } |
3994 | 4000 |
3995 void HTMLMediaElement::mediaPlayerScheduleLayerUpdate() | 4001 void HTMLMediaElement::mediaPlayerScheduleLayerUpdate() |
3996 { | 4002 { |
3997 scheduleLayerUpdate(); | 4003 scheduleLayerUpdate(); |
3998 } | 4004 } |
3999 | 4005 |
4000 } | 4006 } |
OLD | NEW |