Bug 1423241 - Remove screen-wakelock code that no longer has an effect. r=alwu
authorAndreas Pehrson <apehrson@mozilla.com>
Fri, 23 Nov 2018 15:01:18 +0000
changeset 507047 720f409b83f27d5c92c9194157b6f7ac65068361
parent 507046 430c57c4fb18674399b10c2d40d18f2bdca91ce3
child 507048 e93cc0185c24c792da94717583a37b28ebcd24be
push id1905
push userffxbld-merge
push dateMon, 21 Jan 2019 12:33:13 +0000
treeherdermozilla-release@c2fca1944d8c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersalwu
bugs1423241
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1423241 - Remove screen-wakelock code that no longer has an effect. r=alwu Differential Revision: https://phabricator.services.mozilla.com/D9102
dom/html/HTMLMediaElement.cpp
--- a/dom/html/HTMLMediaElement.cpp
+++ b/dom/html/HTMLMediaElement.cpp
@@ -2593,24 +2593,16 @@ HTMLMediaElement::NotifyMediaStreamTrack
   if (!mSrcStream || mSrcStream != aStream) {
     return;
   }
 
   LOG(LogLevel::Debug, ("MediaElement %p MediaStream tracks available", this));
 
   mSrcStreamTracksAvailable = true;
 
-  bool videoHasChanged = IsVideo() && HasVideo() != !VideoTracks()->IsEmpty();
-
-  if (videoHasChanged) {
-    // We are a video element and HasVideo() changed so update the screen
-    // wakelock
-    NotifyOwnerDocumentActivityChanged();
-  }
-
   FirstFrameLoaded();
   UpdateReadyStateInternal();
 }
 
 void
 HTMLMediaElement::DealWithFailedElement(nsIContent* aSourceElement)
 {
   if (mShuttingDown) {