зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1685399 - part1 : remove `mCurrentLoadPlayTime`. r=padenot
`mCurrentLoadPlayTime` was added in [1], which is no longer in use, so we should remove it. [1] https://phabricator.services.mozilla.com/D18628 Differential Revision: https://phabricator.services.mozilla.com/D101106
This commit is contained in:
Родитель
c30efd3e32
Коммит
45f3985c1e
|
@ -2339,7 +2339,6 @@ void HTMLMediaElement::AbortExistingLoads() {
|
|||
|
||||
mEventDeliveryPaused = false;
|
||||
mPendingEvents.Clear();
|
||||
mCurrentLoadPlayTime.Reset();
|
||||
|
||||
AssertReadyStateIsNothing();
|
||||
}
|
||||
|
@ -6344,17 +6343,14 @@ void HTMLMediaElement::DispatchAsyncEvent(const nsAString& aName) {
|
|||
|
||||
if ((aName.EqualsLiteral("play") || aName.EqualsLiteral("playing"))) {
|
||||
mPlayTime.Start();
|
||||
mCurrentLoadPlayTime.Start();
|
||||
if (IsHidden()) {
|
||||
HiddenVideoStart();
|
||||
}
|
||||
} else if (aName.EqualsLiteral("waiting")) {
|
||||
mPlayTime.Pause();
|
||||
mCurrentLoadPlayTime.Pause();
|
||||
HiddenVideoStop();
|
||||
} else if (aName.EqualsLiteral("pause")) {
|
||||
mPlayTime.Pause();
|
||||
mCurrentLoadPlayTime.Pause();
|
||||
HiddenVideoStop();
|
||||
}
|
||||
}
|
||||
|
@ -6492,7 +6488,6 @@ void HTMLMediaElement::SuspendOrResumeElement(bool aSuspendElement) {
|
|||
UpdateAudioChannelPlayingState();
|
||||
|
||||
if (aSuspendElement) {
|
||||
mCurrentLoadPlayTime.Pause();
|
||||
ReportTelemetry();
|
||||
|
||||
if (mDecoder) {
|
||||
|
@ -6505,9 +6500,6 @@ void HTMLMediaElement::SuspendOrResumeElement(bool aSuspendElement) {
|
|||
ClearResumeDelayedMediaPlaybackAgentIfNeeded();
|
||||
mMediaControlKeyListener->StopIfNeeded();
|
||||
} else {
|
||||
if (!mPaused) {
|
||||
mCurrentLoadPlayTime.Start();
|
||||
}
|
||||
if (mDecoder) {
|
||||
mDecoder->Resume();
|
||||
if (!mPaused && !mDecoder->IsEnded()) {
|
||||
|
|
|
@ -1842,11 +1842,6 @@ class HTMLMediaElement : public nsGenericHTMLElement,
|
|||
// Total time a video has (or would have) spent in video-decode-suspend mode.
|
||||
TimeDurationAccumulator mVideoDecodeSuspendTime;
|
||||
|
||||
// Total time a video has spent playing on the current load, it would be reset
|
||||
// when media aborts the current load; be paused when the docuemt enters the
|
||||
// bf-cache and be resumed when the docuemt leaves the bf-cache.
|
||||
TimeDurationAccumulator mCurrentLoadPlayTime;
|
||||
|
||||
// True if Init() has been called after construction
|
||||
bool mInitialized = false;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче