Changeset 75169 in webkit


Ignore:
Timestamp:
Jan 6, 2011 11:07:25 AM (13 years ago)
Author:
jamesr@google.com
Message:

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

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):
Location:
trunk
Files:
5 added
32 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r75168 r75169  
     12011-01-06  James Robinson  <jamesr@chromium.org>
     2
     3        Reviewed by Simon Fraser.
     4
     5        Implement mozilla's animationTime property
     6        https://bugs.webkit.org/show_bug.cgi?id=51952
     7
     8        Tests for window.webkitAnimationTime.
     9
     10        * animations/animation-time-expected.txt: Added.
     11        * animations/animation-time.html: Added.
     12        * animations/script-tests/animation-time.js: Added.
     13
    1142011-01-06  Abhishek Arya  <inferno@chromium.org>
    215
  • trunk/Tools/ChangeLog

    r75166 r75169  
     12011-01-06  James Robinson  <jamesr@chromium.org>
     2
     3        Reviewed by Simon Fraser.
     4
     5        Implement mozilla's animationTime property
     6        https://bugs.webkit.org/show_bug.cgi?id=51952
     7
     8        Chromium DRT support for webkitAnimationTime.
     9
     10        * DumpRenderTree/chromium/WebViewHost.cpp:
     11        (WebViewHost::paintInvalidatedRegion):
     12
    1132011-01-06  Julie Parent  <jparent@chromium.org>
    214
  • trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp

    r74844 r75169  
    14831483    }
    14841484    ASSERT(m_paintRect.isEmpty());
     1485    webWidget()->clearCurrentAnimationTime();
    14851486}
    14861487
  • trunk/WebCore/Android.mk

    r74851 r75169  
    447447        page/animation/AnimationBase.cpp \
    448448        page/animation/AnimationController.cpp \
     449        page/animation/AnimationTimeController.cpp \
    449450        page/animation/CompositeAnimation.cpp \
    450451        page/animation/ImplicitAnimation.cpp \
  • trunk/WebCore/CMakeLists.txt

    r75069 r75169  
    12791279    page/animation/AnimationBase.cpp
    12801280    page/animation/AnimationController.cpp
     1281    page/animation/AnimationTimeController.cpp
    12811282    page/animation/CompositeAnimation.cpp
    12821283    page/animation/ImplicitAnimation.cpp
  • trunk/WebCore/ChangeLog

    r75168 r75169  
     12011-01-06  James Robinson  <jamesr@chromium.org>
     2
     3        Reviewed by Simon Fraser.
     4
     5        Implement mozilla's animationTime property
     6        https://bugs.webkit.org/show_bug.cgi?id=51952
     7
     8        Implements mozilla's animationTime property as described here:
     9        https://developer.mozilla.org/en/DOM/window.mozAnimationStartTime
     10        and http://hacks.mozilla.org/2010/08/more-efficient-javascript-animations-with-mozrequestanimationframe/
     11        The property is called webkitAnimationTime as calling it the 'Start' time is not very informative.
     12        This property exposes a notion of a 'current' time to use for declarative animations and allows
     13        scripts to synchronize imperative animations with declarative ones if they choose to.  Once queried
     14        this time is saved and used for all declarative animation updates until the embedder paints/composites
     15        the next frame and clears it, or 15ms elapse (in case the embedder isn't producing frames, for example
     16        if the page is in a background tab).
     17
     18        This patch also ensures that all declarative animations started in the same script execution block
     19        are synchronized even if some time elapses while script is running.
     20
     21        Test: fast/animation/animation-time.html
     22
     23        * WebCore.gypi:
     24        * page/DOMWindow.cpp:
     25        (WebCore::DOMWindow::webkitAnimationTime):
     26        * page/DOMWindow.h:
     27        * page/DOMWindow.idl:
     28        * page/Frame.cpp:
     29        (WebCore::Frame::currentAnimationTime):
     30        * page/Frame.h:
     31        * page/Page.cpp:
     32        (WebCore::Page::Page):
     33        * page/Page.h:
     34        (WebCore::Page::animationTime):
     35        * page/animation/AnimationController.cpp:
     36        (WebCore::AnimationControllerPrivate::beginAnimationUpdateTime):
     37        * page/animation/AnimationTimeController.cpp: Added.
     38        (WebCore::AnimationTimeController::AnimationTimeController):
     39        (WebCore::AnimationTimeController::~AnimationTimeController):
     40        (WebCore::AnimationTimeController::currentAnimationTime):
     41        (WebCore::AnimationTimeController::clearCurrentAnimationTime):
     42        (WebCore::AnimationTimeController::clearCurrentAnimationTimeTimerFired):
     43        * page/animation/AnimationTimeController.h: Added.
     44        (WebCore::AnimationTimeController::create):
     45
    1462011-01-06  Abhishek Arya  <inferno@chromium.org>
    247
  • trunk/WebCore/GNUmakefile.am

    r75070 r75169  
    21442144        WebCore/page/animation/AnimationController.h \
    21452145        WebCore/page/animation/AnimationControllerPrivate.h \
     2146        WebCore/page/animation/AnimationTimeController.cpp \
     2147        WebCore/page/animation/AnimationTimeController.h \
    21462148        WebCore/page/animation/CompositeAnimation.cpp \
    21472149        WebCore/page/animation/CompositeAnimation.h \
  • trunk/WebCore/WebCore.exp.in

    r75115 r75169  
    520520__ZN7WebCore22createFragmentFromTextEPNS_5RangeERKN3WTF6StringE
    521521__ZN7WebCore22externalRepresentationEPNS_5FrameEj
     522__ZN7WebCore23AnimationTimeController25clearCurrentAnimationTimeEv
    522523__ZN7WebCore23AuthenticationChallengeC1ERKNS_15ProtectionSpaceERKNS_10CredentialEjRKNS_16ResourceResponseERKNS_13ResourceErrorE
    523524__ZN7WebCore23ReplaceSelectionCommandC1EPNS_8DocumentEN3WTF10PassRefPtrINS_16DocumentFragmentEEEbbbbbNS_10EditActionE
  • trunk/WebCore/WebCore.gypi

    r75118 r75169  
    22212221            'page/animation/AnimationController.h',
    22222222            'page/animation/AnimationControllerPrivate.h',
     2223            'page/animation/AnimationTimeController.cpp',
     2224            'page/animation/AnimationTimeController.h',
    22232225            'page/animation/CompositeAnimation.cpp',
    22242226            'page/animation/CompositeAnimation.h',
  • trunk/WebCore/WebCore.pro

    r75151 r75169  
    11141114    page/animation/AnimationBase.cpp \
    11151115    page/animation/AnimationController.cpp \
     1116    page/animation/AnimationTimeController.cpp \
    11161117    page/animation/CompositeAnimation.cpp \
    11171118    page/animation/ImplicitAnimation.cpp \
  • trunk/WebCore/WebCore.vcproj/WebCore.vcproj

    r75138 r75169  
    2424324243                        </File>
    2424424244                        <File
     24245                                RelativePath="..\page\animation\AnimationTimeController.cpp"
     24246                                >
     24247                        </File>
     24248                        <File
     24249                                RelativePath="..\page\animation\AnimationTimeController.h"
     24250                                >
     24251                        </File>
     24252                        <File
    2424524253                                RelativePath="..\page\BarInfo.cpp"
    2424624254                                >
  • trunk/WebCore/WebCore.xcodeproj/project.pbxproj

    r75103 r75169  
    911911                3888F6EE128C9889000CA8E0 /* InspectorFileSystemAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3888F6EC128C9889000CA8E0 /* InspectorFileSystemAgent.cpp */; };
    912912                3888F6EF128C9889000CA8E0 /* InspectorFileSystemAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = 3888F6ED128C9889000CA8E0 /* InspectorFileSystemAgent.h */; };
     913                38DF1B3512D5284200F0477E /* AnimationTimeController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 38DF1B3312D5284200F0477E /* AnimationTimeController.cpp */; };
     914                38DF1B3612D5284200F0477E /* AnimationTimeController.h in Headers */ = {isa = PBXBuildFile; fileRef = 38DF1B3412D5284200F0477E /* AnimationTimeController.h */; settings = {ATTRIBUTES = (Private, ); }; };
    913915                3AC648B2129E146500C3EB25 /* EditingBoundary.h in Headers */ = {isa = PBXBuildFile; fileRef = 3AC648B1129E146500C3EB25 /* EditingBoundary.h */; settings = {ATTRIBUTES = (Private, ); }; };
    914916                41002CCD0F66EDEF009E660D /* ScriptFunctionCall.h in Headers */ = {isa = PBXBuildFile; fileRef = 41002CCB0F66EDEF009E660D /* ScriptFunctionCall.h */; };
     
    72297231                3888F6EC128C9889000CA8E0 /* InspectorFileSystemAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorFileSystemAgent.cpp; sourceTree = "<group>"; };
    72307232                3888F6ED128C9889000CA8E0 /* InspectorFileSystemAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorFileSystemAgent.h; sourceTree = "<group>"; };
     7233                38DF1B3312D5284200F0477E /* AnimationTimeController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AnimationTimeController.cpp; path = animation/AnimationTimeController.cpp; sourceTree = "<group>"; };
     7234                38DF1B3412D5284200F0477E /* AnimationTimeController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AnimationTimeController.h; path = animation/AnimationTimeController.h; sourceTree = "<group>"; };
    72317235                3AC648B1129E146500C3EB25 /* EditingBoundary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EditingBoundary.h; sourceTree = "<group>"; };
    72327236                41002CCB0F66EDEF009E660D /* ScriptFunctionCall.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptFunctionCall.h; sourceTree = "<group>"; };
     
    1302413028                                316FE10A0E6E1DA700BF6088 /* AnimationController.h */,
    1302513029                                0F15DA890F3AAEE70000CE47 /* AnimationControllerPrivate.h */,
     13030                                38DF1B3312D5284200F0477E /* AnimationTimeController.cpp */,
     13031                                38DF1B3412D5284200F0477E /* AnimationTimeController.h */,
    1302613032                                316FE10B0E6E1DA700BF6088 /* CompositeAnimation.cpp */,
    1302713033                                316FE10C0E6E1DA700BF6088 /* CompositeAnimation.h */,
     
    1931119317                                316FE1140E6E1DA700BF6088 /* AnimationController.h in Headers */,
    1931219318                                0F15DA8A0F3AAEE70000CE47 /* AnimationControllerPrivate.h in Headers */,
     19319                                38DF1B3612D5284200F0477E /* AnimationTimeController.h in Headers */,
    1931319320                                49E912AD0EFAC906009D0CAF /* AnimationList.h in Headers */,
    1931419321                                93309DD7099E64920056E581 /* AppendNodeCommand.h in Headers */,
     
    2259622603                                316FE1110E6E1DA700BF6088 /* AnimationBase.cpp in Sources */,
    2259722604                                316FE1130E6E1DA700BF6088 /* AnimationController.cpp in Sources */,
     22605                                38DF1B3512D5284200F0477E /* AnimationTimeController.cpp in Sources */,
    2259822606                                49E912AC0EFAC906009D0CAF /* AnimationList.cpp in Sources */,
    2259922607                                93309DD6099E64920056E581 /* AppendNodeCommand.cpp in Sources */,
  • trunk/WebCore/page/DOMWindow.cpp

    r74877 r75169  
    14651465}
    14661466
     1467DOMTimeStamp DOMWindow::webkitAnimationTime()
     1468{
     1469    if (Frame* f = frame())
     1470        return convertSecondsToDOMTimeStamp(f->currentAnimationTime());
     1471    return convertSecondsToDOMTimeStamp(currentTime());
     1472}
     1473
    14671474bool DOMWindow::addEventListener(const AtomicString& eventType, PassRefPtr<EventListener> listener, bool useCapture)
    14681475{
  • trunk/WebCore/page/DOMWindow.h

    r74854 r75169  
    2828#define DOMWindow_h
    2929
     30#include "DOMTimeStamp.h"
    3031#include "KURL.h"
    3132#include "MessagePort.h"
     
    237238        int setInterval(PassOwnPtr<ScheduledAction>, int timeout, ExceptionCode&);
    238239        void clearInterval(int timeoutId);
     240
     241        // WebKit animation extensions
     242        DOMTimeStamp webkitAnimationTime();
    239243
    240244        // Events
  • trunk/WebCore/page/DOMWindow.idl

    r74854 r75169  
    236236        // [Custom] long setInterval(in DOMString code, in long timeout);
    237237        void clearInterval(in long handle);
     238
     239        // WebKit animation extensions
     240        readonly attribute DOMTimeStamp webkitAnimationTime;
    238241
    239242        // Base64
  • trunk/WebCore/page/Frame.cpp

    r72863 r75169  
    3030#include "Frame.h"
    3131
     32#include "AnimationTimeController.h"
    3233#include "ApplyStyleCommand.h"
    3334#include "CSSComputedStyleDeclaration.h"
     
    8485#include "npruntime_impl.h"
    8586#include "visible_units.h"
     87#include <wtf/CurrentTime.h>
    8688#include <wtf/RefCountedLeakCounter.h>
    8789#include <wtf/StdLibExtras.h>
     
    753755}
    754756
     757double Frame::currentAnimationTime()
     758{
     759    if (Page* p = page())
     760        return p->animationTime()->currentAnimationTime();
     761    return currentTime();
     762}
     763
     764
    755765String Frame::documentTypeString() const
    756766{
  • trunk/WebCore/page/Frame.h

    r74812 r75169  
    108108        void transferChildFrameToNewDocument();
    109109
     110        double currentAnimationTime();
     111
    110112    // ======== All public functions below this point are candidates to move out of Frame into another class. ========
    111113
  • trunk/WebCore/page/Page.cpp

    r74969 r75169  
    2121#include "Page.h"
    2222
     23#include "AnimationTimeController.h"
    2324#include "BackForwardController.h"
    2425#include "BackForwardList.h"
     
    157158    , m_progress(adoptPtr(new ProgressTracker))
    158159    , m_backForwardController(adoptPtr(new BackForwardController(this, pageClients.backForwardClient)))
     160    , m_animationTimeController(AnimationTimeController::create())
    159161    , m_theme(RenderTheme::themeForPage(this))
    160162    , m_editorClient(pageClients.editorClient)
  • trunk/WebCore/page/Page.h

    r74041 r75169  
    4040namespace WebCore {
    4141
     42    class AnimationTimeController;
    4243    class BackForwardController;
    4344    class BackForwardList;
     
    183184        ProgressTracker* progress() const { return m_progress.get(); }
    184185        BackForwardController* backForward() const { return m_backForwardController.get(); }
     186        AnimationTimeController* animationTime() const { return m_animationTimeController.get(); }
    185187
    186188        enum ViewMode {
     
    328330       
    329331        OwnPtr<BackForwardController> m_backForwardController;
     332        OwnPtr<AnimationTimeController> m_animationTimeController;
    330333        RefPtr<Frame> m_mainFrame;
    331334
     
    381384#endif
    382385
     386        double m_currentAnimationTime;
     387
    383388        ViewMode m_viewMode;
    384389
  • trunk/WebCore/page/animation/AnimationController.cpp

    r74287 r75169  
    317317{
    318318    if (m_beginAnimationUpdateTime == cBeginAnimationUpdateTimeNotSet)
    319         m_beginAnimationUpdateTime = currentTime();
     319        m_beginAnimationUpdateTime = m_frame->currentAnimationTime();
    320320    return m_beginAnimationUpdateTime;
    321321}
  • trunk/WebKit/chromium/ChangeLog

    r75146 r75169  
     12011-01-06  James Robinson  <jamesr@chromium.org>
     2
     3        Reviewed by Simon Fraser.
     4
     5        Implement mozilla's animationTime property
     6        https://bugs.webkit.org/show_bug.cgi?id=51952
     7
     8        WebKit API support for webkitAnimationTime.
     9
     10        * public/WebWidget.h:
     11        * src/WebPopupMenuImpl.cpp:
     12        (WebKit::WebPopupMenuImpl::clearCurrentAnimationTime):
     13        * src/WebPopupMenuImpl.h:
     14        * src/WebViewImpl.cpp:
     15        (WebKit::WebViewImpl::clearCurrentAnimationTime):
     16        * src/WebViewImpl.h:
     17
    1182010-12-29  John Abd-El-Malek  <jam@chromium.org>
    219
  • trunk/WebKit/chromium/public/WebWidget.h

    r75000 r75169  
    5656    // Called to resize the WebWidget.
    5757    virtual void resize(const WebSize&) = 0;
     58
     59    // Called to indicate that this widget has been rendered and the widget
     60    // no longer needs to store the animation time.
     61    virtual void clearCurrentAnimationTime() = 0;
    5862
    5963    // Called to layout the WebWidget.  This MUST be called before Paint,
  • trunk/WebKit/chromium/src/WebPopupMenuImpl.cpp

    r75000 r75169  
    152152}
    153153
     154void WebPopupMenuImpl::clearCurrentAnimationTime()
     155{
     156}
     157
    154158void WebPopupMenuImpl::layout()
    155159{
  • trunk/WebKit/chromium/src/WebPopupMenuImpl.h

    r75000 r75169  
    6262    virtual WebSize size() { return m_size; }
    6363    virtual void resize(const WebSize&);
     64    virtual void clearCurrentAnimationTime();
    6465    virtual void layout();
    6566    virtual void paint(WebCanvas* canvas, const WebRect& rect);
  • trunk/WebKit/chromium/src/WebViewImpl.cpp

    r75000 r75169  
    3232#include "WebViewImpl.h"
    3333
     34#include "AnimationTimeController.h"
    3435#include "AutoFillPopupMenuClient.h"
    3536#include "AXObjectCache.h"
     
    978979}
    979980
     981void WebViewImpl::clearCurrentAnimationTime()
     982{
     983    WebFrameImpl* webframe = mainFrameImpl();
     984    if (webframe)
     985        webframe->frame()->page()->animationTime()->clearCurrentAnimationTime();
     986}
     987
    980988void WebViewImpl::layout()
    981989{
  • trunk/WebKit/chromium/src/WebViewImpl.h

    r75000 r75169  
    9393    virtual WebSize size() { return m_size; }
    9494    virtual void resize(const WebSize&);
     95    virtual void clearCurrentAnimationTime();
    9596    virtual void layout();
    9697    virtual void paint(WebCanvas*, const WebRect&);
  • trunk/WebKit/mac/WebView/WebHTMLView.mm

    r75031 r75169  
    7676#import <AppKit/NSAccessibility.h>
    7777#import <ApplicationServices/ApplicationServices.h>
     78#import <WebCore/AnimationTimeController.h>
    7879#import <WebCore/CSSMutableStyleDeclaration.h>
    7980#import <WebCore/CachedImage.h>
     
    35063507#endif
    35073508
     3509    Frame* frame = [webView _mainCoreFrame];
     3510    if (frame && frame->page())
     3511        frame->page()->animationTime()->clearCurrentAnimationTime();
     3512
    35083513    if (webView)
    35093514        CallUIDelegate(webView, @selector(webView:didDrawFrame:), [self _frame]);
  • trunk/WebKit/mac/WebView/WebView.mm

    r74751 r75169  
    111111#import <WebCore/AbstractDatabase.h>
    112112#import <WebCore/ApplicationCacheStorage.h>
     113#import <WebCore/AnimationTimeController.h>
    113114#import <WebCore/BackForwardListImpl.h>
    114115#import <WebCore/MemoryCache.h>
     
    59585959        [webView _viewWillDrawInternal];
    59595960    }
     5961
     5962    Frame* frame = [webView _mainCoreFrame];
     5963    if (frame && frame->page())
     5964        frame->page()->animationTime()->clearCurrentAnimationTime();
    59605965}
    59615966
  • trunk/WebKit2/ChangeLog

    r75156 r75169  
     12011-01-06  James Robinson  <jamesr@chromium.org>
     2
     3        Reviewed by Simon Fraser.
     4
     5        Implement mozilla's animationTime property
     6        https://bugs.webkit.org/show_bug.cgi?id=51952
     7
     8        Tells the page to clear the current animation time after producing a frame.
     9
     10        * WebProcess/WebPage/WebPage.cpp:
     11        (WebKit::WebPage::drawRect):
     12        * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
     13        (WebKit::ChunkedUpdateDrawingArea::display):
     14        (WebKit::ChunkedUpdateDrawingArea::setSize):
     15        * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
     16        (WebKit::LayerBackedDrawingArea::syncCompositingLayers):
     17
    1182011-01-06  Darin Adler  <darin@apple.com>
    219
  • trunk/WebKit2/WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp

    r74669 r75169  
    3333#include "WebPage.h"
    3434#include "WebProcess.h"
     35#include <WebCore/AnimationTimeController.h>
     36#include <WebCore/Page.h>
    3537
    3638using namespace WebCore;
     
    9193
    9294    WebProcess::shared().connection()->send(DrawingAreaProxyLegacyMessage::Update, m_webPage->pageID(), CoreIPC::In(updateChunk));
     95   
     96    m_webPage->corePage()->animationTime()->clearCurrentAnimationTime();
    9397
    9498    m_isWaitingForUpdate = true;
     
    144148
    145149    WebProcess::shared().connection()->send(DrawingAreaProxyLegacyMessage::DidSetSize, m_webPage->pageID(), CoreIPC::In(updateChunk));
     150    m_webPage->corePage()->animationTime()->clearCurrentAnimationTime();
    146151}
    147152
  • trunk/WebKit2/WebProcess/WebPage/WebPage.cpp

    r75156 r75169  
    6060#include "WebProcessProxyMessages.h"
    6161#include <WebCore/AbstractDatabase.h>
     62#include <WebCore/AnimationTimeController.h>
    6263#include <WebCore/ArchiveResource.h>
    6364#include <WebCore/Chrome.h>
     
    516517        graphicsContext.restore();
    517518    }
     519   
     520    m_page->animationTime()->clearCurrentAnimationTime();
    518521}
    519522
  • trunk/WebKit2/WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm

    r74669 r75169  
    3232#include "WebPage.h"
    3333#include "WebProcess.h"
     34#include <WebCore/AnimationTimeController.h>
    3435#include <WebCore/Frame.h>
    3536#include <WebCore/FrameView.h>
     
    122123   
    123124    }
     125
     126    m_webPage->corePage()->animationTime()->clearCurrentAnimationTime();
    124127}
    125128
Note: See TracChangeset for help on using the changeset viewer.