Bug 1336400 - part2 : remove MozAutoplayEnabled attribute from HTMLMediaElement. draft
authorAlastor Wu <alwu@mozilla.com>
Mon, 13 Nov 2017 18:42:47 +0800
changeset 697107 0875dbcbaa432afd6eaf1d5e450539672b27303f
parent 697106 4c4497a42ffac32932cef0a227296cd310e402cf
child 697108 cc5008062cfa9320e95f7a4cc74d2bcb6cb52b93
push id88894
push useralwu@mozilla.com
push dateMon, 13 Nov 2017 10:44:33 +0000
bugs1336400
milestone58.0a1
Bug 1336400 - part2 : remove MozAutoplayEnabled attribute from HTMLMediaElement. MozReview-Commit-ID: FK5F2zkXRjT
dom/html/HTMLMediaElement.cpp
dom/html/HTMLMediaElement.h
dom/interfaces/html/nsIDOMHTMLMediaElement.idl
dom/webidl/HTMLMediaElement.webidl
--- a/dom/html/HTMLMediaElement.cpp
+++ b/dom/html/HTMLMediaElement.cpp
@@ -1660,23 +1660,16 @@ HTMLMediaElement::SetSrcObject(DOMMediaS
 void
 HTMLMediaElement::SetSrcObject(DOMMediaStream* aValue)
 {
   mSrcAttrStream = aValue;
   UpdateAudioChannelPlayingState();
   DoLoad();
 }
 
-NS_IMETHODIMP HTMLMediaElement::GetMozAutoplayEnabled(bool *aAutoplayEnabled)
-{
-  *aAutoplayEnabled = mAutoplayEnabled;
-
-  return NS_OK;
-}
-
 bool
 HTMLMediaElement::Ended()
 {
   return (mDecoder && mDecoder->IsEnded()) ||
          (mSrcStream && !mSrcStream->Active());
 }
 
 NS_IMETHODIMP HTMLMediaElement::GetEnded(bool* aEnded)
--- a/dom/html/HTMLMediaElement.h
+++ b/dom/html/HTMLMediaElement.h
@@ -670,21 +670,16 @@ public:
   // Returns the principal of the "top level" document; the origin displayed
   // in the URL bar of the browser window.
   already_AddRefed<nsIPrincipal> GetTopLevelPrincipal();
 
   bool ContainsRestrictedContent();
 
   void NotifyWaitingForKey() override;
 
-  bool MozAutoplayEnabled() const
-  {
-    return mAutoplayEnabled;
-  }
-
   already_AddRefed<DOMMediaStream> CaptureAudio(ErrorResult& aRv,
                                                 MediaStreamGraph* aGraph);
 
   already_AddRefed<DOMMediaStream> MozCaptureStream(ErrorResult& aRv);
 
   already_AddRefed<DOMMediaStream> MozCaptureStreamUntilEnded(ErrorResult& aRv);
 
   bool MozAudioCaptured() const
--- a/dom/interfaces/html/nsIDOMHTMLMediaElement.idl
+++ b/dom/interfaces/html/nsIDOMHTMLMediaElement.idl
@@ -57,17 +57,16 @@ interface nsIDOMHTMLMediaElement : nsISu
   readonly attribute double duration;
   readonly attribute boolean paused;
            attribute double defaultPlaybackRate;
            attribute double playbackRate;
            attribute boolean mozPreservesPitch;
   readonly attribute nsIDOMTimeRanges played;
   readonly attribute nsIDOMTimeRanges seekable;
   readonly attribute boolean ended;
-  readonly attribute boolean mozAutoplayEnabled;
            attribute boolean autoplay;
            attribute boolean loop;
   void pause();
 
   // controls
            attribute boolean controls;
            attribute double volume;
            attribute boolean muted;
--- a/dom/webidl/HTMLMediaElement.webidl
+++ b/dom/webidl/HTMLMediaElement.webidl
@@ -108,17 +108,16 @@ partial interface HTMLMediaElement {
   Promise<DOMString> mozRequestDebugInfo();
 
   [Pref="media.test.dumpDebugInfo"]
   void mozDumpDebugInfo();
 
   attribute MediaStream? srcObject;
 
   attribute boolean mozPreservesPitch;
-  readonly attribute boolean mozAutoplayEnabled;
 
   // NB: for internal use with the video controls:
   [Func="IsChromeOrXBL"] attribute boolean mozAllowCasting;
   [Func="IsChromeOrXBL"] attribute boolean mozIsCasting;
 
   // Mozilla extension: stream capture
   [Throws, UnsafeInPrerendering]
   MediaStream mozCaptureStream();