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

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

Issue 313963004: Don't delay loading if autoplay is set and preload equals 'none'. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 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 | « LayoutTests/media/autoplay-with-preload-none-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, 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 876 matching lines...) Expand 10 before | Expand all | Expand 10 after
887 m_mediaSource = nullptr; 887 m_mediaSource = nullptr;
888 attemptLoad = false; 888 attemptLoad = false;
889 } 889 }
890 } 890 }
891 } 891 }
892 } 892 }
893 893
894 if (attemptLoad && canLoadURL(url, contentType, keySystem)) { 894 if (attemptLoad && canLoadURL(url, contentType, keySystem)) {
895 ASSERT(!webMediaPlayer()); 895 ASSERT(!webMediaPlayer());
896 896
897 if (m_preload == MediaPlayer::None) 897 if (!autoplay() && m_preload == MediaPlayer::None)
898 m_delayingLoadForPreloadNone = true; 898 m_delayingLoadForPreloadNone = true;
899 else 899 else
900 startPlayerLoad(); 900 startPlayerLoad();
901 } else { 901 } else {
902 mediaLoadingFailed(MediaPlayer::FormatError); 902 mediaLoadingFailed(MediaPlayer::FormatError);
903 } 903 }
904 904
905 // If there is no poster to display, allow the media engine to render video frames as soon as 905 // If there is no poster to display, allow the media engine to render video frames as soon as
906 // they are available. 906 // they are available.
907 updateDisplayState(); 907 updateDisplayState();
(...skipping 2755 matching lines...) Expand 10 before | Expand all | Expand 10 after
3663 visitor->trace(m_error); 3663 visitor->trace(m_error);
3664 visitor->trace(m_currentSourceNode); 3664 visitor->trace(m_currentSourceNode);
3665 visitor->trace(m_nextChildNodeToConsider); 3665 visitor->trace(m_nextChildNodeToConsider);
3666 visitor->trace(m_textTracks); 3666 visitor->trace(m_textTracks);
3667 visitor->trace(m_textTracksWhenResourceSelectionBegan); 3667 visitor->trace(m_textTracksWhenResourceSelectionBegan);
3668 WillBeHeapSupplementable<HTMLMediaElement>::trace(visitor); 3668 WillBeHeapSupplementable<HTMLMediaElement>::trace(visitor);
3669 HTMLElement::trace(visitor); 3669 HTMLElement::trace(visitor);
3670 } 3670 }
3671 3671
3672 } 3672 }
OLDNEW
« no previous file with comments | « LayoutTests/media/autoplay-with-preload-none-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698