Bug 1471013: Make MozAutoplayMediaBlocked chrome-only. r=smaug
authorEmilio Cobos Álvarez <emilio@crisal.io>
Tue, 26 Jun 2018 22:19:19 +0200
changeset 423849 da330de85dbcff5a217b888f0a102bc5f55fa27d
parent 423848 0800fdb509d2025d309ab23e67c305705d52282f
child 423850 65df1f8bb3cb7c95cadc91b542c1a8b9c11309ac
push id104675
push useremilio@crisal.io
push dateWed, 27 Jun 2018 09:24:30 +0000
treeherdermozilla-inbound@da330de85dbc [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1471013
milestone63.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 1471013: Make MozAutoplayMediaBlocked chrome-only. r=smaug Summary: MozReview-Commit-ID: JVLMpCeMkAs Reviewers: smaug Tags: #secure-revision Bug #: 1471013 Differential Revision: https://phabricator.services.mozilla.com/D1840 MozReview-Commit-ID: 2he7tHFbZ8t
dom/html/HTMLMediaElement.cpp
--- a/dom/html/HTMLMediaElement.cpp
+++ b/dom/html/HTMLMediaElement.cpp
@@ -6953,18 +6953,17 @@ HTMLMediaElement::UpdateAudioChannelPlay
   }
 }
 
 bool
 HTMLMediaElement::IsAllowedToPlay()
 {
   if (!AutoplayPolicy::IsMediaElementAllowedToPlay(WrapNotNull(this))) {
 #if defined(MOZ_WIDGET_ANDROID)
-    // FIXME: This should be chrome-only.
-    nsContentUtils::DispatchTrustedEvent(
+    nsContentUtils::DispatchChromeEvent(
       OwnerDoc(),
       static_cast<nsIContent*>(this),
       NS_LITERAL_STRING("MozAutoplayMediaBlocked"),
       CanBubble::eNo,
       Cancelable::eNo);
 #endif
     LOG(LogLevel::Debug,
         ("%p %s AutoplayPolicy blocked autoplay.", this, __func__));