| 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 1290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1301 | 1301 |
| 1302 void HTMLMediaElement::textTrackRemoveCue(TextTrack*, PassRefPtr<TextTrackCue> c
ue) | 1302 void HTMLMediaElement::textTrackRemoveCue(TextTrack*, PassRefPtr<TextTrackCue> c
ue) |
| 1303 { | 1303 { |
| 1304 // Negative duration cues need to be treated in the interval tree as | 1304 // Negative duration cues need to be treated in the interval tree as |
| 1305 // zero-length cues. | 1305 // zero-length cues. |
| 1306 double endTime = max(cue->startTime(), cue->endTime()); | 1306 double endTime = max(cue->startTime(), cue->endTime()); |
| 1307 | 1307 |
| 1308 CueInterval interval = m_cueTree.createInterval(cue->startTime(), endTime, c
ue.get()); | 1308 CueInterval interval = m_cueTree.createInterval(cue->startTime(), endTime, c
ue.get()); |
| 1309 m_cueTree.remove(interval); | 1309 m_cueTree.remove(interval); |
| 1310 | 1310 |
| 1311 // Since the cue will be removed from the media element and likely the |
| 1312 // TextTrack might also be destructed, notifying the region of the cue |
| 1313 // removal shouldn't be done. |
| 1314 cue->notifyRegionWhenRemovingDisplayTree(false); |
| 1315 |
| 1311 size_t index = m_currentlyActiveCues.find(interval); | 1316 size_t index = m_currentlyActiveCues.find(interval); |
| 1312 if (index != kNotFound) { | 1317 if (index != kNotFound) { |
| 1313 m_currentlyActiveCues.remove(index); | 1318 m_currentlyActiveCues.remove(index); |
| 1314 cue->setIsActive(false); | 1319 cue->setIsActive(false); |
| 1315 } | 1320 } |
| 1316 | |
| 1317 cue->removeDisplayTree(); | 1321 cue->removeDisplayTree(); |
| 1318 updateActiveTextTrackCues(currentTime()); | 1322 updateActiveTextTrackCues(currentTime()); |
| 1323 |
| 1324 cue->notifyRegionWhenRemovingDisplayTree(true); |
| 1319 } | 1325 } |
| 1320 | 1326 |
| 1321 | 1327 |
| 1322 bool HTMLMediaElement::isSafeToLoadURL(const KURL& url, InvalidURLAction actionI
fInvalid) | 1328 bool HTMLMediaElement::isSafeToLoadURL(const KURL& url, InvalidURLAction actionI
fInvalid) |
| 1323 { | 1329 { |
| 1324 if (!url.isValid()) { | 1330 if (!url.isValid()) { |
| 1325 LOG(Media, "HTMLMediaElement::isSafeToLoadURL(%s) -> FALSE because url i
s invalid", urlForLoggingMedia(url).utf8().data()); | 1331 LOG(Media, "HTMLMediaElement::isSafeToLoadURL(%s) -> FALSE because url i
s invalid", urlForLoggingMedia(url).utf8().data()); |
| 1326 return false; | 1332 return false; |
| 1327 } | 1333 } |
| 1328 | 1334 |
| (...skipping 2645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3974 { | 3980 { |
| 3975 m_restrictions = NoRestrictions; | 3981 m_restrictions = NoRestrictions; |
| 3976 } | 3982 } |
| 3977 | 3983 |
| 3978 void HTMLMediaElement::mediaPlayerScheduleLayerUpdate() | 3984 void HTMLMediaElement::mediaPlayerScheduleLayerUpdate() |
| 3979 { | 3985 { |
| 3980 scheduleLayerUpdate(); | 3986 scheduleLayerUpdate(); |
| 3981 } | 3987 } |
| 3982 | 3988 |
| 3983 } | 3989 } |
| OLD | NEW |