WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
21310
Get rid of AnimationEventDispatcher
https://bugs.webkit.org/show_bug.cgi?id=21310
Summary
Get rid of AnimationEventDispatcher
Chris Marrin
Reported
2008-10-02 09:55:35 PDT
Currently, when we want to send and animation event, we set a 0 duration timer and when it fires, we send the event. This is to avoid calling the event handler directly from the AnimationBase subclass (KeyframeAnimation or ImplicitAnimation), in case these objects are destroyed by the event handler. But this adds a lot of overhead, so it should be changed so these classes are ref counted. Then we can keep a ref to them across the call to the event handler and avoid them getting destroyed too soon.
Attachments
Patch to fix bug
(43.37 KB, patch)
2008-10-02 10:10 PDT
,
Chris Marrin
mitz: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Chris Marrin
Comment 1
2008-10-02 10:10:52 PDT
Created
attachment 24022
[details]
Patch to fix bug
mitz
Comment 2
2008-10-02 10:37:25 PDT
Comment on
attachment 24022
[details]
Patch to fix bug Please remove this: + WARNING: NO TEST CASES ADDED OR CHANGED Unnecessary newline added here: virtual ~AnimationBase(); + RenderObject* renderer() const { return m_object; } isSuspended() would be a better name than suspended() and more in line with e.g. isAnimatingProperty(): + bool suspended() const { return m_suspended; } You can just write "if (keyframeAnim)" here: + if (keyframeAnim.get()) These are now out of order: -class RenderObject; class RenderStyle; +class RenderObject; No need to initialize a RefPtr to 0: + RefPtr<Element> element = 0; Again, no need to get(). I also think the parentheses are redundant. + ASSERT(!element.get() || (element->document() && !element->document()->inPageCache())); + if (!element.get()) The same is repeated in KeyframeAnimation.cpp This looks odd. Why are you doing this? + setChanged(element->renderer()->element()); r=me
Chris Marrin
Comment 3
2008-10-10 11:05:11 PDT
Sending WebCore/ChangeLog Sending WebCore/page/animation/AnimationBase.cpp Sending WebCore/page/animation/AnimationBase.h Sending WebCore/page/animation/AnimationController.cpp Sending WebCore/page/animation/CompositeAnimation.cpp Sending WebCore/page/animation/CompositeAnimation.h Sending WebCore/page/animation/ImplicitAnimation.cpp Sending WebCore/page/animation/ImplicitAnimation.h Sending WebCore/page/animation/KeyframeAnimation.cpp Sending WebCore/page/animation/KeyframeAnimation.h Transmitting file data .......... Committed revision 37484.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug