Last Comment Bug 704171 - Remove the no-argument form of requestAnimationFrame
: Remove the no-argument form of requestAnimationFrame
Status: RESOLVED FIXED
: addon-compat, dev-doc-complete
Product: Core
Classification: Components
Component: DOM (show other bugs)
: 9 Branch
: x86 Mac OS X
: -- normal (vote)
: mozilla11
Assigned To: Boris Zbarsky [:bz]
:
Mentors:
Depends on: 707913 704175 706283 706323 707425 707874 708169
Blocks: 647518 706528
  Show dependency treegraph
 
Reported: 2011-11-21 09:01 PST by Boris Zbarsky [:bz]
Modified: 2012-02-10 12:03 PST (History)
7 users (show)
bzbarsky: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
part 1. Stop using the no-argument form of mozRequestAnimationFrame in our chrome. (19.54 KB, patch)
2011-11-23 10:36 PST, Boris Zbarsky [:bz]
gavin.sharp: review+
roc: review+
Details | Diff | Review
part 2. Remove the no-argument form of mozRequestAnimationFrame. (11.92 KB, patch)
2011-11-23 10:38 PST, Boris Zbarsky [:bz]
roc: review+
Details | Diff | Review

Description Boris Zbarsky [:bz] 2011-11-21 09:01:48 PST
It's not going to get specced, and I don't believe it's used much if at all.

Once that's done, we can work on canceling animation requests.
Comment 1 Boris Zbarsky [:bz] 2011-11-21 09:17:37 PST
https://mxr.mozilla.org/addons/search?string=requestAnimationFrame%28%29 says there are 4 addons using the no-argument form at the moment....  Could we proactively contact those?

Looks like in one of the 4 this lives in a test; the other 3 use the same animation manager library.
Comment 2 Boris Zbarsky [:bz] 2011-11-21 09:19:12 PST
I guess the other option is to not do this removal and instead just implement the unprefixed version without this capability (to deal with that library specifically), but then we have two different code paths and so forth....
Comment 3 Boris Zbarsky [:bz] 2011-11-21 10:37:15 PST
Looks like converting our existing consumers here will be simpler once bug 647518 is fixed.... but fixing that bug is simpler if the code in this bug is gone first.  So I'm going to do this first, then add cancelation, then go back and simplify the code here.
Comment 4 Jorge Villalobos [:jorgev] 2011-11-22 09:27:47 PST
The Add-ons MXR isn't very reliable at the moment, so we should follow the normal validation -> compat bump process. I can request validation to be added for this when it hits the Aurora channel.
Comment 5 Boris Zbarsky [:bz] 2011-11-22 09:30:53 PST
Well, if we have something more reliable, can we do that check, please?  If there's a significant number of addons affected, I can change the implementation strategy to mitigate the compat impact, possibly, but it would be good to know that now and not in January!
Comment 6 Jorge Villalobos [:jorgev] 2011-11-22 10:28:04 PST
(In reply to Boris Zbarsky (:bz) from comment #5)
> Well, if we have something more reliable

We don't. I've been trying to get the Add-ons MXR fixed on bug 663885, but it's taking a long time.

> If there's a significant number of addons affected, I can change the
> implementation strategy to mitigate the compat impact, possibly.

I doubt many add-ons use this function. If there are more than the ones brought up by MXR, they shouldn't be more than a handful.

Detecting a function call with no arguments is something we can easily do with our compatibility validation. So, if developers have an alternate way to do what they've been doing thus far, I say go for it.
Comment 7 Boris Zbarsky [:bz] 2011-11-22 14:38:42 PST
There will absolutely be an alternate way of doing things, especially once bug 647518 is also fixed.
Comment 8 Boris Zbarsky [:bz] 2011-11-23 10:36:59 PST
Created attachment 576543 [details] [diff] [review]
part 1.  Stop using the no-argument form of mozRequestAnimationFrame in our chrome.
Comment 9 Boris Zbarsky [:bz] 2011-11-23 10:38:36 PST
Created attachment 576544 [details] [diff] [review]
part 2.  Remove the no-argument form of mozRequestAnimationFrame.
Comment 10 :Gavin Sharp [email: gavin@gavinsharp.com] 2011-11-23 12:53:02 PST
Comment on attachment 576543 [details] [diff] [review]
part 1.  Stop using the no-argument form of mozRequestAnimationFrame in our chrome.

>diff --git a/layout/base/tests/test_bug607529.html b/layout/base/tests/test_bug607529.html

>-  var eventsHappening = false;
>   var callbacksHappening = false;

callbacksHappening can also be removed.

>diff --git a/toolkit/content/widgets/browser.xml b/toolkit/content/widgets/browser.xml

>+      <method name="sample">

Add a "nsIFrameRequestCallback implementation" comment right above this?
Comment 13 Boris Zbarsky [:bz] 2011-11-30 09:37:50 PST
I filed bug 706528 on cleaning up the remaining mozBeforePaint bits we have left.
Comment 14 Eric Shepherd [:sheppy] 2012-02-10 12:03:45 PST
Updated docs:

https://developer.mozilla.org/en/DOM/window.requestAnimationFrame

And mentioned on Firefox 11 for developers.

Note You need to log in before you can comment on or make changes to this bug.