Closed Bug 704171 Opened 13 years ago Closed 13 years ago

Remove the no-argument form of requestAnimationFrame

Categories

(Core :: DOM: Core & HTML, defect)

9 Branch
x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla11

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

Details

(Keywords: addon-compat, dev-doc-complete)

Attachments

(2 files)

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.
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.
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....
Keywords: addon-compat
Keywords: dev-doc-needed
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.
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.
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!
(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.
There will absolutely be an alternate way of doing things, especially once bug 647518 is also fixed.
Depends on: 704175
Attachment #576543 - Flags: review?(roc)
Attachment #576544 - Flags: review?(roc)
Whiteboard: [need review]
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?
Attachment #576543 - Flags: review?(gavin.sharp) → review+
Depends on: 706283
Depends on: 706323
Blocks: 706528
I filed bug 706528 on cleaning up the remaining mozBeforePaint bits we have left.
Depends on: 707425
Depends on: 707913
Depends on: 707874
Depends on: 708169
Updated docs:

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

And mentioned on Firefox 11 for developers.
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: