Closed
Bug 1302637
Opened 8 years ago
Closed 7 years ago
Animation::PostUpdate() should call KeyframeEffectReadOnly::RequestRestyle()
Categories
(Core :: DOM: Animation, defect, P5)
Core
DOM: Animation
Tracking
()
RESOLVED
FIXED
mozilla55
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: hiro, Assigned: bharatraghunthan9767, Mentored)
Details
(Keywords: good-first-bug)
Attachments
(1 file)
59 bytes,
text/x-review-board-request
|
Details |
Now we have KeyframeEffectReadOnly::RequestRestyle() so we should use it in Animation::PostUpdate(). Or create KeyframeEffectReadOnly::PostUpdate()?
Reporter | ||
Updated•7 years ago
|
Mentor: hikezoe
Keywords: good-first-bug
Assignee | ||
Comment 1•7 years ago
|
||
Should https://dxr.mozilla.org/mozilla-central/source/dom/animation/Animation.cpp#1327-1337 nsPresContext* presContext = keyframeEffect->GetPresContext(); if (!presContext) { return; } presContext->EffectCompositor() ->RequestRestyle(target->mElement, target->mPseudoType, EffectCompositor::RestyleType::Layer, CascadeLevel()); } be replaced with a single function call KeyframeEffectReadOnly::RequestRestyle(EffectCompositor::RestyleType aRestyleType) ?
Flags: needinfo?(hikezoe)
Assignee | ||
Comment 2•7 years ago
|
||
Also, should https://dxr.mozilla.org/mozilla-central/source/dom/animation/KeyframeEffectReadOnly.cpp#1452-1460 nsPresContext* KeyframeEffectReadOnly::GetPresContext() const { nsIPresShell* shell = GetPresShell(); if (!shell) { return nullptr; } return shell->GetPresContext(); } be dropped/removed?
Comment hidden (mozreview-request) |
Assignee | ||
Comment 4•7 years ago
|
||
Comment on attachment 8847182 [details] Bug 1302637 - Animation::PostUpdate() calls KeyframeEffectReadonly::RequestRestyle() Are the parameters for KeyframeEffectReadonly::RequestRestyle() correct?
Attachment #8847182 -
Flags: review?(hikezoe)
Reporter | ||
Comment 5•7 years ago
|
||
mozreview-review |
Comment on attachment 8847182 [details] Bug 1302637 - Animation::PostUpdate() calls KeyframeEffectReadonly::RequestRestyle() https://reviewboard.mozilla.org/r/120180/#review122206 Not quite right. :-) RequestRestyle is a member function of KeyframeEffectReadOnly. We have a pointer of KeyframeEffectReadOnly in Animation::PostUpdate(). So, we can call the function just like: keyframeEffect->RequestRestyle(EffectCompositor::RestyleType::Layer); Also, you can drop GetPresContext() from KeyframeEffectReadOnly.h. I'd recommend you to build firefore with this patch before submitting it. Thanks!
Attachment #8847182 -
Flags: review?(hikezoe)
Reporter | ||
Updated•7 years ago
|
Assignee: nobody → bharatraghunthan9767
Status: NEW → ASSIGNED
Flags: needinfo?(hikezoe)
Comment hidden (mozreview-request) |
Assignee | ||
Updated•7 years ago
|
Flags: needinfo?(hikezoe)
Attachment #8847182 -
Flags: review?(hikezoe)
Reporter | ||
Comment 7•7 years ago
|
||
mozreview-review |
Comment on attachment 8847182 [details] Bug 1302637 - Animation::PostUpdate() calls KeyframeEffectReadonly::RequestRestyle() https://reviewboard.mozilla.org/r/120180/#review122388 Thanks for updating! ::: commit-message-2baef:3 (Diff revision 2) > +Also removed the instance of GetPresContext() in KeyframeEffectReadOnly.cpp > +and KeyframeEffectReadOnly.h GetPresContext() is not an instance. It's just a function. But yeah 'instance' might have a meaning what I don't know. ::: dom/animation/Animation.cpp:18 (Diff revision 2) > #include "mozilla/AutoRestore.h" > #include "mozilla/AsyncEventDispatcher.h" // For AsyncEventDispatcher > #include "mozilla/Maybe.h" // For Maybe > #include "mozilla/AnimationRule.h" // For AnimationRule > #include "nsAnimationManager.h" // For CSSAnimation > +#include "nsContentUtils.h" We don't need to include nsContentUtils.h. ::: dom/animation/Animation.cpp:1323 (Diff revision 2) > KeyframeEffectReadOnly* keyframeEffect = mEffect->AsKeyframeEffect(); > if (!keyframeEffect) { > return; > } > > Maybe<NonOwningAnimationTarget> target = keyframeEffect->GetTarget(); We can also drop this target variable. ::: dom/animation/Animation.cpp:1324 (Diff revision 2) > if (!keyframeEffect) { > return; > } > > Maybe<NonOwningAnimationTarget> target = keyframeEffect->GetTarget(); > - if (!target) { > + keyframeEffect->RequestRestyle(EffectCompositor::RestyleType::Layer aRestyleTypeLayer); I think this can't be compiled yet. keyframeEffect->RequestRestyle(EffectCompositor::RestyleType::Layer);
Attachment #8847182 -
Flags: review?(hikezoe)
Reporter | ||
Comment 8•7 years ago
|
||
Bharat, you don't need to set needinfo every time you requested review.
Flags: needinfo?(hikezoe)
Comment hidden (mozreview-request) |
Assignee | ||
Updated•7 years ago
|
Attachment #8847182 -
Flags: review?(hikezoe)
Reporter | ||
Comment 10•7 years ago
|
||
mozreview-review |
Comment on attachment 8847182 [details] Bug 1302637 - Animation::PostUpdate() calls KeyframeEffectReadonly::RequestRestyle() https://reviewboard.mozilla.org/r/120180/#review122404 Thanks! I just pushed a try. ::: dom/animation/Animation.cpp:1321 (Diff revisions 2 - 3) > > KeyframeEffectReadOnly* keyframeEffect = mEffect->AsKeyframeEffect(); > if (!keyframeEffect) { > return; > } > - > + Nit: extra spaces.
Attachment #8847182 -
Flags: review?(hikezoe) → review+
Reporter | ||
Comment 11•7 years ago
|
||
Oops, sorry. I missed KeyframeEffectReadOnly::RequestRestyle is a protected. You need to move the declaration to public section. I'd definitely recommend you to build firefox with patches. Thanks!
Comment hidden (mozreview-request) |
Assignee | ||
Comment 13•7 years ago
|
||
Comment on attachment 8847182 [details] Bug 1302637 - Animation::PostUpdate() calls KeyframeEffectReadonly::RequestRestyle() Any more changes in KeyframeEffectReadOnly.h or in KeyframeEffectReadOnly.cpp?
Flags: needinfo?(hikezoe)
Attachment #8847182 -
Flags: review?(hikezoe)
Reporter | ||
Comment 14•7 years ago
|
||
mozreview-review |
Comment on attachment 8847182 [details] Bug 1302637 - Animation::PostUpdate() calls KeyframeEffectReadonly::RequestRestyle() https://reviewboard.mozilla.org/r/120180/#review122656 ::: dom/animation/KeyframeEffectReadOnly.h:216 (Diff revision 4) > mEffectOptions.GetSpacingAsString(aRetVal); > } > > void NotifyAnimationTimingUpdated(); > > + Nit: extra spaces. ::: dom/animation/KeyframeEffectReadOnly.h:219 (Diff revision 4) > void NotifyAnimationTimingUpdated(); > > + > + void RequestRestyle(EffectCompositor::RestyleType aRestyleType); > + > + // Update the associated frame state bits so that, if necessary, a stacking Please move this comment back to the original position. It's for MaybeUpdateFrameForCompositor().
Attachment #8847182 -
Flags: review?(hikezoe) → review+
Comment hidden (mozreview-request) |
Assignee | ||
Updated•7 years ago
|
Attachment #8847182 -
Flags: review?(hikezoe)
Reporter | ||
Comment 16•7 years ago
|
||
mozreview-review |
Comment on attachment 8847182 [details] Bug 1302637 - Animation::PostUpdate() calls KeyframeEffectReadonly::RequestRestyle() https://reviewboard.mozilla.org/r/120180/#review122738 ::: dom/animation/KeyframeEffectReadOnly.h:215 (Diff revision 5) > { > mEffectOptions.GetSpacingAsString(aRetVal); > } > > void NotifyAnimationTimingUpdated(); > + Could you please drop these extra spaces as well?
Attachment #8847182 -
Flags: review?(hikezoe) → review+
Comment hidden (mozreview-request) |
Comment 18•7 years ago
|
||
Pushed by hikezoe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b2b5c91cdb7f Animation::PostUpdate() calls KeyframeEffectReadonly::RequestRestyle() r=hiro
Assignee | ||
Comment 19•7 years ago
|
||
Comment on attachment 8847182 [details] Bug 1302637 - Animation::PostUpdate() calls KeyframeEffectReadonly::RequestRestyle() Can you please check if all spaces are fixed, and if so autoland the patch as the try server testing seems to have completed?
Attachment #8847182 -
Flags: review?(hikezoe)
Reporter | ||
Comment 20•7 years ago
|
||
Yeah, I just checked it and landed now. Thanks a lot!
Flags: needinfo?(hikezoe)
Reporter | ||
Updated•7 years ago
|
Attachment #8847182 -
Flags: review?(hikezoe)
Comment 21•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/b2b5c91cdb7f
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Assignee | ||
Comment 22•7 years ago
|
||
Thanks for helping, :hiro <hikezoe@mozilla.com>!!!
You need to log in
before you can comment on or make changes to this bug.
Description
•