summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>2011-12-12 20:58:15 (GMT)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>2011-12-12 20:58:15 (GMT)
commitcd5d11d662d638b3e4dfda33f23cda907f007f12 (patch)
treee4e37977935e364c44117c469176b2efd1f1573a
parent428cbca87a77a0785a72bbc04dd143e738ae5e1b (diff)
Rename webkitCancelRequestAnimationFrame to webkitCancelAnimationFrame to match spec change
https://bugs.webkit.org/show_bug.cgi?id=74231 Patch by James Robinson <jamesr@chromium.org> on 2011-12-12 Reviewed by Simon Fraser. Source/WebCore: The RequestAnimationFrame spec has renamed cancelRequestAnimationFrame to cancelAnimationFrame in response to feedback from Mozilla and Microsoft that the old name was too long and didn't parallel setTimeout/clearTimeout and setInterval/clearInterval very well. This updates our IDL to match, while preserving the old name as an alias to be compatible with current content. * dom/Document.cpp: (WebCore::Document::webkitCancelAnimationFrame): * dom/Document.h: * page/DOMWindow.cpp: (WebCore::DOMWindow::webkitCancelAnimationFrame): * page/DOMWindow.h: (WebCore::DOMWindow::webkitCancelRequestAnimationFrame): * page/DOMWindow.idl: LayoutTests: Update requestAnimationFrame tests to refer to the new function name. * fast/animation/request-animation-frame-missing-arguments.html: * fast/animation/script-tests/request-animation-frame-cancel.js: (window): * fast/animation/script-tests/request-animation-frame-cancel2.js: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@102612 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-rw-r--r--LayoutTests/ChangeLog14
-rw-r--r--LayoutTests/fast/animation/request-animation-frame-missing-arguments-expected.txt2
-rw-r--r--LayoutTests/fast/animation/request-animation-frame-missing-arguments.html2
-rw-r--r--LayoutTests/fast/animation/script-tests/request-animation-frame-cancel.js2
-rw-r--r--LayoutTests/fast/animation/script-tests/request-animation-frame-cancel2.js2
-rw-r--r--Source/WebCore/ChangeLog21
-rw-r--r--Source/WebCore/dom/Document.cpp2
-rw-r--r--Source/WebCore/dom/Document.h2
-rw-r--r--Source/WebCore/page/DOMWindow.cpp4
-rw-r--r--Source/WebCore/page/DOMWindow.h3
-rw-r--r--Source/WebCore/page/DOMWindow.idl5
11 files changed, 48 insertions, 11 deletions
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index ad3de22..fe1cc67 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,17 @@
+2011-12-12 James Robinson <jamesr@chromium.org>
+
+ Rename webkitCancelRequestAnimationFrame to webkitCancelAnimationFrame to match spec change
+ https://bugs.webkit.org/show_bug.cgi?id=74231
+
+ Reviewed by Simon Fraser.
+
+ Update requestAnimationFrame tests to refer to the new function name.
+
+ * fast/animation/request-animation-frame-missing-arguments.html:
+ * fast/animation/script-tests/request-animation-frame-cancel.js:
+ (window):
+ * fast/animation/script-tests/request-animation-frame-cancel2.js:
+
2011-12-12 Kenneth Russell <kbr@google.com>
Unreviewed Chromium gardening. Mark flaky crashing transitions/
diff --git a/LayoutTests/fast/animation/request-animation-frame-missing-arguments-expected.txt b/LayoutTests/fast/animation/request-animation-frame-missing-arguments-expected.txt
index 0ed0f31..d70fcce 100644
--- a/LayoutTests/fast/animation/request-animation-frame-missing-arguments-expected.txt
+++ b/LayoutTests/fast/animation/request-animation-frame-missing-arguments-expected.txt
@@ -4,7 +4,7 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
PASS webkitRequestAnimationFrame() threw exception TypeError: Not enough arguments.
-PASS webkitCancelRequestAnimationFrame() threw exception TypeError: Not enough arguments.
+PASS webkitCancelAnimationFrame() threw exception TypeError: Not enough arguments.
PASS successfullyParsed is true
TEST COMPLETE
diff --git a/LayoutTests/fast/animation/request-animation-frame-missing-arguments.html b/LayoutTests/fast/animation/request-animation-frame-missing-arguments.html
index c1706c5..a0696b3 100644
--- a/LayoutTests/fast/animation/request-animation-frame-missing-arguments.html
+++ b/LayoutTests/fast/animation/request-animation-frame-missing-arguments.html
@@ -7,7 +7,7 @@
<script>
description('Test how animation methods react to too few arguments.');
shouldThrow("webkitRequestAnimationFrame()");
-shouldThrow("webkitCancelRequestAnimationFrame()");
+shouldThrow("webkitCancelAnimationFrame()");
</script>
<script src="../js/resources/js-test-post.js"></script>
</body>
diff --git a/LayoutTests/fast/animation/script-tests/request-animation-frame-cancel.js b/LayoutTests/fast/animation/script-tests/request-animation-frame-cancel.js
index 47a604d..53f8158 100644
--- a/LayoutTests/fast/animation/script-tests/request-animation-frame-cancel.js
+++ b/LayoutTests/fast/animation/script-tests/request-animation-frame-cancel.js
@@ -5,7 +5,7 @@ var e = document.getElementById("e");
var id = window.webkitRequestAnimationFrame(function() {
}, e);
-window.webkitCancelRequestAnimationFrame(id);
+window.webkitCancelAnimationFrame(id);
if (window.layoutTestController)
layoutTestController.display();
diff --git a/LayoutTests/fast/animation/script-tests/request-animation-frame-cancel2.js b/LayoutTests/fast/animation/script-tests/request-animation-frame-cancel2.js
index 67e79f9..38da6fe 100644
--- a/LayoutTests/fast/animation/script-tests/request-animation-frame-cancel2.js
+++ b/LayoutTests/fast/animation/script-tests/request-animation-frame-cancel2.js
@@ -7,7 +7,7 @@ var cancelFired = false;
window.webkitRequestAnimationFrame(function() {
cancelFired = true;
- window.webkitCancelRequestAnimationFrame(secondCallbackId);
+ window.webkitCancelAnimationFrame(secondCallbackId);
}, e);
secondCallbackId = window.webkitRequestAnimationFrame(function() {
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 3ccd1c0..e07b41a 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,24 @@
+2011-12-12 James Robinson <jamesr@chromium.org>
+
+ Rename webkitCancelRequestAnimationFrame to webkitCancelAnimationFrame to match spec change
+ https://bugs.webkit.org/show_bug.cgi?id=74231
+
+ Reviewed by Simon Fraser.
+
+ The RequestAnimationFrame spec has renamed cancelRequestAnimationFrame to cancelAnimationFrame in response to
+ feedback from Mozilla and Microsoft that the old name was too long and didn't parallel setTimeout/clearTimeout
+ and setInterval/clearInterval very well. This updates our IDL to match, while preserving the old name as an
+ alias to be compatible with current content.
+
+ * dom/Document.cpp:
+ (WebCore::Document::webkitCancelAnimationFrame):
+ * dom/Document.h:
+ * page/DOMWindow.cpp:
+ (WebCore::DOMWindow::webkitCancelAnimationFrame):
+ * page/DOMWindow.h:
+ (WebCore::DOMWindow::webkitCancelRequestAnimationFrame):
+ * page/DOMWindow.idl:
+
2011-12-12 Shawn Singh <shawnsingh@chromium.org>
[chromium] Remove assumption that empty surface is always at end of list
diff --git a/Source/WebCore/dom/Document.cpp b/Source/WebCore/dom/Document.cpp
index 5c7b6ad..10625a2 100644
--- a/Source/WebCore/dom/Document.cpp
+++ b/Source/WebCore/dom/Document.cpp
@@ -5145,7 +5145,7 @@ int Document::webkitRequestAnimationFrame(PassRefPtr<RequestAnimationFrameCallba
return m_scriptedAnimationController->registerCallback(callback, animationElement);
}
-void Document::webkitCancelRequestAnimationFrame(int id)
+void Document::webkitCancelAnimationFrame(int id)
{
if (!m_scriptedAnimationController)
return;
diff --git a/Source/WebCore/dom/Document.h b/Source/WebCore/dom/Document.h
index 2c2a28c..1107cf4 100644
--- a/Source/WebCore/dom/Document.h
+++ b/Source/WebCore/dom/Document.h
@@ -1105,7 +1105,7 @@ public:
#if ENABLE(REQUEST_ANIMATION_FRAME)
int webkitRequestAnimationFrame(PassRefPtr<RequestAnimationFrameCallback>, Element*);
- void webkitCancelRequestAnimationFrame(int id);
+ void webkitCancelAnimationFrame(int id);
void serviceScriptedAnimations(DOMTimeStamp);
#endif
diff --git a/Source/WebCore/page/DOMWindow.cpp b/Source/WebCore/page/DOMWindow.cpp
index 5712d66..d44512f 100644
--- a/Source/WebCore/page/DOMWindow.cpp
+++ b/Source/WebCore/page/DOMWindow.cpp
@@ -1584,10 +1584,10 @@ int DOMWindow::webkitRequestAnimationFrame(PassRefPtr<RequestAnimationFrameCallb
return 0;
}
-void DOMWindow::webkitCancelRequestAnimationFrame(int id)
+void DOMWindow::webkitCancelAnimationFrame(int id)
{
if (Document* d = document())
- d->webkitCancelRequestAnimationFrame(id);
+ d->webkitCancelAnimationFrame(id);
}
#endif
diff --git a/Source/WebCore/page/DOMWindow.h b/Source/WebCore/page/DOMWindow.h
index b503f6e..e3aea12 100644
--- a/Source/WebCore/page/DOMWindow.h
+++ b/Source/WebCore/page/DOMWindow.h
@@ -254,7 +254,8 @@ namespace WebCore {
// WebKit animation extensions
#if ENABLE(REQUEST_ANIMATION_FRAME)
int webkitRequestAnimationFrame(PassRefPtr<RequestAnimationFrameCallback>, Element*);
- void webkitCancelRequestAnimationFrame(int id);
+ void webkitCancelAnimationFrame(int id);
+ void webkitCancelRequestAnimationFrame(int id) { webkitCancelAnimationFrame(id); }
#endif
// Events
diff --git a/Source/WebCore/page/DOMWindow.idl b/Source/WebCore/page/DOMWindow.idl
index 473b378..9f1c07e 100644
--- a/Source/WebCore/page/DOMWindow.idl
+++ b/Source/WebCore/page/DOMWindow.idl
@@ -241,9 +241,10 @@ module window {
void clearInterval(in [Optional=CallWithDefaultValue] long handle);
#if defined(ENABLE_REQUEST_ANIMATION_FRAME)
- // WebKit animation extensions
+ // WebKit animation extensions, being standardized in the WebPerf WG
long webkitRequestAnimationFrame(in [Callback] RequestAnimationFrameCallback callback, in [Optional=CallWithDefaultValue] Element element);
- void webkitCancelRequestAnimationFrame(in long id);
+ void webkitCancelAnimationFrame(in long id);
+ void webkitCancelRequestAnimationFrame(in long id); // This is a deprecated alias for webkitCancelAnimationFrame(). Remove this when removing vendor prefix.
#endif
// Base64