Title: [131917] trunk/Source/WebKit/blackberry
- Revision
- 131917
- Author
- [email protected]
- Date
- 2012-10-19 10:26:10 -0700 (Fri, 19 Oct 2012)
Log Message
[BlackBerry] Should suspend AnimationController when WebPage becomes invisible.
https://bugs.webkit.org/show_bug.cgi?id=99844
Patch by Andrew Lo <[email protected]> on 2012-10-19
Reviewed by Yong Li.
Internally reviewed by Arvid Nilsson & Yong Li.
Suspend animation controller when the tab becomes invisible,
in addition to suspending scripted animations.
* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::setVisible):
Modified Paths
Diff
Modified: trunk/Source/WebKit/blackberry/Api/WebPage.cpp (131916 => 131917)
--- trunk/Source/WebKit/blackberry/Api/WebPage.cpp 2012-10-19 17:25:25 UTC (rev 131916)
+++ trunk/Source/WebKit/blackberry/Api/WebPage.cpp 2012-10-19 17:26:10 UTC (rev 131917)
@@ -55,6 +55,7 @@
#endif
#include "EditorClientBlackBerry.h"
#include "FocusController.h"
+#include "Frame.h"
#include "FrameLoaderClientBlackBerry.h"
#if !defined(PUBLIC_BUILD) || !PUBLIC_BUILD
#include "GeolocationClientMock.h"
@@ -3199,12 +3200,19 @@
void WebPagePrivate::setVisible(bool visible)
{
- m_visible = visible;
+ if (visible != m_visible) {
+ if (visible) {
+ mainFrame()->animation()->resumeAnimations();
+ if (m_page->scriptedAnimationsSuspended())
+ m_page->resumeScriptedAnimations();
+ } else {
+ mainFrame()->animation()->suspendAnimations();
+ if (!m_page->scriptedAnimationsSuspended())
+ m_page->suspendScriptedAnimations();
+ }
- if (visible && m_page->scriptedAnimationsSuspended())
- m_page->resumeScriptedAnimations();
- if (!visible && !m_page->scriptedAnimationsSuspended())
- m_page->suspendScriptedAnimations();
+ m_visible = visible;
+ }
#if ENABLE(PAGE_VISIBILITY_API)
setPageVisibilityState();
Modified: trunk/Source/WebKit/blackberry/ChangeLog (131916 => 131917)
--- trunk/Source/WebKit/blackberry/ChangeLog 2012-10-19 17:25:25 UTC (rev 131916)
+++ trunk/Source/WebKit/blackberry/ChangeLog 2012-10-19 17:26:10 UTC (rev 131917)
@@ -1,3 +1,17 @@
+2012-10-19 Andrew Lo <[email protected]>
+
+ [BlackBerry] Should suspend AnimationController when WebPage becomes invisible.
+ https://bugs.webkit.org/show_bug.cgi?id=99844
+
+ Reviewed by Yong Li.
+ Internally reviewed by Arvid Nilsson & Yong Li.
+
+ Suspend animation controller when the tab becomes invisible,
+ in addition to suspending scripted animations.
+
+ * Api/WebPage.cpp:
+ (BlackBerry::WebKit::WebPagePrivate::setVisible):
+
2012-10-19 Mike Fenton <[email protected]>
[BlackBerry] Don't attempt to auto scroll on input for Fixed Position elements.
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes