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

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

Issue 9892004: Merge 111775 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1025/
Patch Set: Created 8 years, 8 months 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 | « Source/WebCore/dom/ContainerNode.cpp ('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 696 matching lines...) Expand 10 before | Expand all | Expand 10 after
707 m_textTracksWhenResourceSelectionBegan.append(track); 707 m_textTracksWhenResourceSelectionBegan.append(track);
708 } 708 }
709 } 709 }
710 #endif 710 #endif
711 711
712 configureMediaControls(); 712 configureMediaControls();
713 } 713 }
714 714
715 void HTMLMediaElement::loadInternal() 715 void HTMLMediaElement::loadInternal()
716 { 716 {
717 // Some of the code paths below this function dispatch the BeforeLoad event. This ASSERT helps
718 // us catch those bugs more quickly without needing all the branches to alig n to actually
719 // trigger the event.
720 ASSERT(!eventDispatchForbidden());
721
717 // If we can't start a load right away, start it later. 722 // If we can't start a load right away, start it later.
718 Page* page = document()->page(); 723 Page* page = document()->page();
719 if (pageConsentRequiredForLoad() && page && !page->canStartMedia()) { 724 if (pageConsentRequiredForLoad() && page && !page->canStartMedia()) {
720 if (m_isWaitingUntilMediaCanStart) 725 if (m_isWaitingUntilMediaCanStart)
721 return; 726 return;
722 document()->addMediaCanStartListener(this); 727 document()->addMediaCanStartListener(this);
723 m_isWaitingUntilMediaCanStart = true; 728 m_isWaitingUntilMediaCanStart = true;
724 return; 729 return;
725 } 730 }
726 731
(...skipping 3034 matching lines...) Expand 10 before | Expand all | Expand 10 after
3761 3766
3762 bool HTMLMediaElement::shouldDisableSleep() const 3767 bool HTMLMediaElement::shouldDisableSleep() const
3763 { 3768 {
3764 return m_player && !m_player->paused() && hasVideo() && hasAudio() && !loop( ); 3769 return m_player && !m_player->paused() && hasVideo() && hasAudio() && !loop( );
3765 } 3770 }
3766 #endif 3771 #endif
3767 3772
3768 } 3773 }
3769 3774
3770 #endif 3775 #endif
OLDNEW
« no previous file with comments | « Source/WebCore/dom/ContainerNode.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698