2011-04-20 Chris Marrin <cmarrin@apple.com>
authorcmarrin@apple.com <cmarrin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Apr 2011 21:09:00 +0000 (21:09 +0000)
committercmarrin@apple.com <cmarrin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Apr 2011 21:09:00 +0000 (21:09 +0000)
commitaef45b7b7f75a708b610cafd99a013acdbb5e9ef
treef9883f9f0223a0e95ff053cc13f627b55f8bf02e
parentd4f42578778c49362af0122453d6dbdde2624a61
2011-04-20  Chris Marrin  <cmarrin@apple.com>

        Reviewed by Adam Roben.

        REGRESSION (WebKit2): CSS animations on pages that use accelerated compositing stop after switching tabs
        https://bugs.webkit.org/show_bug.cgi?id=57868

        Running CACFAnimations aren't remembered when layer tree is unparented and
        then reparented. Added a new ensureAnimationsSubmitted function to
        PlatformCALayer to traverse the tree and resubmit animations, setting the
        beginTime to the original start time of the animation. This is called in WK2
        when layer tree is newly parented.

        I also consolidated currentTimeToMediaTime into PlatformCALayer so it can be shared
        between PlatformCALayer and GraphicsLayerCA.

        * platform/graphics/ca/GraphicsLayerCA.cpp:
        * platform/graphics/ca/PlatformCAAnimation.h:
            Remember actual animation start time in CACFAnimation beginTime property
        * platform/graphics/ca/PlatformCALayer.h:
            New ensureAnimationsSubmitted function which traverses layers and resubmits all animations
        * platform/graphics/ca/mac/PlatformCALayerMac.mm:
        * platform/graphics/ca/win/PlatformCALayerWin.cpp:

2011-04-20  Chris Marrin  <cmarrin@apple.com>

        Reviewed by Adam Roben.

        REGRESSION (WebKit2): CSS animations on pages that use accelerated compositing stop after switching tabs
        https://bugs.webkit.org/show_bug.cgi?id=57868

        Subclassed setRootCompositingLayer so it can call ensureAnimationsSubmitted on Win.

        * WebProcess/WebPage/ca/LayerTreeHostCA.h:
            Make setRootCompositingLayer protected so it can be called from subclass
        * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.cpp:
            Override setRootCompositingLayer to add call to root layer's
            PlatformCALayer::ensureAnimationsSubmitted method
        * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@84416 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
Source/WebCore/platform/graphics/ca/PlatformCAAnimation.h
Source/WebCore/platform/graphics/ca/PlatformCALayer.h
Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm
Source/WebCore/platform/graphics/ca/win/PlatformCALayerWin.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebPage/ca/LayerTreeHostCA.h
Source/WebKit2/WebProcess/WebPage/ca/win/LayerTreeHostCAWin.cpp
Source/WebKit2/WebProcess/WebPage/ca/win/LayerTreeHostCAWin.h