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

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

Issue 1809023003: Measure the impact of a proposed media element load algorithm change (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
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 777 matching lines...) Expand 10 before | Expand all | Expand 10 after
788 // FIXME: Add support for firing this event. 788 // FIXME: Add support for firing this event.
789 789
790 // 4.8 - Set the initial playback position to 0. 790 // 4.8 - Set the initial playback position to 0.
791 // FIXME: Make this less subtle. The position only becomes 0 because the ready state is HAVE_NOTHING. 791 // FIXME: Make this less subtle. The position only becomes 0 because the ready state is HAVE_NOTHING.
792 invalidateCachedTime(); 792 invalidateCachedTime();
793 793
794 // 4.9 - Set the timeline offset to Not-a-Number (NaN). 794 // 4.9 - Set the timeline offset to Not-a-Number (NaN).
795 // 4.10 - Update the duration attribute to Not-a-Number (NaN). 795 // 4.10 - Update the duration attribute to Not-a-Number (NaN).
796 796
797 cueTimeline().updateActiveCues(0); 797 cueTimeline().updateActiveCues(0);
798 } else if (!m_paused) {
799 // TODO(philipj): There is a proposal to always reset the paused state
800 // in the media element load algorithm, to avoid a bogus play() promise
801 // rejection: https://github.com/whatwg/html/issues/869
802 // This is where that change would have an effect, and it is measured to
803 // verify the assumption that it's a very rare situation.
804 UseCounter::count(document(), UseCounter::HTMLMediaElementLoadNetworkEmp tyNotPaused);
798 } 805 }
799 806
800 // 5 - Set the playbackRate attribute to the value of the defaultPlaybackRat e attribute. 807 // 5 - Set the playbackRate attribute to the value of the defaultPlaybackRat e attribute.
801 setPlaybackRate(defaultPlaybackRate()); 808 setPlaybackRate(defaultPlaybackRate());
802 809
803 // 6 - Set the error attribute to null and the autoplaying flag to true. 810 // 6 - Set the error attribute to null and the autoplaying flag to true.
804 m_error = nullptr; 811 m_error = nullptr;
805 m_autoplaying = true; 812 m_autoplaying = true;
806 813
807 // 7 - Invoke the media element's resource selection algorithm. 814 // 7 - Invoke the media element's resource selection algorithm.
(...skipping 2996 matching lines...) Expand 10 before | Expand all | Expand 10 after
3804 { 3811 {
3805 visitor->trace(m_client); 3812 visitor->trace(m_client);
3806 } 3813 }
3807 3814
3808 DEFINE_TRACE(HTMLMediaElement::AudioSourceProviderImpl) 3815 DEFINE_TRACE(HTMLMediaElement::AudioSourceProviderImpl)
3809 { 3816 {
3810 visitor->trace(m_client); 3817 visitor->trace(m_client);
3811 } 3818 }
3812 3819
3813 } // namespace blink 3820 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/UseCounter.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698