Bug 1588980 - Part 2: Remove the deprecation warning for HTMLCanvasElement.mozGetAsFile; r=bzbarsky
authorEhsan Akhgari <ehsan@mozilla.com>
Mon, 20 Jan 2020 22:02:59 +0000
changeset 510862 56abaef4b06ce2d1f4a7abd560e170c575ae6e22
parent 510861 1bc3480b67aac938a45e83284497b6841d15b43a
child 510863 4e6ef0abad2320029f53b5307819b412a6aa9959
push id37037
push userdvarga@mozilla.com
push dateTue, 21 Jan 2020 04:07:49 +0000
treeherdermozilla-central@f74adc43b654 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbzbarsky
bugs1588980
milestone74.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 1588980 - Part 2: Remove the deprecation warning for HTMLCanvasElement.mozGetAsFile; r=bzbarsky Differential Revision: https://phabricator.services.mozilla.com/D60284
dom/base/nsDeprecatedOperationList.h
dom/html/HTMLCanvasElement.cpp
dom/locales/en-US/chrome/dom/dom.properties
--- a/dom/base/nsDeprecatedOperationList.h
+++ b/dom/base/nsDeprecatedOperationList.h
@@ -9,17 +9,16 @@
  * This file contains the list of deprecated DOM operations.  It is
  * designed to be used as input to the C preprocessor *only*.
  */
 
 DEPRECATED_OPERATION(MutationEvent)
 DEPRECATED_OPERATION(Components)
 DEPRECATED_OPERATION(NodeIteratorDetach)
 DEPRECATED_OPERATION(LenientThis)
-DEPRECATED_OPERATION(MozGetAsFile)
 DEPRECATED_OPERATION(UseOfCaptureEvents)
 DEPRECATED_OPERATION(UseOfReleaseEvents)
 DEPRECATED_OPERATION(SyncXMLHttpRequest)
 DEPRECATED_OPERATION(Window_Cc_ontrollers)
 DEPRECATED_OPERATION(ImportXULIntoContent)
 DEPRECATED_OPERATION(NavigatorGetUserMedia)
 DEPRECATED_OPERATION(WebrtcDeprecatedPrefix)
 DEPRECATED_OPERATION(RTCPeerConnectionGetStreams)
--- a/dom/html/HTMLCanvasElement.cpp
+++ b/dom/html/HTMLCanvasElement.cpp
@@ -845,18 +845,16 @@ OffscreenCanvas* HTMLCanvasElement::Tran
   }
 
   return mOffscreenCanvas;
 }
 
 already_AddRefed<File> HTMLCanvasElement::MozGetAsFile(
     const nsAString& aName, const nsAString& aType,
     nsIPrincipal& aSubjectPrincipal, ErrorResult& aRv) {
-  OwnerDoc()->WarnOnceAbout(Document::eMozGetAsFile);
-
   // do a trust check if this is a write-only canvas
   if (mWriteOnly && !aSubjectPrincipal.IsSystemPrincipal()) {
     aRv.Throw(NS_ERROR_DOM_SECURITY_ERR);
     return nullptr;
   }
 
   RefPtr<File> file;
   aRv = MozGetAsFileImpl(aName, aType, aSubjectPrincipal, getter_AddRefs(file));
--- a/dom/locales/en-US/chrome/dom/dom.properties
+++ b/dom/locales/en-US/chrome/dom/dom.properties
@@ -149,18 +149,16 @@ ComponentsWarning=The Components object 
 PluginHangUITitle=Warning: Unresponsive plugin
 PluginHangUIMessage=%S may be busy, or it may have stopped responding. You can stop the plugin now, or you can continue to see if the plugin will complete.
 PluginHangUIWaitButton=Continue
 PluginHangUIStopButton=Stop plugin
 # LOCALIZATION NOTE: Do not translate "NodeIterator" or "detach()".
 NodeIteratorDetachWarning=Calling detach() on a NodeIterator no longer has an effect.
 # LOCALIZATION NOTE: Do not translate "LenientThis" and "this"
 LenientThisWarning=Ignoring get or set of property that has [LenientThis] because the “this” object is incorrect.
-# LOCALIZATION NOTE: Do not translate "mozGetAsFile" or "toBlob"
-MozGetAsFileWarning=The non-standard mozGetAsFile method is deprecated and will soon be removed.  Use the standard toBlob method instead.
 # LOCALIZATION NOTE: Do not translate "captureEvents()" or "addEventListener()"
 UseOfCaptureEventsWarning=Use of captureEvents() is deprecated. To upgrade your code, use the DOM 2 addEventListener() method. For more help http://developer.mozilla.org/en/docs/DOM:element.addEventListener
 # LOCALIZATION NOTE: Do not translate "releaseEvents()" or "removeEventListener()"
 UseOfReleaseEventsWarning=Use of releaseEvents() is deprecated. To upgrade your code, use the DOM 2 removeEventListener() method. For more help http://developer.mozilla.org/en/docs/DOM:element.removeEventListener
 # LOCALIZATION NOTE: Do not translate "XMLHttpRequest"
 SyncXMLHttpRequestWarning=Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user’s experience. For more help http://xhr.spec.whatwg.org/
 # LOCALIZATION NOTE: Do not translate "window.controllers/Controllers"
 Window_Cc_ontrollersWarning=window.controllers/Controllers is deprecated. Do not use it for UA detection.