Closed Bug 1383589 Opened 7 years ago Closed 7 years ago

stylo: hang up animation on documentElement

Categories

(Core :: CSS Parsing and Computation, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: hiro, Assigned: hiro)

Details

Attachments

(2 files)

Attached file hang.html
Stylo hangs up when opening the attaching file.
I can't reproduce this on today's mozilla-cetnral <https://hg.mozilla.org/mozilla-central/rev/5928d905c0bc>, but can reproduce on today's nightly (20170723100400).  Seems to be fixed?
The mozilla-central is a local build, so there might differ from nightly though.
I could reproduce on the today's mozilla-central. It seems not happen on non-E10S, and also needs to open multiple tabs and switch tabs several times?
Hiro tells me he's investigating.
Assignee: nobody → hikezoe
https://treeherder.mozilla.org/#/jobs?repo=try&revision=8cfef4338aef20be884e2551212ccadadddaab4f

A problem is that the value we check in DoProcessPendingRestyles [1] does not match does not match the return value of  Servo_TraverseSubtree().

[1] https://hg.mozilla.org/mozilla-central/file/5928d905c0bc/layout/base/ServoRestyleManager.cpp#l876
Comment on attachment 8889643 [details]
Bug 1383589 - Process post traversal whenever StyleDocument() or StyleDocumentForThrottledAnimationFlush() returns true.

https://reviewboard.mozilla.org/r/160674/#review165934

::: layout/base/ServoRestyleManager.cpp:873
(Diff revision 1)
>        AutoRestyleTimelineMarker marker(
>          mPresContext->GetDocShell(), forThrottledAnimationFlush);
>        DocumentStyleRootIterator iter(doc);
>        while (Element* root = iter.GetNextStyleRoot()) {
>          ServoRestyleState state(*styleSet, currentChanges);
> -        if (!forThrottledAnimationFlush ||
> +        if (Servo_NeedsPostTraversal(root, aRestyleBehavior)) {

As discussed, we can just call ProcessPostTraversal all the time, now the post-traversal does the correct thing for animation restyles.

With that, and the unnecessary stuff removed, r=me
Attachment #8889643 - Flags: review?(emilio+bugs) → review+
Pushed by hikezoe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e46f1af0d431
Process post traversal whenever StyleDocument() or StyleDocumentForThrottledAnimationFlush() returns true. r=emilio
https://hg.mozilla.org/mozilla-central/rev/e46f1af0d431
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in before you can comment on or make changes to this bug.