mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Bug 708169. Warn when null or no argument is passed to mozRequestAnimationFrame. r=roc
This commit is contained in:
parent
d7c7b61b9f
commit
98ad98b225
@ -75,3 +75,4 @@ DEPRECATED_OPERATION(Position)
|
||||
DEPRECATED_OPERATION(TotalSize)
|
||||
DEPRECATED_OPERATION(GlobalStorage)
|
||||
DEPRECATED_OPERATION(InputEncoding)
|
||||
DEPRECATED_OPERATION(MozBeforePaint)
|
||||
|
@ -3885,6 +3885,7 @@ nsGlobalWindow::MozRequestAnimationFrame(nsIFrameRequestCallback* aCallback,
|
||||
}
|
||||
|
||||
if (!aCallback) {
|
||||
mDoc->WarnOnceAbout(nsIDocument::eMozBeforePaint);
|
||||
return NS_ERROR_XPC_BAD_CONVERT_JS;
|
||||
}
|
||||
|
||||
|
@ -417,8 +417,9 @@ interface nsIDOMWindow : nsISupports
|
||||
*
|
||||
* @see <http://dvcs.w3.org/hg/webperf/raw-file/tip/specs/RequestAnimationFrame/Overview.html>
|
||||
*/
|
||||
// Argument is optional only so we can warn when it's null
|
||||
long
|
||||
mozRequestAnimationFrame(in nsIFrameRequestCallback aCallback);
|
||||
mozRequestAnimationFrame([optional] in nsIFrameRequestCallback aCallback);
|
||||
|
||||
/**
|
||||
* Cancel a refresh callback.
|
||||
|
@ -115,6 +115,8 @@ nsIJSONEncodeDeprecatedWarning=nsIJSON.encode is deprecated. Please use JSON.st
|
||||
nsIDOMWindowInternalWarning=Use of nsIDOMWindowInternal is deprecated. Use nsIDOMWindow instead.
|
||||
InputEncodingWarning=Use of inputEncoding is deprecated.
|
||||
GlobalStorageWarning=Use of globalStorage is deprecated. Please use localStorage instead.
|
||||
# LOCALIZATION NOTE: Do not translate "MozBeforePaint" and "mozRequestAnimationFrame"
|
||||
MozBeforePaintWarning=MozBeforePaint events are no longer supported. mozRequestAnimationFrame must be passed a non-null callback argument.
|
||||
FullScreenDeniedDisabled=Request for full-screen was denied because full-screen API is disabled by user preference.
|
||||
FullScreenDeniedPlugins=Request for full-screen was denied because a document on this page contains a windowed plugin.
|
||||
FullScreenDeniedHidden=Request for full-screen was denied because the document is no longer visible.
|
||||
|
Loading…
Reference in New Issue
Block a user