Bug 1531101 - Fire UAWidget setup / change events when starting or stopping a visual clone of a <video> element. r=jya
☠☠ backed out by b9b0378c5e0b ☠ ☠
authorMike Conley <mconley@mozilla.com>
Fri, 08 Mar 2019 15:48:38 +0000
changeset 524441 5887b55233c2695f8ee05826303abae9e34d7652
parent 524440 13a0c61ed4fcc2383ad2ca20f352ce6b43f85904
child 524442 12bcda2d76db12ba1a1f05b48d6f71484561c600
push id2032
push userffxbld-merge
push dateMon, 13 May 2019 09:36:57 +0000
treeherdermozilla-release@455c1065dcbe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjya
bugs1531101
milestone67.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 1531101 - Fire UAWidget setup / change events when starting or stopping a visual clone of a <video> element. r=jya Differential Revision: https://phabricator.services.mozilla.com/D22161
dom/html/HTMLVideoElement.cpp
--- a/dom/html/HTMLVideoElement.cpp
+++ b/dom/html/HTMLVideoElement.cpp
@@ -476,16 +476,20 @@ void HTMLVideoElement::CloneElementVisua
   if (!aTargetVideo.SetVisualCloneSource(this)) {
     mVisualCloneTarget = nullptr;
     rv.Throw(NS_ERROR_FAILURE);
     return;
   }
 
   aTargetVideo.SetMediaInfo(mMediaInfo);
 
+  if (IsInComposedDoc()) {
+    NotifyUAWidgetSetupOrChange();
+  }
+
   MaybeBeginCloningVisually();
 }
 
 void HTMLVideoElement::StopCloningElementVisually() {
   if (mVisualCloneTarget) {
     EndCloningVisually();
   }
 }
@@ -527,12 +531,16 @@ void HTMLVideoElement::EndCloningVisuall
     if (container && mVisualCloneTarget->mSelectedVideoStreamTrack) {
       mVisualCloneTarget->mSelectedVideoStreamTrack->RemoveVideoOutput(
           container);
     }
   }
 
   Unused << mVisualCloneTarget->SetVisualCloneSource(nullptr);
   Unused << SetVisualCloneTarget(nullptr);
+
+  if (IsInComposedDoc()) {
+    NotifyUAWidgetSetupOrChange();
+  }
 }
 
 }  // namespace dom
 }  // namespace mozilla