-
commit-queue@webkit.org authored
Reviewed by Nate Chapin. Add a DOMTimeStamp parameter to the requestAnimationFrame callback https://bugs.webkit.org/show_bug.cgi?id=53142 Adds a test for the parameter passed to the requestAnimationFrame callback. * fast/animation/request-animation-frame-timestamps-expected.txt: Added. * fast/animation/request-animation-frame-timestamps.html: Added. * fast/animation/script-tests/request-animation-frame-timestamps.js: Added. 2011-01-26 James Robinson <jamesr@chromium.org> Reviewed by Nate Chapin. Add a DOMTimeStamp parameter to the requestAnimationFrame callback https://bugs.webkit.org/show_bug.cgi?id=53142 This adds a DOMTimeStamp parameter to the requestAnimationFrame callback to more closely match mozilla's proposal. This is useful if the page has multiple imperative animations and wants to ensure that they all remain synchronized. If each callback used Date.now() to update its animation state, they would potentially be out of sync with each other. If they use the timestamp then all callbacks for the same "frame" will update to the same state. Test: fast/animation/request-animation-frame-timestamps.html * bindings/scripts/CodeGeneratorV8.pm: * bindings/scripts/test/V8/V8TestCallback.cpp: (WebCore::V8TestCallback::callbackWithClass2Param): * dom/Document.cpp: (WebCore::Document::serviceScriptedAnimations): * dom/Document.h: * dom/RequestAnimationFrameCallback.h: * dom/RequestAnimationFrameCallback.idl: * page/FrameView.cpp: (WebCore::FrameView::serviceScriptedAnimations): * page/FrameView.h: 2011-01-26 James Robinson <jamesr@chromium.org> Reviewed by Nate Chapin. Add a DOMTimeStamp parameter to the requestAnimationFrame callback https://bugs.webkit.org/show_bug.cgi?id=53142 Provides a timestamp to use for imperative animation callbacks. In this patch the timestamp is just the current time at the start of the callback invocation algorithm. In the future we could enhance this to try to take the compositing delay into effect to try to synchronize imperative animations more closely with declarative ones, but this should do for now. * src/WebViewImpl.cpp: (WebKit::WebViewImpl::animate): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76677 268f45cc-cd09-0410-ab3c-d52691b4dbfc
27fbee6f