Title: [125633] trunk
- Revision
- 125633
- Author
- d...@apple.com
- Date
- 2012-08-14 18:51:14 -0700 (Tue, 14 Aug 2012)
Log Message
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.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (125632 => 125633)
--- trunk/LayoutTests/ChangeLog 2012-08-15 01:39:20 UTC (rev 125632)
+++ trunk/LayoutTests/ChangeLog 2012-08-15 01:51:14 UTC (rev 125633)
@@ -1,3 +1,13 @@
+2012-08-14 Dean Jackson <d...@apple.com>
+
+ 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.
+
+ * fast/animation/request-animation-frame-callback-id-expected.txt: Added.
+ * fast/animation/request-animation-frame-callback-id.html: Added.
+
2012-08-14 Chris Evans <cev...@google.com>
Handle the XPath / (root) operator correctly for nodes that aren't attached to the document.
Added: trunk/LayoutTests/fast/animation/request-animation-frame-callback-id-expected.txt (0 => 125633)
--- trunk/LayoutTests/fast/animation/request-animation-frame-callback-id-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/animation/request-animation-frame-callback-id-expected.txt 2012-08-15 01:51:14 UTC (rev 125633)
@@ -0,0 +1 @@
+PASSED: Callback id was > 0
Property changes on: trunk/LayoutTests/fast/animation/request-animation-frame-callback-id-expected.txt
___________________________________________________________________
Added: svn:mime-type
Added: svn:keywords
Added: svn:eol-style
Added: trunk/LayoutTests/fast/animation/request-animation-frame-callback-id.html (0 => 125633)
--- trunk/LayoutTests/fast/animation/request-animation-frame-callback-id.html (rev 0)
+++ trunk/LayoutTests/fast/animation/request-animation-frame-callback-id.html 2012-08-15 01:51:14 UTC (rev 125633)
@@ -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>
\ No newline at end of file
Property changes on: trunk/LayoutTests/fast/animation/request-animation-frame-callback-id.html
___________________________________________________________________
Added: svn:mime-type
Added: svn:keywords
Added: svn:eol-style
Modified: trunk/Source/WebCore/ChangeLog (125632 => 125633)
--- trunk/Source/WebCore/ChangeLog 2012-08-15 01:39:20 UTC (rev 125632)
+++ trunk/Source/WebCore/ChangeLog 2012-08-15 01:51:14 UTC (rev 125633)
@@ -1,3 +1,18 @@
+2012-08-14 Dean Jackson <d...@apple.com>
+
+ 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.
+
+ 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.
+
2012-08-14 Levi Weintraub <le...@chromium.org>
r125591 broke tests with SUBPIXEL_LAYOUT disabled
Modified: trunk/Source/WebCore/dom/ScriptedAnimationController.cpp (125632 => 125633)
--- trunk/Source/WebCore/dom/ScriptedAnimationController.cpp 2012-08-15 01:39:20 UTC (rev 125632)
+++ trunk/Source/WebCore/dom/ScriptedAnimationController.cpp 2012-08-15 01:51:14 UTC (rev 125633)
@@ -83,7 +83,7 @@
ScriptedAnimationController::CallbackId ScriptedAnimationController::registerCallback(PassRefPtr<RequestAnimationFrameCallback> callback)
{
- ScriptedAnimationController::CallbackId id = m_nextCallbackId++;
+ ScriptedAnimationController::CallbackId id = ++m_nextCallbackId;
callback->m_firedOrCancelled = false;
callback->m_id = id;
m_callbacks.append(callback);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes