WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
49073
Move resumeAnimations/suspendAnimations from Frame to AnimationController.
https://bugs.webkit.org/show_bug.cgi?id=49073
Summary
Move resumeAnimations/suspendAnimations from Frame to AnimationController.
Chris Marrin
Reported
2010-11-05 09:55:15 PDT
Darin doesn't want to increase the API of Frame, so these should be moved to AnimationController.
Attachments
Patch
(11.82 KB, patch)
2010-11-05 11:22 PDT
,
Chris Marrin
no flags
Details
Formatted Diff
Diff
Patch
(19.60 KB, patch)
2010-11-05 13:02 PDT
,
Chris Marrin
no flags
Details
Formatted Diff
Diff
Patch
(17.12 KB, patch)
2010-11-05 13:37 PDT
,
Chris Marrin
simon.fraser
: review+
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Chris Marrin
Comment 1
2010-11-05 11:22:45 PDT
Created
attachment 73088
[details]
Patch
Darin Adler
Comment 2
2010-11-05 12:36:49 PDT
Comment on
attachment 73088
[details]
Patch I think it would be cleaner to rename the existing function resumeAnimationsForThisFrameOnly or something like that, and have a new function with the loop in it, instead of using a magic value of 0 to mean "loop through subframes".
Simon Fraser (smfr)
Comment 3
2010-11-05 12:44:33 PDT
Comment on
attachment 73088
[details]
Patch Right, Chris is going to add new methods to AnimationController.
Chris Marrin
Comment 4
2010-11-05 13:02:37 PDT
Created
attachment 73103
[details]
Patch
Simon Fraser (smfr)
Comment 5
2010-11-05 13:13:10 PDT
Comment on
attachment 73103
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=73103&action=review
> WebCore/page/animation/AnimationController.cpp:241 > setBeginAnimationUpdateTime(cBeginAnimationUpdateTimeNotSet); > > RenderObjectAnimationMap::const_iterator animationsEnd = m_compositeAnimations.end(); > for (RenderObjectAnimationMap::const_iterator it = m_compositeAnimations.begin(); it != animationsEnd; ++it) { > RenderObject* renderer = it->first; > + if (renderer->document() == m_frame->document()) { > + CompositeAnimation* compAnim = it->second.get(); > + compAnim->suspendAnimations(); > + } > + }
Too much copied code here. This should just do suspendAnimationsForDocument(m_frame->document());
> WebCore/page/animation/AnimationController.cpp:261 > + setBeginAnimationUpdateTime(cBeginAnimationUpdateTimeNotSet); > + > + RenderObjectAnimationMap::const_iterator animationsEnd = m_compositeAnimations.end(); > + for (RenderObjectAnimationMap::const_iterator it = m_compositeAnimations.begin(); it != animationsEnd; ++it) { > + RenderObject* renderer = it->first; > + if (renderer->document() == m_frame->document()) { > + CompositeAnimation* compAnim = it->second.get(); > + compAnim->resumeAnimations(); > + } > + }
Same, just call resumeAnimationsForDocument(m_frame->document());
> WebCore/page/animation/AnimationController.cpp:311 > + /* > + bool traverseSubframes = false; > + if (!document) { > + document = m_frame->document(); > + traverseSubframes = true; > + } > + */ > +
Remove!
Chris Marrin
Comment 6
2010-11-05 13:37:23 PDT
Created
attachment 73110
[details]
Patch
Simon Fraser (smfr)
Comment 7
2010-11-05 13:57:27 PDT
Comment on
attachment 73110
[details]
Patch So much nicer!
Chris Marrin
Comment 8
2010-11-05 14:45:59 PDT
Committed
r71451
: <
http://trac.webkit.org/changeset/71451
>
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