Bug 23126 - Add DRT API to retrieve number of active animations from AnimationController
: Add DRT API to retrieve number of active animations from AnimationController
Status: RESOLVED FIXED
: WebKit
Tools / Tests
: 528+ (Nightly build)
: Macintosh Mac OS X 10.5
: P2 Normal
Assigned To:
:
:
:
: 22239
  Show dependency treegraph
 
Reported: 2009-01-05 16:47 PST by
Modified: 2009-01-06 17:59 PST (History)


Attachments
Patch v1 (17.73 KB, patch)
2009-01-06 16:31 PST, Pierre-Olivier Latour
darin: review+
Review Patch | Details | Formatted Diff | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2009-01-05 16:47:18 PST
We need a DRT API to retrieve number of active animations from AnimationController: we have some failure cases where the AnimationController is running while it shouldn't and we should be able to have regression tests for them.
------- Comment #1 From 2009-01-06 16:31:11 PST -------
Created an attachment (id=26481) [details]
Patch v1
------- Comment #2 From 2009-01-06 17:35:29 PST -------
(From update of attachment 26481 [details])
> +        RefPtr<CompositeAnimation> compAnim = it->second;
> +        count += compAnim->numberOfActiveAnimations();

This will unnecessarily churn the reference count of the animation. You should either use a raw pointer for the local variable, or just use it->second directly.

r=me
------- Comment #3 From 2009-01-06 17:59:19 PST -------
(including Darin's recommended change)

Sending        LayoutTests/ChangeLog
Adding         LayoutTests/animations/animation-controller-drt-api-expected.txt
Adding         LayoutTests/animations/animation-controller-drt-api.html
Sending        LayoutTests/platform/win/Skipped
Sending        WebCore/ChangeLog
Sending        WebCore/WebCore.base.exp
Sending        WebCore/page/animation/AnimationController.cpp
Sending        WebCore/page/animation/AnimationController.h
Sending        WebCore/page/animation/CompositeAnimation.cpp
Sending        WebCore/page/animation/CompositeAnimation.h
Sending        WebKit/mac/ChangeLog
Sending        WebKit/mac/WebView/WebFrame.mm
Sending        WebKit/mac/WebView/WebFramePrivate.h
Sending        WebKitTools/ChangeLog
Sending        WebKitTools/DumpRenderTree/LayoutTestController.cpp
Sending        WebKitTools/DumpRenderTree/LayoutTestController.h
Sending        WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm
Sending        WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp
Transmitting file data ..................
Committed revision 39669.