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 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
511 m_pendingActionFlags |= LoadMediaResource; | 511 m_pendingActionFlags |= LoadMediaResource; |
512 m_loadTimer.startOneShot(0); | 512 m_loadTimer.startOneShot(0); |
513 } | 513 } |
514 | 514 |
515 void HTMLMediaElement::scheduleEvent(const AtomicString& eventName) | 515 void HTMLMediaElement::scheduleEvent(const AtomicString& eventName) |
516 { | 516 { |
517 #if LOG_MEDIA_EVENTS | 517 #if LOG_MEDIA_EVENTS |
518 LOG(Media, "HTMLMediaElement::scheduleEvent - scheduling '%s'", eventName.st ring().ascii().data()); | 518 LOG(Media, "HTMLMediaElement::scheduleEvent - scheduling '%s'", eventName.st ring().ascii().data()); |
519 #endif | 519 #endif |
520 RefPtr<Event> event = Event::create(eventName, false, true); | 520 RefPtr<Event> event = Event::create(eventName, false, true); |
521 event->setTarget(this); | 521 m_asyncEventQueue->enqueueEventWithoutTarget(event.release()); |
acolwell GONE FROM CHROMIUM
2013/05/30 17:08:00
This doesn't seem right to me. I believe we do wan
| |
522 | |
523 m_asyncEventQueue->enqueueEvent(event.release()); | |
524 } | 522 } |
525 | 523 |
526 void HTMLMediaElement::loadTimerFired(Timer<HTMLMediaElement>*) | 524 void HTMLMediaElement::loadTimerFired(Timer<HTMLMediaElement>*) |
527 { | 525 { |
528 RefPtr<HTMLMediaElement> protect(this); // loadNextSourceChild may fire 'bef oreload', which can make arbitrary DOM mutations. | 526 RefPtr<HTMLMediaElement> protect(this); // loadNextSourceChild may fire 'bef oreload', which can make arbitrary DOM mutations. |
529 | 527 |
530 if (RuntimeEnabledFeatures::videoTrackEnabled() && (m_pendingActionFlags & L oadTextTrackResource)) | 528 if (RuntimeEnabledFeatures::videoTrackEnabled() && (m_pendingActionFlags & L oadTextTrackResource)) |
531 configureTextTracks(); | 529 configureTextTracks(); |
532 | 530 |
533 if (m_pendingActionFlags & LoadMediaResource) { | 531 if (m_pendingActionFlags & LoadMediaResource) { |
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
873 | 871 |
874 // 12 - Further sort tasks in events that have the same time by the | 872 // 12 - Further sort tasks in events that have the same time by the |
875 // relative text track cue order of the text track cues associated | 873 // relative text track cue order of the text track cues associated |
876 // with these tasks. | 874 // with these tasks. |
877 return a.second->cueIndex() - b.second->cueIndex() < 0; | 875 return a.second->cueIndex() - b.second->cueIndex() < 0; |
878 } | 876 } |
879 | 877 |
880 | 878 |
881 void HTMLMediaElement::updateActiveTextTrackCues(double movieTime) | 879 void HTMLMediaElement::updateActiveTextTrackCues(double movieTime) |
882 { | 880 { |
883 LOG(Media, "HTMLMediaElement::updateActiveTextTrackCues"); | |
884 | |
885 // 4.8.10.8 Playing the media resource | 881 // 4.8.10.8 Playing the media resource |
886 | 882 |
887 // If the current playback position changes while the steps are running, | 883 // If the current playback position changes while the steps are running, |
888 // then the user agent must wait for the steps to complete, and then must | 884 // then the user agent must wait for the steps to complete, and then must |
889 // immediately rerun the steps. | 885 // immediately rerun the steps. |
890 if (ignoreTrackDisplayUpdateRequests()) | 886 if (ignoreTrackDisplayUpdateRequests()) |
891 return; | 887 return; |
892 | 888 |
889 LOG(Media, "HTMLMediaElement::updateActiveTextTrackCues"); | |
890 | |
893 // 1 - Let current cues be a list of cues, initialized to contain all the | 891 // 1 - Let current cues be a list of cues, initialized to contain all the |
894 // cues of all the hidden, showing, or showing by default text tracks of the | 892 // cues of all the hidden, showing, or showing by default text tracks of the |
895 // media element (not the disabled ones) whose start times are less than or | 893 // media element (not the disabled ones) whose start times are less than or |
896 // equal to the current playback position and whose end times are greater | 894 // equal to the current playback position and whose end times are greater |
897 // than the current playback position. | 895 // than the current playback position. |
898 CueList currentCues; | 896 CueList currentCues; |
899 | 897 |
900 // The user agent must synchronously unset [the text track cue active] flag | 898 // The user agent must synchronously unset [the text track cue active] flag |
901 // whenever ... the media element's readyState is changed back to HAVE_NOTHI NG. | 899 // whenever ... the media element's readyState is changed back to HAVE_NOTHI NG. |
902 if (m_readyState != HAVE_NOTHING && m_player) | 900 if (m_readyState != HAVE_NOTHING && m_player) |
(...skipping 3115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4018 info.addMember(m_mediaGroup, "mediaGroup"); | 4016 info.addMember(m_mediaGroup, "mediaGroup"); |
4019 info.addMember(m_mediaController, "mediaController"); | 4017 info.addMember(m_mediaController, "mediaController"); |
4020 | 4018 |
4021 #if ENABLE(WEB_AUDIO) | 4019 #if ENABLE(WEB_AUDIO) |
4022 info.addMember(m_audioSourceNode, "audioSourceNode"); | 4020 info.addMember(m_audioSourceNode, "audioSourceNode"); |
4023 #endif | 4021 #endif |
4024 | 4022 |
4025 } | 4023 } |
4026 | 4024 |
4027 } | 4025 } |
OLD | NEW |