Title: [135319] trunk/Source/WebKit/blackberry
Revision
135319
Author
[email protected]
Date
2012-11-20 15:34:14 -0800 (Tue, 20 Nov 2012)

Log Message

[BlackBerry] Animated gifs pause on scroll or zoom and sometimes don't resume after scroll or zoom completes
https://bugs.webkit.org/show_bug.cgi?id=102838

Patch by Andrew Lo <[email protected]> on 2012-11-20
Reviewed by Rob Buis.

Internally reviewed by Adam Treat.
Internal PR244646
When entering scrolling & zooming, we suspend regular render jobs
in order to pause animations. When finishing scrolling or zooming,
dispatch a render job in order to resume those animations.

If an animation requests a repaint while the backing store is suspended,
add the regular render job to the render queue so that it can be
processed later.

* Api/BackingStore.cpp:
(BlackBerry::WebKit::BackingStorePrivate::repaint):
(BlackBerry::WebKit::BackingStorePrivate::setScrollingOrZooming):

Modified Paths

Diff

Modified: trunk/Source/WebKit/blackberry/Api/BackingStore.cpp (135318 => 135319)


--- trunk/Source/WebKit/blackberry/Api/BackingStore.cpp	2012-11-20 23:27:39 UTC (rev 135318)
+++ trunk/Source/WebKit/blackberry/Api/BackingStore.cpp	2012-11-20 23:34:14 UTC (rev 135319)
@@ -397,9 +397,6 @@
 void BackingStorePrivate::repaint(const Platform::IntRect& windowRect,
                                   bool contentChanged, bool immediate)
 {
-    if (m_suspendBackingStoreUpdates)
-        return;
-
      // If immediate is true, then we're being asked to perform synchronously.
      // NOTE: WebCore::ScrollView will call this method with immediate:true and contentChanged:false.
      // This is a special case introduced specifically for the Apple's windows port and can be safely ignored I believe.
@@ -428,6 +425,9 @@
 #endif
 
         if (immediate) {
+            if (m_suspendBackingStoreUpdates)
+                return;
+
             if (render(rect)) {
                 if (!shouldDirectRenderingToWindow() && !m_webPage->d->commitRootLayerIfNeeded())
                     blitVisibleContents();
@@ -2558,6 +2558,8 @@
     else if (shouldBlit && !shouldDirectRenderingToWindow())
         blitVisibleContents();
 #endif
+    if (!scrollingOrZooming && shouldPerformRegularRenderJobs())
+        dispatchRenderJob();
 }
 
 void BackingStorePrivate::lockBackingStore()

Modified: trunk/Source/WebKit/blackberry/ChangeLog (135318 => 135319)


--- trunk/Source/WebKit/blackberry/ChangeLog	2012-11-20 23:27:39 UTC (rev 135318)
+++ trunk/Source/WebKit/blackberry/ChangeLog	2012-11-20 23:34:14 UTC (rev 135319)
@@ -1,3 +1,24 @@
+2012-11-20  Andrew Lo  <[email protected]>
+
+        [BlackBerry] Animated gifs pause on scroll or zoom and sometimes don't resume after scroll or zoom completes
+        https://bugs.webkit.org/show_bug.cgi?id=102838
+
+        Reviewed by Rob Buis.
+
+        Internally reviewed by Adam Treat.
+        Internal PR244646
+        When entering scrolling & zooming, we suspend regular render jobs
+        in order to pause animations. When finishing scrolling or zooming,
+        dispatch a render job in order to resume those animations.
+
+        If an animation requests a repaint while the backing store is suspended,
+        add the regular render job to the render queue so that it can be
+        processed later.
+
+        * Api/BackingStore.cpp:
+        (BlackBerry::WebKit::BackingStorePrivate::repaint):
+        (BlackBerry::WebKit::BackingStorePrivate::setScrollingOrZooming):
+
 2012-11-20  Sheriff Bot  <[email protected]>
 
         Unreviewed, rolling out r135295.
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to