RESOLVED FIXED 29942
Add functionality to pause/throttle CSS transitions/animations in a WebView
https://bugs.webkit.org/show_bug.cgi?id=29942
Summary Add functionality to pause/throttle CSS transitions/animations in a WebView
Chris Marrin
Reported 2009-09-30 17:43:12 PDT
In Radar 7195870 We need an API in WebView to suspend and resume all animations in a page. This is needed for apps that want to reduce animation overhead when the page is not visible, for instance.
Attachments
Patch (3.55 KB, patch)
2009-09-30 17:46 PDT, Chris Marrin
mrowe: review-
Replacement patch (3.37 KB, patch)
2009-10-01 08:32 PDT, Chris Marrin
no flags
Replacement patch (4.84 KB, patch)
2009-10-02 09:34 PDT, Chris Marrin
adele: review+
Chris Marrin
Comment 1 2009-09-30 17:46:19 PDT
Created attachment 40412 [details] Patch I've added this as API for now. But it can be changed to SPI if needed. Seems like a reasonable thing to have as API though.
Mark Rowe (bdash)
Comment 2 2009-09-30 17:54:53 PDT
This should be added as SPI until it can be sent through API review.
Mark Rowe (bdash)
Comment 3 2009-09-30 17:58:04 PDT
Comment on attachment 40412 [details] Patch Marking r- per the need to make this SPI rather than API. The method name here refers to "animations" in general while the implementation only affects CSS animations. Should it also pause animated images, etc?
Chris Marrin
Comment 4 2009-10-01 08:32:44 PDT
Created attachment 40443 [details] Replacement patch Replacement patch, moving new call to SPI and renaming to setCSSAnimationsSuspended to better describe what it is doing.
Mark Rowe (bdash)
Comment 5 2009-10-01 15:42:53 PDT
This looks fine, but having a setter without a getter is odd. Is there some reason why a getter would not be appropriate here?
Chris Marrin
Comment 6 2009-10-02 09:34:26 PDT
Created attachment 40528 [details] Replacement patch Added both a getter and setter
Chris Marrin
Comment 7 2009-10-05 13:47:18 PDT
Sending WebCore/ChangeLog Sending WebCore/WebCore.base.exp Sending WebKit/mac/ChangeLog Sending WebKit/mac/WebView/WebView.mm Sending WebKit/mac/WebView/WebViewData.h Sending WebKit/mac/WebView/WebViewData.mm Sending WebKit/mac/WebView/WebViewPrivate.h Transmitting file data ....... Committed revision 49111.
Note You need to log in before you can comment on or make changes to this bug.