Title: [139800] trunk/Source/WebCore
- Revision
- 139800
- Author
- bda...@apple.com
- Date
- 2013-01-15 15:43:27 -0800 (Tue, 15 Jan 2013)
Log Message
https://bugs.webkit.org/show_bug.cgi?id=106940
Suspend CSS animations for background tabs
Reviewed by Simon Fraser.
* page/Page.cpp:
(WebCore::Page::setVisibilityState):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (139799 => 139800)
--- trunk/Source/WebCore/ChangeLog 2013-01-15 23:40:29 UTC (rev 139799)
+++ trunk/Source/WebCore/ChangeLog 2013-01-15 23:43:27 UTC (rev 139800)
@@ -1,3 +1,13 @@
+2013-01-15 Beth Dakin <bda...@apple.com>
+
+ https://bugs.webkit.org/show_bug.cgi?id=106940
+ Suspend CSS animations for background tabs
+
+ Reviewed by Simon Fraser.
+
+ * page/Page.cpp:
+ (WebCore::Page::setVisibilityState):
+
2013-01-15 Levi Weintraub <le...@chromium.org>
Unreviewed, rolling out r139790.
Modified: trunk/Source/WebCore/page/Page.cpp (139799 => 139800)
--- trunk/Source/WebCore/page/Page.cpp 2013-01-15 23:40:29 UTC (rev 139799)
+++ trunk/Source/WebCore/page/Page.cpp 2013-01-15 23:43:27 UTC (rev 139800)
@@ -1184,15 +1184,20 @@
m_mainFrame->dispatchVisibilityStateChangeEvent();
#endif
+ if (visibilityState == WebCore::PageVisibilityStateHidden) {
#if ENABLE(HIDDEN_PAGE_DOM_TIMER_THROTTLING)
- if (visibilityState == WebCore::PageVisibilityStateHidden)
setTimerAlignmentInterval(Settings::hiddenPageDOMTimerAlignmentInterval());
- else
+#endif
+ mainFrame()->animation()->suspendAnimations();
+ } else {
+#if ENABLE(HIDDEN_PAGE_DOM_TIMER_THROTTLING)
setTimerAlignmentInterval(Settings::defaultDOMTimerAlignmentInterval());
+#endif
+ mainFrame()->animation()->resumeAnimations();
+ }
#if !ENABLE(PAGE_VISIBILITY_API)
UNUSED_PARAM(isInitialState);
#endif
-#endif
}
#endif // ENABLE(PAGE_VISIBILITY_API) || ENABLE(HIDDEN_PAGE_DOM_TIMER_THROTTLING)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes