Skip to content
  • jamesr@google.com's avatar
    2011-01-06 James Robinson <jamesr@chromium.org> · c0dca2a1
    jamesr@google.com authored
            Reviewed by Simon Fraser.
    
            Implement mozilla's animationTime property
            https://bugs.webkit.org/show_bug.cgi?id=51952
    
            Tests for window.webkitAnimationTime.
    
            * animations/animation-time-expected.txt: Added.
            * animations/animation-time.html: Added.
            * animations/script-tests/animation-time.js: Added.
    2011-01-06  James Robinson  <jamesr@chromium.org>
    
            Reviewed by Simon Fraser.
    
            Implement mozilla's animationTime property
            https://bugs.webkit.org/show_bug.cgi?id=51952
    
            Chromium DRT support for webkitAnimationTime.
    
            * DumpRenderTree/chromium/WebViewHost.cpp:
            (WebViewHost::paintInvalidatedRegion):
    2011-01-06  James Robinson  <jamesr@chromium.org>
    
            Reviewed by Simon Fraser.
    
            Implement mozilla's animationTime property
            https://bugs.webkit.org/show_bug.cgi?id=51952
    
            Implements mozilla's animationTime property as described here:
            https://developer.mozilla.org/en/DOM/window.mozAnimationStartTime
            and http://hacks.mozilla.org/2010/08/more-efficient-javascript-animations-with-mozrequestanimationframe/
            The property is called webkitAnimationTime as calling it the 'Start' time is not very informative.
            This property exposes a notion of a 'current' time to use for declarative animations and allows
            scripts to synchronize imperative animations with declarative ones if they choose to.  Once queried
            this time is saved and used for all declarative animation updates until the embedder paints/composites
            the next frame and clears it, or 15ms elapse (in case the embedder isn't producing frames, for example
            if the page is in a background tab).
    
            This patch also ensures that all declarative animations started in the same script execution block
            are synchronized even if some time elapses while script is running.
    
            Test: fast/animation/animation-time.html
    
            * WebCore.gypi:
            * page/DOMWindow.cpp:
            (WebCore::DOMWindow::webkitAnimationTime):
            * page/DOMWindow.h:
            * page/DOMWindow.idl:
            * page/Frame.cpp:
            (WebCore::Frame::currentAnimationTime):
            * page/Frame.h:
            * page/Page.cpp:
            (WebCore::Page::Page):
            * page/Page.h:
            (WebCore::Page::animationTime):
            * page/animation/AnimationController.cpp:
            (WebCore::AnimationControllerPrivate::beginAnimationUpdateTime):
            * page/animation/AnimationTimeController.cpp: Added.
            (WebCore::AnimationTimeController::AnimationTimeController):
            (WebCore::AnimationTimeController::~AnimationTimeController):
            (WebCore::AnimationTimeController::currentAnimationTime):
            (WebCore::AnimationTimeController::clearCurrentAnimationTime):
            (WebCore::AnimationTimeController::clearCurrentAnimationTimeTimerFired):
            * page/animation/AnimationTimeController.h: Added.
            (WebCore::AnimationTimeController::create):
    2011-01-06  James Robinson  <jamesr@chromium.org>
    
            Reviewed by Simon Fraser.
    
            Implement mozilla's animationTime property
            https://bugs.webkit.org/show_bug.cgi?id=51952
    
            WebKit API support for webkitAnimationTime.
    
            * public/WebWidget.h:
            * src/WebPopupMenuImpl.cpp:
            (WebKit::WebPopupMenuImpl::clearCurrentAnimationTime):
            * src/WebPopupMenuImpl.h:
            * src/WebViewImpl.cpp:
            (WebKit::WebViewImpl::clearCurrentAnimationTime):
            * src/WebViewImpl.h:
    2011-01-06  James Robinson  <jamesr@chromium.org>
    
            Reviewed by Simon Fraser.
    
            Implement mozilla's animationTime property
            https://bugs.webkit.org/show_bug.cgi?id=51952
    
            Tells the page to clear the current animation time after producing a frame.
    
            * WebProcess/WebPage/WebPage.cpp:
            (WebKit::WebPage::drawRect):
            * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
            (WebKit::ChunkedUpdateDrawingArea::display):
            (WebKit::ChunkedUpdateDrawingArea::setSize):
            * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
            (WebKit::LayerBackedDrawingArea::syncCompositingLayers):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75169 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    c0dca2a1