Closed Bug 1293478 Opened 8 years ago Closed 7 years ago

stylo: stop style context fixup if the change hint is ReconstructFrame

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bholley, Unassigned)

References

Details

See bug 1289868 comment 1. We presumably still need to do the traversal from the Servo side (since we'll need the new styles during frame reconstruction), but we can cull the post-pass in Gecko.
Emilio says this should be trivial to do after bug 1292930 lands.
Depends on: 1292930
We may or may not need the styles during frame reconstruction, depending on whether we end up creating frames.  Stopping restyling at display:none elements helps, though there are other cases where we don't create frames for an element as decided by the frame constructor.  I guess it's not as easy to handle those cases, though we could kick off another restyle at that element if we previously skipped restyling the subtree and then determine that we need styles after all.
I think trying to be too conservative about what we style during the parallel traversal puts us on a slippery slope to sequential traversal. We should certainly use any hints we can during traversal time (display:none stuff, skipping non-Element nodes, etc) though.

How easily detectable are the other cases? Are they listed somewhere?
Flags: needinfo?(cam)
I think in many of those special cases (e.g., iframe, noscript) we either never need the styles for the descendants or we can determine very quickly whether we need them.  (We can probably determine pretty quickly for object as well.)
(In reply to David Baron :dbaron: ⌚️UTC-7 (review requests must explain patch) from comment #4)
> I think in many of those special cases (e.g., iframe, noscript) we either
> never need the styles for the descendants or we can determine very quickly
> whether we need them.  (We can probably determine pretty quickly for object
> as well.)

I filed bug 1293768 for this discussion.
Flags: needinfo?(cam)
We do this now.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.