RESOLVED FIXED99116
[RequestAnimationFrame] Remove vendor prefix
https://bugs.webkit.org/show_bug.cgi?id=99116
Summary [RequestAnimationFrame] Remove vendor prefix
James Simonsen
Reported 2012-10-11 16:32:20 PDT
[RequestAnimationFrame] Remove vendor prefix
Attachments
Patch (23.09 KB, patch)
2012-10-11 16:33 PDT, James Simonsen
no flags
Patch (23.50 KB, patch)
2012-10-12 10:40 PDT, James Simonsen
no flags
Patch (24.14 KB, patch)
2012-10-12 11:54 PDT, James Simonsen
no flags
Patch for landing (24.22 KB, patch)
2012-10-12 12:09 PDT, James Simonsen
no flags
James Simonsen
Comment 1 2012-10-11 16:33:08 PDT
James Robinson
Comment 2 2012-10-11 16:36:50 PDT
Comment on attachment 168312 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=168312&action=review R=me > Source/WebCore/page/DOMWindow.idl:218 > // WebKit animation extensions, being standardized in the WebPerf WG probably worth updating this comment
Adam Barth
Comment 3 2012-10-11 16:38:08 PDT
Comment on attachment 168312 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=168312&action=review > Source/WebCore/page/DOMWindow.idl:-221 > - long webkitRequestAnimationFrame(in [Callback] RequestAnimationFrameCallback callback); > - void webkitCancelAnimationFrame(in long id); > - void webkitCancelRequestAnimationFrame(in long id); // This is a deprecated alias for webkitCancelAnimationFrame(). Remove this when removing vendor prefix. Do we want to expose both sets of APIs for a while?
Adam Barth
Comment 4 2012-10-11 16:39:46 PDT
Comment on attachment 168312 [details] Patch This patch seems a bit aggressive for this API. Have we measured the usage of the prefixed versions? Will this patch break sites?
Adam Barth
Comment 5 2012-10-11 16:40:35 PDT
IMHO, we should expose both versions for a while and use V8MeasureAs to measure how quickly web sites are transitioning from the prefixed to the unprefixed versions.
Adam Barth
Comment 6 2012-10-11 16:43:38 PDT
See http://lists.webkit.org/pipermail/webkit-dev/2012-September/022239.html for instructions about how to use V8MeasureAs and FeatureObserver.
James Simonsen
Comment 7 2012-10-11 16:54:38 PDT
There were a couple of reasons for making the transition. 1. Everyone else is already (or in the process of) shipping unprefixed. 2. We've changed our semantics to match the spec. So the old webkit* functions aren't compatible. 3. The major toolkits I checked already use the unprefixed version.
Adam Barth
Comment 8 2012-10-11 16:58:09 PDT
Would you be willing to email webkit-dev with this information? Different folks in the community have different risk tolerances for these sorts of changes, and it's better to talk things through so that folks don't feel railroaded in one direction or another. Here's a wiki page we wrote up based on previous discussions of similar changes: https://trac.webkit.org/wiki/DeprecatingFeatures
James Simonsen
Comment 9 2012-10-12 10:40:02 PDT
Adam Barth
Comment 10 2012-10-12 11:36:54 PDT
Comment on attachment 168445 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=168445&action=review > Source/WebCore/page/DOMWindow.h:270 > + void webkitCancelAnimationFrame(int id) { cancelAnimationFrame(id); } > + void webkitCancelRequestAnimationFrame(int id) { cancelAnimationFrame(id); } You can just use ImplementedAs in the IDL rather than having these stub functions here. > Source/WebCore/page/DOMWindow.idl:216 > + // W3C Web Performance WG Request Animation Frame standard. I would skip this comment. It's not adding any information. > Source/WebCore/page/DOMWindow.idl:221 > + long requestAnimationFrame(in [Callback] RequestAnimationFrameCallback callback); > + void cancelAnimationFrame(in long id); > long webkitRequestAnimationFrame(in [Callback] RequestAnimationFrameCallback callback); > void webkitCancelAnimationFrame(in long id); > void webkitCancelRequestAnimationFrame(in long id); // This is a deprecated alias for webkitCancelAnimationFrame(). Remove this when removing vendor prefix. Please add V8MeasureAs attributes so that we can measure how often the prefixed versions are used. That way we'll know have more information about when we can remove them.
James Simonsen
Comment 11 2012-10-12 11:54:00 PDT
Adam Barth
Comment 12 2012-10-12 12:02:00 PDT
Comment on attachment 168457 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=168457&action=review > Source/WebCore/page/DOMWindow.idl:220 > + long requestAnimationFrame(in [Callback] RequestAnimationFrameCallback callback); > + void cancelAnimationFrame(in long id); > + [ImplementedAs=requestAnimationFrame, V8MeasureAs=PrefixedRequestAnimationFrame] long webkitRequestAnimationFrame(in [Callback] RequestAnimationFrameCallback callback); > + [ImplementedAs=cancelAnimationFrame] void webkitCancelAnimationFrame(in long id); > + [ImplementedAs=cancelAnimationFrame] void webkitCancelRequestAnimationFrame(in long id); // This is a deprecated alias for webkitCancelAnimationFrame(). Remove this when removing vendor prefix. Should we measure the unprefixed one as well, so we can compare, like we do for IndexedDB?
James Simonsen
Comment 13 2012-10-12 12:09:33 PDT
Created attachment 168460 [details] Patch for landing
WebKit Review Bot
Comment 14 2012-10-12 12:48:38 PDT
Comment on attachment 168460 [details] Patch for landing Clearing flags on attachment: 168460 Committed r131214: <http://trac.webkit.org/changeset/131214>
WebKit Review Bot
Comment 15 2012-10-12 12:48:41 PDT
All reviewed patches have been landed. Closing bug.
Pablo Flouret
Comment 16 2012-10-12 14:52:30 PDT
Adam Barth
Comment 17 2012-10-12 14:58:00 PDT
Sounds like the CPP bindings need to understand ImplementedAs. DerivedSources/webkit/WebKitDOMDOMWindow.cpp: In function 'void webkit_dom_dom_window_webkit_cancel_animation_frame(WebKitDOMDOMWindow*, glong)': DerivedSources/webkit/WebKitDOMDOMWindow.cpp:1116:11: error: 'class WebCore::DOMWindow' has no member named 'webkitCancelAnimationFrame' DerivedSources/webkit/WebKitDOMDOMWindow.cpp: In function 'void webkit_dom_dom_window_webkit_cancel_request_animation_frame(WebKitDOMDOMWindow*, glong)': DerivedSources/webkit/WebKitDOMDOMWindow.cpp:1125:11: error: 'class WebCore::DOMWindow' has no member named 'webkitCancelRequestAnimationFrame'
James Simonsen
Comment 18 2012-10-12 15:53:28 PDT
(In reply to comment #17) > Sounds like the CPP bindings need to understand ImplementedAs. Is someone going to do that or should I go back to the old way of forwarding?
Pablo Flouret
Comment 19 2012-10-12 15:54:24 PDT
(In reply to comment #18) > (In reply to comment #17) > > Sounds like the CPP bindings need to understand ImplementedAs. > > Is someone going to do that or should I go back to the old way of forwarding? I have a patch almost ready. Filed bug 99214.
Simon Fraser (smfr)
Comment 20 2012-10-12 16:59:58 PDT
The changelog and commit message don't say if the prefixed version was retained. Consensus on webkit-dev was to keep both prefixed and unprefixed.
Simon Fraser (smfr)
Comment 21 2012-10-12 17:01:43 PDT
This patch should have been r- because of the lack of details in the changlog.
Adam Barth
Comment 22 2012-10-12 17:06:35 PDT
> This patch should have been r- because of the lack of details in the changlog. Thanks for the reminder. I was somewhat distracted today with other disasters. The code in the patch should be correct, however.
Note You need to log in before you can comment on or make changes to this bug.