Bug 710981. Add the new name for cancelAnimationFrame. r=roc

This commit is contained in:
Boris Zbarsky 2011-12-15 08:53:06 -05:00
parent 98ad98b225
commit 047b6669c7
4 changed files with 13 additions and 5 deletions

View File

@ -37,7 +37,7 @@ function checker() {
}
}
window.mozRequestAnimationFrame(checker);
window.mozCancelRequestAnimationFrame(handle1);
window.mozCancelAnimationFrame(handle1);
</script>
</pre>

View File

@ -3895,7 +3895,13 @@ nsGlobalWindow::MozRequestAnimationFrame(nsIFrameRequestCallback* aCallback,
NS_IMETHODIMP
nsGlobalWindow::MozCancelRequestAnimationFrame(PRInt32 aHandle)
{
FORWARD_TO_INNER(MozCancelRequestAnimationFrame, (aHandle),
return MozCancelAnimationFrame(aHandle);
}
NS_IMETHODIMP
nsGlobalWindow::MozCancelAnimationFrame(PRInt32 aHandle)
{
FORWARD_TO_INNER(MozCancelAnimationFrame, (aHandle),
NS_ERROR_NOT_INITIALIZED);
if (!mDoc) {

View File

@ -70,7 +70,7 @@ interface nsIDOMMozURLProperty : nsISupports
* @see <http://www.whatwg.org/html/#window>
*/
[scriptable, uuid(973e7219-40d5-4f94-b78d-53c2a0b8a13c)]
[scriptable, uuid(f6e3b10d-d5f4-4fcd-aa4c-5f98626d428a)]
interface nsIDOMWindow : nsISupports
{
// the current browsing context
@ -424,6 +424,8 @@ interface nsIDOMWindow : nsISupports
/**
* Cancel a refresh callback.
*/
void mozCancelAnimationFrame(in long aHandle);
// Backwards-compat shim for now to make Google maps work
void mozCancelRequestAnimationFrame(in long aHandle);
/**

View File

@ -283,7 +283,7 @@
this.requestHandle = window.mozRequestAnimationFrame(this);
},
stop: function scrollAnim_stop() {
window.mozCancelRequestAnimationFrame(this.requestHandle);
window.mozCancelAnimationFrame(this.requestHandle);
this.requestHandle = 0;
},
sample: function scrollAnim_handleEvent(timeStamp) {
@ -648,7 +648,7 @@
this.requestHandle = window.mozRequestAnimationFrame(this);
},
stop: function arrowSmoothScroll_stop() {
window.mozCancelRequestAnimationFrame(this.requestHandle);
window.mozCancelAnimationFrame(this.requestHandle);
this.requestHandle = 0;
},
sample: function arrowSmoothScroll_handleEvent(timeStamp) {