Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(115)

Side by Side Diff: Source/WebCore/html/HTMLMediaElement.cpp

Issue 11415160: Merge 135906 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1312/
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « LayoutTests/http/tests/media/media-source/video-media-source-state-changes-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserv ed.
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 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 m_textTracks->clearOwner(); 305 m_textTracks->clearOwner();
306 if (m_textTracks) { 306 if (m_textTracks) {
307 for (unsigned i = 0; i < m_textTracks->length(); ++i) 307 for (unsigned i = 0; i < m_textTracks->length(); ++i)
308 m_textTracks->item(i)->clearClient(); 308 m_textTracks->item(i)->clearClient();
309 } 309 }
310 #endif 310 #endif
311 311
312 if (m_mediaController) 312 if (m_mediaController)
313 m_mediaController->removeMediaElement(this); 313 m_mediaController->removeMediaElement(this);
314 314
315 #if ENABLE(MEDIA_SOURCE)
316 setSourceState(MediaSource::closedKeyword());
317 #endif
318
315 removeElementFromDocumentMap(this, document()); 319 removeElementFromDocumentMap(this, document());
316 } 320 }
317 321
318 void HTMLMediaElement::didMoveToNewDocument(Document* oldDocument) 322 void HTMLMediaElement::didMoveToNewDocument(Document* oldDocument)
319 { 323 {
320 if (m_isWaitingUntilMediaCanStart) { 324 if (m_isWaitingUntilMediaCanStart) {
321 if (oldDocument) 325 if (oldDocument)
322 oldDocument->removeMediaCanStartListener(this); 326 oldDocument->removeMediaCanStartListener(this);
323 document()->addMediaCanStartListener(this); 327 document()->addMediaCanStartListener(this);
324 } 328 }
(...skipping 3389 matching lines...) Expand 10 before | Expand all | Expand 10 after
3714 updateMediaController(); 3718 updateMediaController();
3715 #if ENABLE(VIDEO_TRACK) 3719 #if ENABLE(VIDEO_TRACK)
3716 if (RuntimeEnabledFeatures::webkitVideoTrackEnabled()) 3720 if (RuntimeEnabledFeatures::webkitVideoTrackEnabled())
3717 updateActiveTextTrackCues(0); 3721 updateActiveTextTrackCues(0);
3718 #endif 3722 #endif
3719 } 3723 }
3720 3724
3721 void HTMLMediaElement::clearMediaPlayer(signed flags) 3725 void HTMLMediaElement::clearMediaPlayer(signed flags)
3722 { 3726 {
3723 #if !ENABLE(PLUGIN_PROXY_FOR_VIDEO) 3727 #if !ENABLE(PLUGIN_PROXY_FOR_VIDEO)
3728
3729 #if ENABLE(MEDIA_SOURCE)
3730 setSourceState(MediaSource::closedKeyword());
3731 #endif
3732
3724 m_player.clear(); 3733 m_player.clear();
3725 #endif 3734 #endif
3726 stopPeriodicTimers(); 3735 stopPeriodicTimers();
3727 m_loadTimer.stop(); 3736 m_loadTimer.stop();
3728 3737
3729 m_pendingLoadFlags &= ~flags; 3738 m_pendingLoadFlags &= ~flags;
3730 m_loadState = WaitingForSource; 3739 m_loadState = WaitingForSource;
3731 } 3740 }
3732 3741
3733 bool HTMLMediaElement::canSuspend() const 3742 bool HTMLMediaElement::canSuspend() const
(...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after
4582 return mediaPlayerOwningDocument()->view()->windowClipRect(); 4591 return mediaPlayerOwningDocument()->view()->windowClipRect();
4583 } 4592 }
4584 4593
4585 void HTMLMediaElement::removeBehaviorsRestrictionsAfterFirstUserGesture() 4594 void HTMLMediaElement::removeBehaviorsRestrictionsAfterFirstUserGesture()
4586 { 4595 {
4587 m_restrictions = NoRestrictions; 4596 m_restrictions = NoRestrictions;
4588 } 4597 }
4589 4598
4590 } 4599 }
4591 #endif 4600 #endif
OLDNEW
« no previous file with comments | « LayoutTests/http/tests/media/media-source/video-media-source-state-changes-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698