Merge mozilla-central to autoland. a=merge CLOSED TREE

This commit is contained in:
Brindusan Cristian
2018-04-17 13:09:40 +03:00
106 changed files with 1166 additions and 788 deletions

View File

@@ -13,13 +13,14 @@
#include "mozilla/dom/PlayPromise.h"
#include "mozilla/dom/Promise.h"
#include "mozilla/ArrayUtils.h"
#include "mozilla/NotNull.h"
#include "mozilla/MathAlgorithms.h"
#include "mozilla/AsyncEventDispatcher.h"
#include "mozilla/dom/MediaEncryptedEvent.h"
#include "mozilla/EMEUtils.h"
#include "mozilla/EventDispatcher.h"
#include "mozilla/NotNull.h"
#include "mozilla/MathAlgorithms.h"
#include "mozilla/Sprintf.h"
#include "mozilla/StaticPrefs.h"
#include "AutoplayPolicy.h"
#include "base/basictypes.h"
@@ -54,7 +55,6 @@
#include "nsITimer.h"
#include "MediaError.h"
#include "MediaPrefs.h"
#include "MediaResource.h"
#include "nsICategoryManager.h"
@@ -4472,7 +4472,8 @@ void HTMLMediaElement::HiddenVideoStart()
}
NS_NewTimerWithFuncCallback(getter_AddRefs(mVideoDecodeSuspendTimer),
VideoDecodeSuspendTimerCallback, this,
MediaPrefs::MDSMSuspendBackgroundVideoDelay(), nsITimer::TYPE_ONE_SHOT,
StaticPrefs::MediaSuspendBkgndVideoDelayMs(),
nsITimer::TYPE_ONE_SHOT,
"HTMLMediaElement::VideoDecodeSuspendTimerCallback",
mMainThreadEventTarget);
}
@@ -4644,7 +4645,8 @@ HTMLMediaElement::ReportTelemetry()
// Here, we have played *some* of the video, but didn't get more than 1
// keyframe. Report '0' if we have played for longer than the video-
// decode-suspend delay (showing recovery would be difficult).
uint32_t suspendDelay_ms = MediaPrefs::MDSMSuspendBackgroundVideoDelay();
uint32_t suspendDelay_ms =
StaticPrefs::MediaSuspendBkgndVideoDelayMs();
if (uint32_t(playTime * 1000.0) > suspendDelay_ms) {
Telemetry::Accumulate(Telemetry::VIDEO_INTER_KEYFRAME_MAX_MS,
key,