forked from WebKit/WebKit-http
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial call to webkitRequestAnimationFrame returns 0, Spec indicates…
… the handle should always be > 0 https://bugs.webkit.org/show_bug.cgi?id=85819 Reviewed by James Robinson. Source/WebCore: The callback id returned by requestAnimationFrame was beginning at zero, when the spec says it should be above one. Use a pre-increment rather than a post-increment. Test: fast/animation/request-animation-frame-callback-id.html * dom/ScriptedAnimationController.cpp: (WebCore::ScriptedAnimationController::registerCallback): Pre-increment rather than post-increment. LayoutTests: * fast/animation/request-animation-frame-callback-id-expected.txt: Added. * fast/animation/request-animation-frame-callback-id.html: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125633 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
5 changed files
with
49 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
LayoutTests/fast/animation/request-animation-frame-callback-id-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
PASSED: Callback id was > 0 |
22 changes: 22 additions & 0 deletions
22
LayoutTests/fast/animation/request-animation-frame-callback-id.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<script> | ||
if (window.testRunner) { | ||
window.testRunner.dumpAsText(); | ||
window.testRunner.waitUntilDone(); | ||
} | ||
|
||
function runTest() { | ||
var id = window.webkitRequestAnimationFrame(function () {}); | ||
var results = document.getElementById("results"); | ||
|
||
if (id > 0) | ||
results.innerText = "PASSED: Callback id was > 0"; | ||
else | ||
results.innerText = "FAILED: Callback id was <= 0"; | ||
|
||
if (window.testRunner) | ||
window.testRunner.notifyDone(); | ||
} | ||
|
||
window.addEventListener("load", runTest, false); | ||
</script> | ||
<div id="results"></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters