Closed Bug 1389440 Opened 3 years ago Closed 3 years ago

stylo: Replace pseudo style with the one which has animation style

Categories

(Core :: CSS Parsing and Computation, enhancement)

enhancement
Not set

Tracking

()

RESOLVED FIXED
mozilla57
Tracking Status
firefox57 --- fixed

People

(Reporter: hiro, Assigned: hiro)

References

Details

Attachments

(1 file)

To make content property animatable we need to use the pseudo style with animations to generate element corresponding to animating content.

See bug 1382136 comment 23.
Comment on attachment 8896214 [details]
Bug 1389440 - Replace pseudo style with the one having animations before generating elements corresponding to content propery.

https://reviewboard.mozilla.org/r/167510/#review172696

::: layout/base/nsCSSFrameConstructor.cpp:1951
(Diff revision 1)
> +      // above. We need to grab style with animations from the pseudo element
> +      // and replace old one.
> +      mPresShell->StyleSet()->AsServo()->StyleNewSubtree(container);
> +      pseudoStyleContext =
> +        styleSet->AsServo()->ResolveServoStyle(container,
> +                                               ServoTraversalFlags::Empty);

This is somewhat icky, in the sense that we're calling StyleNewSubtree when we just have a single element, then StyleNewChildren after... But, I guess.
Attachment #8896214 - Flags: review?(emilio+bugs) → review+
Yeah, it's a bit spooky but I have no other idea...
Anyway, thanks for the quick review! I will land this after I confirmed the try is green.
Pushed by hikezoe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/15af7a521401
Replace pseudo style with the one having animations before generating elements corresponding to content propery. r=emilio
https://hg.mozilla.org/mozilla-central/rev/15af7a521401
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
Assignee: nobody → hikezoe
You need to log in before you can comment on or make changes to this bug.