Fixed https://bugs.webkit.org/show_bug.cgi?id=22870
authorcmarrin@apple.com <cmarrin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Jan 2009 00:35:51 +0000 (00:35 +0000)
committercmarrin@apple.com <cmarrin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Jan 2009 00:35:51 +0000 (00:35 +0000)
commitdf76f7d3bff9ce69aba3859a52a83bb5d5933166
tree72f2f08fe0e3a7f37c906dcd58a3be011d4db386
parente2ae12cc9651174862c2055c9c21e3b11291ef35
    Fixed https://bugs.webkit.org/show_bug.cgi?id=22870

        I added calls beginAnimationUpdate() and endAnimationUpdate() calls
        to AnimationController. These are called by Document at the start
        and end of the recalcStyle cycle. Right now, I'm just using the
        beginAnimationUpdate() method to reset an animation time value.
        The first time the animation time is accessed after this reset I set
        it to the currentTime. So all animations in that cycle get the same
        start time.

        The test cases checked in test this, but in the case of the 'left'
        test it actually doesn't make any difference in most cases. This is
        because values are clamped to whole pixels, so the start times would
        have to be pretty far off for the test to fail using the old
        currentTime() model. Still, under really heavy load, it's possible for
        the test to fail without these changes.

        The 'transform' test is another story. It animates to the full resolution
        of a floating point number, so the test fails miserably without this
        fix.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39667 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
LayoutTests/ChangeLog
LayoutTests/animations/animation-test-helpers.js
LayoutTests/animations/simultaneous-start-left-expected.txt [new file with mode: 0644]
LayoutTests/animations/simultaneous-start-left.html [new file with mode: 0644]
LayoutTests/animations/simultaneous-start-transform-expected.txt [new file with mode: 0644]
LayoutTests/animations/simultaneous-start-transform.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/dom/Document.cpp
WebCore/page/animation/AnimationBase.cpp
WebCore/page/animation/AnimationBase.h
WebCore/page/animation/AnimationController.cpp
WebCore/page/animation/AnimationController.h
WebCore/page/animation/KeyframeAnimation.cpp