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.
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.
This should be added as SPI until it can be sent through API review.
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?
Created attachment 40443 [details] Replacement patch Replacement patch, moving new call to SPI and renaming to setCSSAnimationsSuspended to better describe what it is doing.
This looks fine, but having a setter without a getter is odd. Is there some reason why a getter would not be appropriate here?
Created attachment 40528 [details] Replacement patch Added both a getter and setter
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.