Changeset 102612 in webkit


Ignore:
Timestamp:
Dec 12, 2011 12:58:15 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

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:
Location:
trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r102609 r102612  
     12011-12-12  James Robinson  <jamesr@chromium.org>
     2
     3        Rename webkitCancelRequestAnimationFrame to webkitCancelAnimationFrame to match spec change
     4        https://bugs.webkit.org/show_bug.cgi?id=74231
     5
     6        Reviewed by Simon Fraser.
     7
     8        Update requestAnimationFrame tests to refer to the new function name.
     9
     10        * fast/animation/request-animation-frame-missing-arguments.html:
     11        * fast/animation/script-tests/request-animation-frame-cancel.js:
     12        (window):
     13        * fast/animation/script-tests/request-animation-frame-cancel2.js:
     14
    1152011-12-12  Kenneth Russell  <kbr@google.com>
    216
  • trunk/LayoutTests/fast/animation/request-animation-frame-missing-arguments-expected.txt

    r94769 r102612  
    55
    66PASS webkitRequestAnimationFrame() threw exception TypeError: Not enough arguments.
    7 PASS webkitCancelRequestAnimationFrame() threw exception TypeError: Not enough arguments.
     7PASS webkitCancelAnimationFrame() threw exception TypeError: Not enough arguments.
    88PASS successfullyParsed is true
    99
  • trunk/LayoutTests/fast/animation/request-animation-frame-missing-arguments.html

    r98407 r102612  
    88description('Test how animation methods react to too few arguments.');
    99shouldThrow("webkitRequestAnimationFrame()");
    10 shouldThrow("webkitCancelRequestAnimationFrame()");
     10shouldThrow("webkitCancelAnimationFrame()");
    1111</script>
    1212<script src="../js/resources/js-test-post.js"></script>
  • trunk/LayoutTests/fast/animation/script-tests/request-animation-frame-cancel.js

    r98407 r102612  
    66}, e);
    77
    8 window.webkitCancelRequestAnimationFrame(id);
     8window.webkitCancelAnimationFrame(id);
    99
    1010if (window.layoutTestController)
  • trunk/LayoutTests/fast/animation/script-tests/request-animation-frame-cancel2.js

    r98407 r102612  
    88window.webkitRequestAnimationFrame(function() {
    99    cancelFired = true;
    10     window.webkitCancelRequestAnimationFrame(secondCallbackId);
     10    window.webkitCancelAnimationFrame(secondCallbackId);
    1111}, e);
    1212
  • trunk/Source/WebCore/ChangeLog

    r102611 r102612  
     12011-12-12  James Robinson  <jamesr@chromium.org>
     2
     3        Rename webkitCancelRequestAnimationFrame to webkitCancelAnimationFrame to match spec change
     4        https://bugs.webkit.org/show_bug.cgi?id=74231
     5
     6        Reviewed by Simon Fraser.
     7
     8        The RequestAnimationFrame spec has renamed cancelRequestAnimationFrame to cancelAnimationFrame in response to
     9        feedback from Mozilla and Microsoft that the old name was too long and didn't parallel setTimeout/clearTimeout
     10        and setInterval/clearInterval very well. This updates our IDL to match, while preserving the old name as an
     11        alias to be compatible with current content.
     12
     13        * dom/Document.cpp:
     14        (WebCore::Document::webkitCancelAnimationFrame):
     15        * dom/Document.h:
     16        * page/DOMWindow.cpp:
     17        (WebCore::DOMWindow::webkitCancelAnimationFrame):
     18        * page/DOMWindow.h:
     19        (WebCore::DOMWindow::webkitCancelRequestAnimationFrame):
     20        * page/DOMWindow.idl:
     21
    1222011-12-12  Shawn Singh  <shawnsingh@chromium.org>
    223
  • trunk/Source/WebCore/dom/Document.cpp

    r102606 r102612  
    51465146}
    51475147
    5148 void Document::webkitCancelRequestAnimationFrame(int id)
     5148void Document::webkitCancelAnimationFrame(int id)
    51495149{
    51505150    if (!m_scriptedAnimationController)
  • trunk/Source/WebCore/dom/Document.h

    r102431 r102612  
    11061106#if ENABLE(REQUEST_ANIMATION_FRAME)
    11071107    int webkitRequestAnimationFrame(PassRefPtr<RequestAnimationFrameCallback>, Element*);
    1108     void webkitCancelRequestAnimationFrame(int id);
     1108    void webkitCancelAnimationFrame(int id);
    11091109    void serviceScriptedAnimations(DOMTimeStamp);
    11101110#endif
  • trunk/Source/WebCore/page/DOMWindow.cpp

    r102080 r102612  
    15851585}
    15861586
    1587 void DOMWindow::webkitCancelRequestAnimationFrame(int id)
     1587void DOMWindow::webkitCancelAnimationFrame(int id)
    15881588{
    15891589    if (Document* d = document())
    1590         d->webkitCancelRequestAnimationFrame(id);
     1590        d->webkitCancelAnimationFrame(id);
    15911591}
    15921592#endif
  • trunk/Source/WebCore/page/DOMWindow.h

    r98388 r102612  
    255255#if ENABLE(REQUEST_ANIMATION_FRAME)
    256256        int webkitRequestAnimationFrame(PassRefPtr<RequestAnimationFrameCallback>, Element*);
    257         void webkitCancelRequestAnimationFrame(int id);
     257        void webkitCancelAnimationFrame(int id);
     258        void webkitCancelRequestAnimationFrame(int id) { webkitCancelAnimationFrame(id); }
    258259#endif
    259260
  • trunk/Source/WebCore/page/DOMWindow.idl

    r102572 r102612  
    242242
    243243#if defined(ENABLE_REQUEST_ANIMATION_FRAME)
    244         // WebKit animation extensions
     244        // WebKit animation extensions, being standardized in the WebPerf WG
    245245        long webkitRequestAnimationFrame(in [Callback] RequestAnimationFrameCallback callback, in [Optional=CallWithDefaultValue] Element element);
    246         void webkitCancelRequestAnimationFrame(in long id);
     246        void webkitCancelAnimationFrame(in long id);
     247        void webkitCancelRequestAnimationFrame(in long id); // This is a deprecated alias for webkitCancelAnimationFrame(). Remove this when removing vendor prefix.
    247248#endif
    248249
Note: See TracChangeset for help on using the changeset viewer.