Bug 1244768 part 10 - OpenUnsupportedMediaWithExtenalAppIfNeeded() should not check whether the element is paused or not; r?jwwang, alwu draft
authorKaku Kuo <kaku@mozilla.com>
Thu, 08 Sep 2016 17:16:34 +0800
changeset 411717 71bf7c65e26b8d1af9a61084e9af75f46d438171
parent 411716 bba3f2404fda5d892222629cdc2d0b6e8041e20f
child 411718 60b9cd743db058b36c90e0e9453cbdb113d3543c
push id28959
push userbmo:kaku@mozilla.com
push dateThu, 08 Sep 2016 14:11:14 +0000
reviewersjwwang, alwu
bugs1244768
milestone51.0a1
Bug 1244768 part 10 - OpenUnsupportedMediaWithExtenalAppIfNeeded() should not check whether the element is paused or not; r?jwwang, alwu If a element is fed with unsupported content, the element should be unable to play it and so should remain paused. MozReview-Commit-ID: 1EuL7AUFILu
dom/html/HTMLMediaElement.cpp
--- a/dom/html/HTMLMediaElement.cpp
+++ b/dom/html/HTMLMediaElement.cpp
@@ -6555,21 +6555,16 @@ HTMLMediaElement::OpenUnsupportedMediaWi
   if (!Preferences::GetBool("media.openUnsupportedTypeWithExternalApp")) {
     return;
   }
 
   if (!HaveFailedWithSourceNotSupportedError()) {
     return;
   }
 
-  // If media doesn't start playing, we don't need to open it.
-  if (mPaused) {
-    return;
-  }
-
   nsContentUtils::DispatchTrustedEvent(OwnerDoc(), static_cast<nsIContent*>(this),
                                        NS_LITERAL_STRING("OpenMediaWithExternalApp"),
                                        true,
                                        true);
 }
 
 static const char* VisibilityString(Visibility aVisibility) {
   switch(aVisibility) {