Changeset 150666 in webkit


Ignore:
Timestamp:
May 24, 2013, 4:37:12 PM (13 years ago)
Author:
timothy_horton@apple.com
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.

Location:
trunk/Source
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r150665 r150666  
     12013-05-24  Tim Horton  <timothy_horton@apple.com>
     2
     3        Animated GIFs don't repaint after TiledCoreAnimationDrawingArea un-suspends painting
     4        https://bugs.webkit.org/show_bug.cgi?id=116744
     5        <rdar://problem/13973514>
     6
     7        Reviewed by Simon Fraser.
     8
     9        * WebCore.exp.in: Export FrameView::resumeAnimatingImages.
     10        * page/FrameView.cpp:
     11        (WebCore::FrameView::setIsInWindow):
     12        (WebCore::FrameView::resumeAnimatingImages):
     13        Factor the code to restart animated images out of frameView::setIsInWindow.
     14
     15        * page/FrameView.h:
     16        (FrameView):
     17
    1182013-05-24  Anders Carlsson  <andersca@apple.com>
    219
  • trunk/Source/WebCore/WebCore.exp.in

    r150665 r150666  
    11541154__ZN7WebCore9FrameView20resetTrackedRepaintsEv
    11551155__ZN7WebCore9FrameView21flushDeferredRepaintsEv
     1156__ZN7WebCore9FrameView21resumeAnimatingImagesEv
    11561157__ZN7WebCore9FrameView22setBaseBackgroundColorERKNS_5ColorE
    11571158__ZN7WebCore9FrameView23updateCanHaveScrollbarsEv
  • trunk/Source/WebCore/page/FrameView.cpp

    r150656 r150666  
    10701070        renderView->setIsInWindow(isInWindow);
    10711071
    1072     if (isInWindow) {
    1073         // Drawing models which cache painted content while out-of-window (WebKit2's composited drawing areas, etc.)
    1074         // require that we repaint animated images to kickstart the animation loop.
    1075 
    1076         CachedImage::resumeAnimatingImagesForLoader(frame()->document()->cachedResourceLoader());
    1077     }
     1072    if (isInWindow)
     1073        resumeAnimatingImages();
     1074}
     1075
     1076void FrameView::resumeAnimatingImages()
     1077{
     1078    // Drawing models which cache painted content while out-of-window (WebKit2's composited drawing areas, etc.)
     1079    // require that we repaint animated images to kickstart the animation loop.
     1080
     1081    CachedImage::resumeAnimatingImagesForLoader(frame()->document()->cachedResourceLoader());
    10781082}
    10791083
  • trunk/Source/WebCore/page/FrameView.h

    r150627 r150666  
    431431    void setVisualUpdatesAllowedByClient(bool);
    432432
     433    void resumeAnimatingImages();
     434
    433435protected:
    434436    virtual bool scrollContentsFastPath(const IntSize& scrollDelta, const IntRect& rectToScroll, const IntRect& clipRect);
  • trunk/Source/WebKit2/ChangeLog

    r150663 r150666  
     12013-05-24  Tim Horton  <timothy_horton@apple.com>
     2
     3        Animated GIFs don't repaint after TiledCoreAnimationDrawingArea un-suspends painting
     4        https://bugs.webkit.org/show_bug.cgi?id=116744
     5        <rdar://problem/13973514>
     6
     7        Reviewed by Simon Fraser.
     8
     9        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
     10        (WebKit::TiledCoreAnimationDrawingArea::resumePainting):
     11        Force WebCore to repaint animated images when painting is resumed.
     12
    1132013-05-24  Christophe Dumez  <ch.dumez@sisa.samsung.com>
    214
  • trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm

    r150093 r150666  
    386386    [[NSNotificationCenter defaultCenter] postNotificationName:@"NSCAViewRenderDidResumeNotification" object:nil userInfo:[NSDictionary dictionaryWithObject:m_rootLayer.get() forKey:@"layer"]];
    387387
    388     if (m_webPage->windowIsVisible())
     388    if (m_webPage->windowIsVisible()) {
    389389        m_webPage->corePage()->resumeScriptedAnimations();
     390
     391        Frame* frame = m_webPage->corePage()->mainFrame();
     392        if (!frame)
     393            return;
     394
     395        FrameView* frameView = frame->view();
     396        if (!frameView)
     397            return;
     398
     399        frameView->resumeAnimatingImages();
     400    }
    390401}
    391402
Note: See TracChangeset for help on using the changeset viewer.