[CoordinatedGraphics] serviceScriptedAnimations expects time in seconds

https://bugs.webkit.org/show_bug.cgi?id=112582

Reviewed by Andreas Kling.

Source/WebKit/qt:

We've been exposing different time unit for requestAnimationFrame because
of wrong conversion before serviceScriptedAnimations function calls.
Fixed it to use seconds instead of milliseconds.

* WebCoreSupport/ChromeClientQt.cpp: Remove unnecessary conversion.

Source/WebKit2:

We've been exposing different time unit for requestAnimationFrame because
of wrong conversion before serviceScriptedAnimations function calls.
Fixed it to use seconds instead of milliseconds.

* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
(WebKit::CoordinatedLayerTreeHost::syncDisplayState): Remove unnecessary conversion.

LayoutTests:

Add test to measure if the time interval is coherent with the unit
of DOMTimeStamp (milliseconds) by comparing it with Date.now() interval.

* fast/animation/request-animation-frame-time-unit-expected.txt: Added.
* fast/animation/request-animation-frame-time-unit.html: Added.
* fast/animation/script-tests/request-animation-frame-time-unit.js: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148022 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 5eafa335
2013-04-09 Rafael Brandao <rafael.lobo@openbossa.org>
[CoordinatedGraphics] serviceScriptedAnimations expects time in seconds
https://bugs.webkit.org/show_bug.cgi?id=112582
Reviewed by Andreas Kling.
Add test to measure if the time interval is coherent with the unit
of DOMTimeStamp (milliseconds) by comparing it with Date.now() interval.
* fast/animation/request-animation-frame-time-unit-expected.txt: Added.
* fast/animation/request-animation-frame-time-unit.html: Added.
* fast/animation/script-tests/request-animation-frame-time-unit.js: Added.
2013-04-09 Lamarque V. Souza <Lamarque.Souza@basyskom.com>
[WebSocket] Ignore incoming message in CLOSING state
Tests time unit of requestAnimationFrame callback
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS isTimeUnitInMs is true
PASS successfullyParsed is true
TEST COMPLETE
<!DOCTYPE html>
<html>
<head>
<script src="../js/resources/js-test-pre.js"></script>
</head>
<body>
<script src="script-tests/request-animation-frame-time-unit.js"></script>
</body>
</html>
description("Tests time unit of requestAnimationFrame callback");
var isTimeUnitInMs = false;
window.requestAnimationFrame(function(time) {
var callbackTimeRef = time;
var timeRefInMs = Date.now();
setTimeout(function() {
window.requestAnimationFrame(function(time) {
var delta = time - callbackTimeRef;
var deltaTimeInMs = Date.now() - timeRefInMs;
var toleranceInMs = 10;
isTimeUnitInMs = Math.abs(delta - deltaTimeInMs) <= toleranceInMs;
shouldBeTrue("isTimeUnitInMs");
isSuccessfullyParsed();
if (window.testRunner)
testRunner.notifyDone();
});
if (window.testRunner)
testRunner.display();
}, 1);
});
if (window.testRunner)
testRunner.display();
if (window.testRunner)
testRunner.waitUntilDone();
2013-04-09 Rafael Brandao <rafael.lobo@openbossa.org>
[CoordinatedGraphics] serviceScriptedAnimations expects time in seconds
https://bugs.webkit.org/show_bug.cgi?id=112582
Reviewed by Andreas Kling.
We've been exposing different time unit for requestAnimationFrame because
of wrong conversion before serviceScriptedAnimations function calls.
Fixed it to use seconds instead of milliseconds.
* WebCoreSupport/ChromeClientQt.cpp: Remove unnecessary conversion.
2013-04-08 Benjamin Poulain <benjamin@webkit.org>
Remove HTML Notification
......
......@@ -625,7 +625,7 @@ void ChromeClientQt::scheduleAnimation()
void ChromeClientQt::serviceScriptedAnimations()
{
m_webPage->mainFrameAdapter()->frame->view()->serviceScriptedAnimations(convertSecondsToDOMTimeStamp(currentTime()));
m_webPage->mainFrameAdapter()->frame->view()->serviceScriptedAnimations(currentTime());
}
#endif
......
2013-04-09 Rafael Brandao <rafael.lobo@openbossa.org>
[CoordinatedGraphics] serviceScriptedAnimations expects time in seconds
https://bugs.webkit.org/show_bug.cgi?id=112582
Reviewed by Andreas Kling.
We've been exposing different time unit for requestAnimationFrame because
of wrong conversion before serviceScriptedAnimations function calls.
Fixed it to use seconds instead of milliseconds.
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
(WebKit::CoordinatedLayerTreeHost::syncDisplayState): Remove unnecessary conversion.
2013-04-09 Michael Brüning <michael.bruning@digia.com>
[Qt][WK2] Remove obsolete QtWebPageFindClient forward declaration from qquickwebview_p.h.
......@@ -506,7 +506,7 @@ void CoordinatedLayerTreeHost::syncDisplayState()
{
#if ENABLE(REQUEST_ANIMATION_FRAME) && !USE(REQUEST_ANIMATION_FRAME_TIMER) && !USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR)
// Make sure that any previously registered animation callbacks are being executed before we flush the layers.
m_webPage->corePage()->mainFrame()->view()->serviceScriptedAnimations(convertSecondsToDOMTimeStamp(currentTime()));
m_webPage->corePage()->mainFrame()->view()->serviceScriptedAnimations(currentTime());
#endif
m_webPage->layoutIfNeeded();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment