Title: [150666] trunk/Source
- Revision
- 150666
- Author
- [email protected]
- Date
- 2013-05-24 16:37:12 -0700 (Fri, 24 May 2013)
Log Message
Animated GIFs don't repaint after TiledCoreAnimationDrawingArea un-suspends painting
https://bugs.webkit.org/show_bug.cgi?id=116744
<rdar://problem/13973514>
Reviewed by Simon Fraser.
* WebCore.exp.in: Export FrameView::resumeAnimatingImages.
* page/FrameView.cpp:
(WebCore::FrameView::setIsInWindow):
(WebCore::FrameView::resumeAnimatingImages):
Factor the code to restart animated images out of frameView::setIsInWindow.
* page/FrameView.h:
(FrameView):
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::resumePainting):
Force WebCore to repaint animated images when painting is resumed.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (150665 => 150666)
--- trunk/Source/WebCore/ChangeLog 2013-05-24 23:30:36 UTC (rev 150665)
+++ trunk/Source/WebCore/ChangeLog 2013-05-24 23:37:12 UTC (rev 150666)
@@ -1,3 +1,20 @@
+2013-05-24 Tim Horton <[email protected]>
+
+ Animated GIFs don't repaint after TiledCoreAnimationDrawingArea un-suspends painting
+ https://bugs.webkit.org/show_bug.cgi?id=116744
+ <rdar://problem/13973514>
+
+ Reviewed by Simon Fraser.
+
+ * WebCore.exp.in: Export FrameView::resumeAnimatingImages.
+ * page/FrameView.cpp:
+ (WebCore::FrameView::setIsInWindow):
+ (WebCore::FrameView::resumeAnimatingImages):
+ Factor the code to restart animated images out of frameView::setIsInWindow.
+
+ * page/FrameView.h:
+ (FrameView):
+
2013-05-24 Anders Carlsson <[email protected]>
Move history property list writer to WebKit
Modified: trunk/Source/WebCore/WebCore.exp.in (150665 => 150666)
--- trunk/Source/WebCore/WebCore.exp.in 2013-05-24 23:30:36 UTC (rev 150665)
+++ trunk/Source/WebCore/WebCore.exp.in 2013-05-24 23:37:12 UTC (rev 150666)
@@ -1153,6 +1153,7 @@
__ZN7WebCore9FrameView20removeScrollableAreaEPNS_14ScrollableAreaE
__ZN7WebCore9FrameView20resetTrackedRepaintsEv
__ZN7WebCore9FrameView21flushDeferredRepaintsEv
+__ZN7WebCore9FrameView21resumeAnimatingImagesEv
__ZN7WebCore9FrameView22setBaseBackgroundColorERKNS_5ColorE
__ZN7WebCore9FrameView23updateCanHaveScrollbarsEv
__ZN7WebCore9FrameView24forceLayoutForPaginationERKNS_9FloatSizeES3_fNS_19AdjustViewSizeOrNotE
Modified: trunk/Source/WebCore/page/FrameView.cpp (150665 => 150666)
--- trunk/Source/WebCore/page/FrameView.cpp 2013-05-24 23:30:36 UTC (rev 150665)
+++ trunk/Source/WebCore/page/FrameView.cpp 2013-05-24 23:37:12 UTC (rev 150666)
@@ -1069,12 +1069,16 @@
if (RenderView* renderView = this->renderView())
renderView->setIsInWindow(isInWindow);
- if (isInWindow) {
- // Drawing models which cache painted content while out-of-window (WebKit2's composited drawing areas, etc.)
- // require that we repaint animated images to kickstart the animation loop.
+ if (isInWindow)
+ resumeAnimatingImages();
+}
- CachedImage::resumeAnimatingImagesForLoader(frame()->document()->cachedResourceLoader());
- }
+void FrameView::resumeAnimatingImages()
+{
+ // Drawing models which cache painted content while out-of-window (WebKit2's composited drawing areas, etc.)
+ // require that we repaint animated images to kickstart the animation loop.
+
+ CachedImage::resumeAnimatingImagesForLoader(frame()->document()->cachedResourceLoader());
}
RenderObject* FrameView::layoutRoot(bool onlyDuringLayout) const
Modified: trunk/Source/WebCore/page/FrameView.h (150665 => 150666)
--- trunk/Source/WebCore/page/FrameView.h 2013-05-24 23:30:36 UTC (rev 150665)
+++ trunk/Source/WebCore/page/FrameView.h 2013-05-24 23:37:12 UTC (rev 150666)
@@ -430,6 +430,8 @@
bool visualUpdatesAllowedByClient() const { return m_visualUpdatesAllowedByClient; }
void setVisualUpdatesAllowedByClient(bool);
+ void resumeAnimatingImages();
+
protected:
virtual bool scrollContentsFastPath(const IntSize& scrollDelta, const IntRect& rectToScroll, const IntRect& clipRect);
virtual void scrollContentsSlowPath(const IntRect& updateRect);
Modified: trunk/Source/WebKit2/ChangeLog (150665 => 150666)
--- trunk/Source/WebKit2/ChangeLog 2013-05-24 23:30:36 UTC (rev 150665)
+++ trunk/Source/WebKit2/ChangeLog 2013-05-24 23:37:12 UTC (rev 150666)
@@ -1,3 +1,15 @@
+2013-05-24 Tim Horton <[email protected]>
+
+ Animated GIFs don't repaint after TiledCoreAnimationDrawingArea un-suspends painting
+ https://bugs.webkit.org/show_bug.cgi?id=116744
+ <rdar://problem/13973514>
+
+ Reviewed by Simon Fraser.
+
+ * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
+ (WebKit::TiledCoreAnimationDrawingArea::resumePainting):
+ Force WebCore to repaint animated images when painting is resumed.
+
2013-05-24 Christophe Dumez <[email protected]>
Remove custom code for webkitAudioContext global constructor getter
Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm (150665 => 150666)
--- trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm 2013-05-24 23:30:36 UTC (rev 150665)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm 2013-05-24 23:37:12 UTC (rev 150666)
@@ -385,8 +385,19 @@
[m_rootLayer.get() setValue:(id)kCFBooleanFalse forKey:@"NSCAViewRenderPaused"];
[[NSNotificationCenter defaultCenter] postNotificationName:@"NSCAViewRenderDidResumeNotification" object:nil userInfo:[NSDictionary dictionaryWithObject:m_rootLayer.get() forKey:@"layer"]];
- if (m_webPage->windowIsVisible())
+ if (m_webPage->windowIsVisible()) {
m_webPage->corePage()->resumeScriptedAnimations();
+
+ Frame* frame = m_webPage->corePage()->mainFrame();
+ if (!frame)
+ return;
+
+ FrameView* frameView = frame->view();
+ if (!frameView)
+ return;
+
+ frameView->resumeAnimatingImages();
+ }
}
void TiledCoreAnimationDrawingArea::setExposedRect(const FloatRect& exposedRect)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes