Bug 803612 - Add deprecation warnings for mozGetAsFile. r=sicking

This commit is contained in:
Kyle Huey 2013-08-12 13:26:31 -04:00
parent 58faa3bd18
commit 2062f4e9b4
3 changed files with 5 additions and 0 deletions

View File

@ -32,3 +32,4 @@ DEPRECATED_OPERATION(MozAudioData)
DEPRECATED_OPERATION(LenientThis)
DEPRECATED_OPERATION(GetPreventDefault)
DEPRECATED_OPERATION(GetSetUserData)
DEPRECATED_OPERATION(MozGetAsFile)

View File

@ -653,6 +653,8 @@ HTMLCanvasElement::MozGetAsFile(const nsAString& aName,
const nsAString& aType,
nsIDOMFile** aResult)
{
OwnerDoc()->WarnOnceAbout(nsIDocument::eMozGetAsFile);
// do a trust check if this is a write-only canvas
if ((mWriteOnly) &&
!nsContentUtils::IsCallerChrome()) {

View File

@ -135,3 +135,5 @@ GetWindowWithOuterIdWarning=Use of nsIDOMWindowUtils.getOuterWindowWithId() is d
GetPreventDefaultWarning=Use of getPreventDefault() is deprecated. Use defaultPrevented instead.
# LOCALIZATION NOTE: Do not translate "getUserData", "setUserData", "WeakMap", or "element.dataset".
GetSetUserDataWarning=Use of getUserData() or setUserData() is deprecated. Use WeakMap or element.dataset instead.
# 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.