Bug 29942 - Add functionality to pause/throttle CSS transitions/animations in a WebView
Summary: Add functionality to pause/throttle CSS transitions/animations in a WebView
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit API (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Chris Marrin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-30 17:43 PDT by Chris Marrin
Modified: 2009-10-05 13:47 PDT (History)
2 users (show)

See Also:


Attachments
Patch (3.55 KB, patch)
2009-09-30 17:46 PDT, Chris Marrin
mrowe: review-
Details | Formatted Diff | Diff
Replacement patch (3.37 KB, patch)
2009-10-01 08:32 PDT, Chris Marrin
no flags Details | Formatted Diff | Diff
Replacement patch (4.84 KB, patch)
2009-10-02 09:34 PDT, Chris Marrin
adele: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Marrin 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.
Comment 1 Chris Marrin 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.
Comment 2 Mark Rowe (bdash) 2009-09-30 17:54:53 PDT
This should be added as SPI until it can be sent through API review.
Comment 3 Mark Rowe (bdash) 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?
Comment 4 Chris Marrin 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.
Comment 5 Mark Rowe (bdash) 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?
Comment 6 Chris Marrin 2009-10-02 09:34:26 PDT
Created attachment 40528 [details]
Replacement patch

Added both a getter and setter
Comment 7 Chris Marrin 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.